diff --git a/3rdparty/chipmunk-5.3.4/Demo/Bounce.c b/3rdparty/chipmunk-5.3.4/Demo/Bounce.c deleted file mode 100644 index a35754c85f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Bounce.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static void -update(int ticks) -{ - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip = cpv(frand()*(640 - 2*radius) - (320 - radius), frand()*(480 - 2*radius) - (240 - radius)); - body->v = cpvmult(cpv(2*frand() - 1, 2*frand() - 1), 200); - - cpShape *shape = cpSpaceAddShape(space, cpPolyShapeNew(body, 4, verts, cpvzero)); - shape->e = 1.0f; shape->u = 0.0f; -} - -static cpSpace * -init(void) -{ - cpResetShapeIdCounter(); - - space = cpSpaceNew(); - cpSpaceResizeActiveHash(space, 30.0f, 1000); - space->iterations = 10; - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - for(int i=0; i<10; i++) - add_box(); - - body = cpSpaceAddBody(space, cpBodyNew(100.0f, 10000.0f)); - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(body, cpv(-75,0), cpv(75,0), 5.0f)); - shape->e = 1.0f; shape->u = 1.0f; - - cpSpaceAddConstraint(space, cpPivotJointNew2(body, staticBody, cpvzero, cpvzero)); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Bounce = { - "Bounce", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/ChipmunkDemo.c b/3rdparty/chipmunk-5.3.4/Demo/ChipmunkDemo.c deleted file mode 100644 index 9652b7cd56..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/ChipmunkDemo.c +++ /dev/null @@ -1,486 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - IMPORTANT - READ ME! - - This file sets up a simple interface that the individual demos can use to get - a Chipmunk space running and draw what's in it. In order to keep the Chipmunk - examples clean and simple, they contain no graphics code. All drawing is done - by accessing the Chipmunk structures at a very low level. It is NOT - recommended to write a game or application this way as it does not scale - beyond simple shape drawing and is very dependent on implementation details - about Chipmunk which may change with little to no warning. -*/ - -#include -#include -#include -#include -#include - -#ifdef __APPLE__ - #include "OpenGL/gl.h" - #include "OpenGL/glu.h" - #include -#else -#ifdef WIN32 - #include -#endif - #include - #include - #include -#endif - -#include "chipmunk_private.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -#define SLEEP_TICKS 16 - -//extern chipmunkDemo Test; -extern chipmunkDemo LogoSmash; -extern chipmunkDemo Simple; -extern chipmunkDemo PyramidStack; -extern chipmunkDemo Plink; -extern chipmunkDemo Tumble; -extern chipmunkDemo PyramidTopple; -extern chipmunkDemo Bounce; -extern chipmunkDemo Planet; -extern chipmunkDemo Springies; -extern chipmunkDemo Pump; -extern chipmunkDemo TheoJansen; -extern chipmunkDemo MagnetsElectric; -extern chipmunkDemo UnsafeOps; -extern chipmunkDemo Query; -extern chipmunkDemo OneWay; -extern chipmunkDemo Player; -extern chipmunkDemo Sensors; -extern chipmunkDemo Joints; -extern chipmunkDemo Tank; - -//extern chipmunkDemo Test; - -static chipmunkDemo *demos[] = { - &LogoSmash, - &PyramidStack, - &Plink, - &Tumble, - &PyramidTopple, - &Bounce, - &Planet, - &Springies, - &Pump, - &TheoJansen, - &MagnetsElectric, - &UnsafeOps, - &Query, - &OneWay, - &Player, - &Sensors, - &Joints, - &Tank, -}; -static const int demoCount = sizeof(demos)/sizeof(chipmunkDemo *); -static chipmunkDemo *currDemo = NULL; -static const int firstDemoIndex = 'a' - 'a'; - -static int paused = 0; -static int step = 0; -static int ticks = 0; -static cpSpace *space; - -cpVect mousePoint; -cpVect mousePoint_last; -cpBody *mouseBody = NULL; -cpConstraint *mouseJoint = NULL; - -char messageString[1024] = {}; - -int key_up = 0; -int key_down = 0; -int key_left = 0; -int key_right = 0; - -cpVect arrowDirection = {}; - -drawSpaceOptions options = { - 0, - 0, - 1, - 4.0f, - 0.0f, - 1.5f, -}; - -static void -drawString(int x, int y, const char *str) -{ - glColor3f(0.0f, 0.0f, 0.0f); - glRasterPos2i(x, y); - - for(int i=0, len=strlen(str); iarbiters->num; - int points = 0; - - for(int i=0; iarbiters->arr[i]))->numContacts; - - int constraints = (space->constraints->num + points)*(space->iterations + space->elasticIterations); - - maxArbiters = arbiters > maxArbiters ? arbiters : maxArbiters; - maxPoints = points > maxPoints ? points : maxPoints; - maxConstraints = constraints > maxConstraints ? constraints : maxConstraints; - - char buffer[1024]; - const char *format = - "Arbiters: %d (%d) - " - "Contact Points: %d (%d)\n" - "Other Constraints: %d, Iterations: %d\n" - "Constraints x Iterations: %d (%d)\n" - "KE:% 5.2e"; - - cpArray *bodies = space->bodies; - cpFloat ke = 0.0f; - for(int i=0; inum; i++){ - cpBody *body = (cpBody *)bodies->arr[i]; - if(body->m == INFINITY || body->i == INFINITY) continue; - - ke += body->m*cpvdot(body->v, body->v) + body->i*body->w*body->w; - } - - sprintf(buffer, format, - arbiters, maxArbiters, - points, maxPoints, - space->constraints->num, space->iterations + space->elasticIterations, - constraints, maxConstraints, (ke < 1e-10f ? 0.0f : ke) - ); - - drawString(0, 220, buffer); -} - -static void -reshape(int width, int height) -{ - glViewport(0, 0, width, height); - - double rx = width / 2.0; - double ry = height / 2.0; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-rx, rx, -ry, ry, -1.0, 1.0); - glTranslated(0.5, 0.5, 0.0); -} - -static void -display(void) -{ - cpVect newPoint = cpvlerp(mousePoint_last, mousePoint, 0.25f); - mouseBody->p = newPoint; - mouseBody->v = cpvmult(cpvsub(newPoint, mousePoint_last), 60.0f); - mousePoint_last = newPoint; - if(!paused || step > 0){ - currDemo->updateFunc(ticks); - step = (step > 1 ? step - 1 : 0); - } - - glClear(GL_COLOR_BUFFER_BIT); - - drawSpace(space, currDemo->drawOptions ? currDemo->drawOptions : &options); - if(!paused){ - drawInstructions(); - drawInfo(); - } - drawString(-300, -210, messageString); - - glutSwapBuffers(); - ticks++; -} - -static char * -demoTitle(chipmunkDemo *demo) -{ - static char title[1024]; - sprintf(title, "Demo: %s", demo->name); - - return title; -} - -static void -runDemo(chipmunkDemo *demo) -{ - if(currDemo) - currDemo->destroyFunc(); - - currDemo = demo; - ticks = 0; - mouseJoint = NULL; - messageString[0] = '\0'; - maxArbiters = 0; - maxPoints = 0; - maxConstraints = 0; - space = currDemo->initFunc(); - - glutSetWindowTitle(demoTitle(currDemo)); -} - -static void -keyboard(unsigned char key, int x, int y) -{ - int index = key - 'a'; - - if(0 <= index && index < demoCount){ - runDemo(demos[index]); - } else if(key == '\r'){ - runDemo(currDemo); - } else if(key == '`'){ - paused = !paused; - } else if(key == '1'){ - step += 1; - } else if(key == '-'){ - options.drawHash = !options.drawHash; - } else if(key == '='){ - options.drawBBs = !options.drawBBs; - } else if(key == '\\'){ - glEnable(GL_LINE_SMOOTH); - glEnable(GL_POINT_SMOOTH); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glHint(GL_POINT_SMOOTH_HINT, GL_DONT_CARE); - } -} - -static cpVect -mouseToSpace(int x, int y) -{ - GLdouble model[16]; - glGetDoublev(GL_MODELVIEW_MATRIX, model); - - GLdouble proj[16]; - glGetDoublev(GL_PROJECTION_MATRIX, proj); - - GLint view[4]; - glGetIntegerv(GL_VIEWPORT, view); - - GLdouble mx, my, mz; - gluUnProject(x, glutGet(GLUT_WINDOW_HEIGHT) - y, 0.0f, model, proj, view, &mx, &my, &mz); - - return cpv(mx, my); -} - -static void -mouse(int x, int y) -{ - mousePoint = mouseToSpace(x, y); -} - -static void -click(int button, int state, int x, int y) -{ - if(button == GLUT_LEFT_BUTTON){ - if(state == GLUT_DOWN){ - cpVect point = mouseToSpace(x, y); - - cpShape *shape = cpSpacePointQueryFirst(space, point, GRABABLE_MASK_BIT, CP_NO_GROUP); - if(shape){ - cpBody *body = shape->body; - mouseJoint = cpPivotJointNew2(mouseBody, body, cpvzero, cpBodyWorld2Local(body, point)); - mouseJoint->maxForce = 50000.0f; - mouseJoint->biasCoef = 0.15f; - cpSpaceAddConstraint(space, mouseJoint); - } - } else if(mouseJoint){ - cpSpaceRemoveConstraint(space, mouseJoint); - cpConstraintFree(mouseJoint); - mouseJoint = NULL; - } - } -} - -static void -timercall(int value) -{ - glutTimerFunc(SLEEP_TICKS, timercall, 0); - - glutPostRedisplay(); -} - -static void -set_arrowDirection() -{ - int x = 0, y = 0; - - if(key_up) y += 1; - if(key_down) y -= 1; - if(key_right) x += 1; - if(key_left) x -= 1; - - arrowDirection = cpv(x, y); -} - -static void -arrowKeyDownFunc(int key, int x, int y) -{ - if(key == GLUT_KEY_UP) key_up = 1; - else if(key == GLUT_KEY_DOWN) key_down = 1; - else if(key == GLUT_KEY_LEFT) key_left = 1; - else if(key == GLUT_KEY_RIGHT) key_right = 1; - - set_arrowDirection(); -} - -static void -arrowKeyUpFunc(int key, int x, int y) -{ - if(key == GLUT_KEY_UP) key_up = 0; - else if(key == GLUT_KEY_DOWN) key_down = 0; - else if(key == GLUT_KEY_LEFT) key_left = 0; - else if(key == GLUT_KEY_RIGHT) key_right = 0; - - set_arrowDirection(); -} - -//static void -//idle(void) -//{ -// glutPostRedisplay(); -//} - -static void -initGL(void) -{ - glClearColor(1.0f, 1.0f, 1.0f, 0.0f); - - glEnableClientState(GL_VERTEX_ARRAY); -} - -static void -glutStuff(int argc, const char *argv[]) -{ - glutInit(&argc, (char**)argv); - - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); - - glutInitWindowSize(640, 480); - glutCreateWindow(demoTitle(demos[firstDemoIndex])); - - initGL(); - - glutReshapeFunc(reshape); - glutDisplayFunc(display); -// glutIdleFunc(idle); - glutTimerFunc(SLEEP_TICKS, timercall, 0); - - glutIgnoreKeyRepeat(1); - glutKeyboardFunc(keyboard); - - glutSpecialFunc(arrowKeyDownFunc); - glutSpecialUpFunc(arrowKeyUpFunc); - - glutMotionFunc(mouse); - glutPassiveMotionFunc(mouse); - glutMouseFunc(click); -} - -//#define TIME_TRIAL -#ifdef TIME_TRIAL -#include -#include -void time_trial(int index, int count) -{ - currDemo = demos[index]; - space = currDemo->initFunc(); - - struct timeval start_time, end_time; - gettimeofday(&start_time, NULL); - - for(int i=0; iupdateFunc(i); - - gettimeofday(&end_time, NULL); - long millisecs = (end_time.tv_sec - start_time.tv_sec)*1000; - millisecs += (end_time.tv_usec - start_time.tv_usec)/1000; - - currDemo->destroyFunc(); - - printf("Time(%c) = %ldms\n", index + 'a', millisecs); -} -#endif - -int -main(int argc, const char **argv) -{ - cpInitChipmunk(); - cp_collision_slop = 0.2f; - -#ifdef TIME_TRIAL - sleep(1); - for(int i=0; i -#include -#include - -#include "chipmunk.h" - -extern cpSpace *space; -extern cpBody *staticBody; - -#define WIDTH 200 -#define HEIGHT 40 - - -// Apply an approximate bouyancy and drag force to an object. -static void -apply_buoyancy(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - int numx = 20; - int numy = 4; - - float stepx = (float)WIDTH/(float)numx; - float stepy = (float)HEIGHT/(float)numy; - - cpBodyResetForces(body); -// glBegin(GL_POINTS); - for(int x=0; xp); - - if(p.y < 0){ - cpVect v = cpvadd(body->v, cpvmult(cpvperp(r), body->w)); - cpVect f_damp = cpvmult(v, -0.0003*cpvlength(v)); - cpVect f = cpvadd(cpv(0, 2.0), f_damp); - cpBodyApplyForce(body, f, r); - -// glVertex2f(p.x, p.y); - } - } - } -// glEnd(); - - cpBodyUpdateVelocity(body, gravity, damping, dt); -} - -void demo6_update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0/60.0/(cpFloat)steps; - - for(int i=0; ip = p; - body->v = v; - cpBodySetAngle(body, a); - body->w = w; - body->velocity_func = apply_buoyancy; - cpSpaceAddBody(space, body); - - cpShape *shape = cpPolyShapeNew(body, 4, verts, cpvzero); - shape->e = 0.0; shape->u = 0.7; - cpSpaceAddShape(space, shape); -} - -void demo6_init(void) -{ - staticBody = cpBodyNew(INFINITY, INFINITY); - - cpResetShapeIdCounter(); - space = cpSpaceNew(); - space->iterations = 5; - space->gravity = cpv(0, -100); - - cpSpaceResizeStaticHash(space, 40.0, 999); - cpSpaceResizeActiveHash(space, 30.0, 2999); - - cpShape *shape; - - // Screen border - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - // Reference line - // Does not collide with other objects, we just want to draw it. - shape = cpSegmentShapeNew(staticBody, cpv(-320,0), cpv(320,0), 0.0f); - shape->collision_type = 1; - cpSpaceAddStaticShape(space, shape); - // Add a collision pair function to filter collisions - cpSpaceAddCollisionPairFunc(space, 0, 1, NULL, NULL); - - // Create boxes - make_box(cpv(-150, 150), cpv(200, -100), M_PI/2.0, 0.0); - make_box(cpv(150, 150), cpv(0, -300), M_PI/4.0, 0.0); - make_box(cpv(0, 150), cpv(0, 200), 0.0, 0.0); - make_box(cpv(0, 250), cpv(50, 100), 0.0, 3.0); -} diff --git a/3rdparty/chipmunk-5.3.4/Demo/Demo7.c.old b/3rdparty/chipmunk-5.3.4/Demo/Demo7.c.old deleted file mode 100644 index 56dbc1d275..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Demo7.c.old +++ /dev/null @@ -1,326 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -*/ - -#include -#include -#include - -#include "chipmunk.h" - -// TODO clean this up - -extern cpSpace *space; -extern cpBody *staticBody; - -cpConstraint *constraint; -cpBody *chassis, *wheel1, *wheel2; - -void demo7_update(int ticks) -{ - int steps = 3; - cpFloat dt = 1.0/60.0/(cpFloat)steps; - - for(int i=0; ip = cpv(x, y); - cpSpaceAddBody(space, body); - cpShape *shape = cpPolyShapeNew(body, num, verts, cpv(0,0)); - shape->e = 0.0; shape->u = 1.0; - cpSpaceAddShape(space, shape); - - return body; -} - -void demo7_init(void) -{ - staticBody = cpBodyNew(INFINITY, INFINITY); - - cpResetShapeIdCounter(); - space = cpSpaceNew(); - space->iterations = 30; - cpSpaceResizeActiveHash(space, 50.0, 999); - cpSpaceResizeStaticHash(space, 50.0, 999); - space->gravity = cpv(0, -300); - - cpShape *shape; - - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(-320,70), cpv(0,-240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(0,-240), cpv(320,-200), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(200,-240), cpv(320,-100), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddStaticShape(space, shape); - - cpBody *body1, *body2, *body3, *body4, *body5, *body6, *body7; - - cpFloat jointMax = 300000.0f; - -// body1 = make_box(-100, 100); -// body2 = make_box(body1->p.x + 40, 100); -// body3 = make_box(body2->p.x + 40, 100); -// body4 = make_box(body3->p.x + 40, 100); -// body5 = make_box(body4->p.x + 40, 100); -// body6 = make_box(body5->p.x + 40, 100); -// body7 = make_box(body6->p.x + 40, 100); -// -// constraint = cpPivotJointNew(staticBody, body1, cpv(-120,100), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body1, body2, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body2, body3, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body3, body4, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body4, body5, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body5, body6, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body6, body7, cpv(20,0), cpv(-20,0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPivotJointNew(body7, staticBody, cpv(20,0), cpv(body7->p.x + 20, 100)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); - - - body1 = make_box(-100, 50); - body2 = make_box(body1->p.x + 40, 50); - body3 = make_box(body2->p.x + 40, 50); - body4 = make_box(body3->p.x + 40, 50); - body5 = make_box(body4->p.x + 40, 50); - body6 = make_box(body5->p.x + 40, 50); - body7 = make_box(body6->p.x + 40, 50); - - cpFloat max = 12.0f; - cpFloat min = 10.0f; - - constraint = cpSlideJointNew(staticBody, body1, cpv(body1->p.x - 15 - 10, 50), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body1, body2, cpv(15, 0), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body2, body3, cpv(15, 0), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body3, body4, cpv(15, 0), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body4, body5, cpv(15, 0), cpv(-15, 0), min, max); - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body5, body6, cpv(15, 0), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body6, body7, cpv(15, 0), cpv(-15, 0), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - - constraint = cpSlideJointNew(body7, staticBody, cpv(15, 0), cpv(body7->p.x + 15 + 10, 50), min, max); - constraint->maxForce = jointMax; - constraint = cpBreakableJointNew(constraint, space); - constraint->maxForce = jointMax; - cpSpaceAddConstraint(space, constraint); - -// body1 = make_box(-100, 150); -// body2 = make_box(body1->p.x + 40, 150); -// body3 = make_box(body2->p.x + 40, 150); -// body4 = make_box(body3->p.x + 40, 150); -// body5 = make_box(body4->p.x + 40, 150); -// body6 = make_box(body5->p.x + 40, 150); -// body7 = make_box(body6->p.x + 40, 150); -// -// constraint = cpPinJointNew(staticBody, body1, cpv(body1->p.x - 15 - 10, 150), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body1, body2, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body2, body3, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body3, body4, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body4, body5, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body5, body6, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body6, body7, cpv(15, 0), cpv(-15, 0)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); -// -// constraint = cpPinJointNew(body7, staticBody, cpv(15, 0), cpv(body7->p.x + 15 + 10, 150)); -// constraint = cpBreakableJointNew(constraint, space); -// constraint->maxForce = jointMax; -// cpSpaceAddConstraint(space, constraint); - -// body1 = make_box(190, 200); -// constraint = cpGrooveJointNew(staticBody, body1, cpv(0, 195), cpv(250, 200), cpv(-15, 0)); -// cpSpaceAddConstraint(space, constraint); - - int num = 4; - cpVect verts[] = { - cpv(-20,-15), - cpv(-20, 15), - cpv( 20, 15), - cpv( 20,-15), - }; - - chassis = cpBodyNew(10.0, cpMomentForPoly(10.0, num, verts, cpv(0,0))); - chassis->p = cpv(-200, 150); -// body->v = cpv(200, 0); - cpSpaceAddBody(space, chassis); - shape = cpPolyShapeNew(chassis, num, verts, cpv(0,0)); - shape->e = 0.0; shape->u = 1.0; - cpSpaceAddShape(space, shape); - - cpFloat radius = 15; - cpFloat wheel_mass = 2; - cpVect offset = cpv(radius + 30, -40); - cpFloat stiffness = 600.0f; - cpFloat damping = 1.0f; - - wheel1 = cpBodyNew(wheel_mass, cpMomentForCircle(wheel_mass, 0.0, radius, cpvzero)); - wheel1->p = cpvadd(chassis->p, offset); - wheel1->v = chassis->v; - cpSpaceAddBody(space, wheel1); - shape = cpCircleShapeNew(wheel1, radius, cpvzero); - shape->e = 0.0; shape->u = 2.5; - cpSpaceAddShape(space, shape); - - constraint = cpPinJointNew(chassis, wheel1, cpvzero, cpvzero); - cpSpaceAddConstraint(space, constraint); - - constraint = cpDampedSpringNew(chassis, wheel1, cpv(offset.x, offset.y), cpvzero, 0.0f, stiffness, damping); - cpSpaceAddConstraint(space, constraint); - - - - wheel2 = cpBodyNew(wheel_mass, cpMomentForCircle(wheel_mass, 0.0, radius, cpvzero)); - wheel2->p = cpvadd(chassis->p, cpv(-offset.x, offset.y)); - wheel2->v = chassis->v; - cpSpaceAddBody(space, wheel2); - shape = cpCircleShapeNew(wheel2, radius, cpvzero); - shape->e = 0.0; shape->u = 2.5; - cpSpaceAddShape(space, shape); - - constraint = cpPinJointNew(chassis, wheel2, cpvzero, cpvzero); - cpSpaceAddConstraint(space, constraint); - - constraint = cpDampedSpringNew(chassis, wheel2, cpv(-offset.x, offset.y), cpvzero, 0.0f, stiffness, damping); - cpSpaceAddConstraint(space, constraint); -} diff --git a/3rdparty/chipmunk-5.3.4/Demo/Joints.c b/3rdparty/chipmunk-5.3.4/Demo/Joints.c deleted file mode 100644 index 2966aca371..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Joints.c +++ /dev/null @@ -1,293 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static cpBody * -addBall(cpVect pos, cpVect boxOffset) -{ - cpFloat radius = 15.0f; - cpFloat mass = 1.0f; - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForCircle(mass, 0.0f, radius, cpvzero))); - body->p = cpvadd(pos, boxOffset); - - cpShape *shape = cpSpaceAddShape(space, cpCircleShapeNew(body, radius, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - - return body; -} - -static cpBody * -addLever(cpVect pos, cpVect boxOffset) -{ - cpFloat mass = 1.0f; - cpVect a = cpv(0, 15); - cpVect b = cpv(0, -15); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass, a, b))); - body->p = cpvadd(pos, cpvadd(boxOffset, cpv(0, -15))); - - cpShape *shape = cpSpaceAddShape(space, cpSegmentShapeNew(body, a, b, 5.0f)); - shape->e = 0.0f; shape->u = 0.7f; - - return body; -} - -static cpBody * -addBar(cpVect pos, cpVect boxOffset) -{ - cpFloat mass = 2.0f; - cpVect a = cpv(0, 30); - cpVect b = cpv(0, -30); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass, a, b))); - body->p = cpvadd(pos, boxOffset); - - cpShape *shape = cpSpaceAddShape(space, cpSegmentShapeNew(body, a, b, 5.0f)); - shape->e = 0.0f; shape->u = 0.7f; - - return body; -} - -static cpBody * -addWheel(cpVect pos, cpVect boxOffset) -{ - cpFloat radius = 15.0f; - cpFloat mass = 1.0f; - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForCircle(mass, 0.0f, radius, cpvzero))); - body->p = cpvadd(pos, boxOffset); - - cpShape *shape = cpSpaceAddShape(space, cpCircleShapeNew(body, radius, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - shape->group = 1; // use a group to keep the car parts from colliding - - return body; -} - -static cpBody * -addChassis(cpVect pos, cpVect boxOffset) -{ - int num = 4; - cpVect verts[] = { - cpv(-40,-15), - cpv(-40, 15), - cpv( 40, 15), - cpv( 40,-15), - }; - - - cpFloat mass = 5.0f; - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, num, verts, cpvzero))); - body->p = cpvadd(pos, boxOffset); - - cpShape *shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - shape->group = 1; // use a group to keep the car parts from colliding - - return body; -} - -static cpSpace * -init(void) -{ - space = cpSpaceNew(); - space->iterations = 10; - space->gravity = cpv(0, -100); - space->sleepTimeThreshold = 0.5f; - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,120), cpv(320,120), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,0), cpv(320,0), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-120), cpv(320,-120), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-160,-240), cpv(-160,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(0,-240), cpv(0,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(160,-240), cpv(160,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - cpVect boxOffset; - cpBody *body1, *body2; - - cpVect posA = cpv( 50, 60); - cpVect posB = cpv(110, 60); - - #define POS_A cpvadd(boxOffset, posA) - #define POS_B cpvadd(boxOffset, posB) - - // Pin Joints - Link shapes with a solid bar or pin. - // Keeps the anchor points the same distance apart from when the joint was created. - boxOffset = cpv(-320, -240); - body1 = addBall(posA, boxOffset); - body2 = addBall(posB, boxOffset); - cpSpaceAddConstraint(space, cpPinJointNew(body1, body2, cpv(15,0), cpv(-15,0))); - - // Slide Joints - Like pin joints but with a min/max distance. - // Can be used for a cheap approximation of a rope. - boxOffset = cpv(-160, -240); - body1 = addBall(posA, boxOffset); - body2 = addBall(posB, boxOffset); - cpSpaceAddConstraint(space, cpSlideJointNew(body1, body2, cpv(15,0), cpv(-15,0), 20.0f, 40.0f)); - - // Pivot Joints - Holds the two anchor points together. Like a swivel. - boxOffset = cpv(0, -240); - body1 = addBall(posA, boxOffset); - body2 = addBall(posB, boxOffset); - cpSpaceAddConstraint(space, cpPivotJointNew(body1, body2, cpvadd(boxOffset, cpv(80,60)))); - // cpPivotJointNew() takes it's anchor parameter in world coordinates. The anchors are calculated from that - // cpPivotJointNew2() lets you specify the two anchor points explicitly - - // Groove Joints - Like a pivot joint, but one of the anchors is a line segment that the pivot can slide in - boxOffset = cpv(160, -240); - body1 = addBall(posA, boxOffset); - body2 = addBall(posB, boxOffset); - cpSpaceAddConstraint(space, cpGrooveJointNew(body1, body2, cpv(30,30), cpv(30,-30), cpv(-30,0))); - - // Damped Springs - boxOffset = cpv(-320, -120); - body1 = addBall(posA, boxOffset); - body2 = addBall(posB, boxOffset); - cpSpaceAddConstraint(space, cpDampedSpringNew(body1, body2, cpv(15,0), cpv(-15,0), 20.0f, 5.0f, 0.3f)); - - // Damped Rotary Springs - boxOffset = cpv(-160, -120); - body1 = addBar(posA, boxOffset); - body2 = addBar(posB, boxOffset); - // Add some pin joints to hold the circles in place. - cpSpaceAddConstraint(space, cpPivotJointNew(body1, staticBody, POS_A)); - cpSpaceAddConstraint(space, cpPivotJointNew(body2, staticBody, POS_B)); - cpSpaceAddConstraint(space, cpDampedRotarySpringNew(body1, body2, 0.0f, 3000.0f, 60.0f)); - - // Rotary Limit Joint - boxOffset = cpv(0, -120); - body1 = addLever(posA, boxOffset); - body2 = addLever(posB, boxOffset); - // Add some pin joints to hold the circles in place. - cpSpaceAddConstraint(space, cpPivotJointNew(body1, staticBody, POS_A)); - cpSpaceAddConstraint(space, cpPivotJointNew(body2, staticBody, POS_B)); - // Hold their rotation within 90 degrees of each other. - cpSpaceAddConstraint(space, cpRotaryLimitJointNew(body1, body2, -M_PI_2, M_PI_2)); - - // Ratchet Joint - A rotary ratchet, like a socket wrench - boxOffset = cpv(160, -120); - body1 = addLever(posA, boxOffset); - body2 = addLever(posB, boxOffset); - // Add some pin joints to hold the circles in place. - cpSpaceAddConstraint(space, cpPivotJointNew(body1, staticBody, POS_A)); - cpSpaceAddConstraint(space, cpPivotJointNew(body2, staticBody, POS_B)); - // Ratchet every 90 degrees - cpSpaceAddConstraint(space, cpRatchetJointNew(body1, body2, 0.0f, M_PI_2)); - - // Gear Joint - Maintain a specific angular velocity ratio - boxOffset = cpv(-320, 0); - body1 = addBar(posA, boxOffset); - body2 = addBar(posB, boxOffset); - // Add some pin joints to hold the circles in place. - cpSpaceAddConstraint(space, cpPivotJointNew(body1, staticBody, POS_A)); - cpSpaceAddConstraint(space, cpPivotJointNew(body2, staticBody, POS_B)); - // Force one to sping 2x as fast as the other - cpSpaceAddConstraint(space, cpGearJointNew(body1, body2, 0.0f, 2.0f)); - - // Simple Motor - Maintain a specific angular relative velocity - boxOffset = cpv(-160, 0); - body1 = addBar(posA, boxOffset); - body2 = addBar(posB, boxOffset); - // Add some pin joints to hold the circles in place. - cpSpaceAddConstraint(space, cpPivotJointNew(body1, staticBody, POS_A)); - cpSpaceAddConstraint(space, cpPivotJointNew(body2, staticBody, POS_B)); - // Make them spin at 1/2 revolution per second in relation to each other. - cpSpaceAddConstraint(space, cpSimpleMotorNew(body1, body2, M_PI)); - - // Make a car with some nice soft suspension - boxOffset = cpv(0, 0); - cpBody *wheel1 = addWheel(posA, boxOffset); - cpBody *wheel2 = addWheel(posB, boxOffset); - cpBody *chassis = addChassis(cpv(80, 100), boxOffset); - - cpSpaceAddConstraint(space, cpGrooveJointNew(chassis, wheel1, cpv(-30, -10), cpv(-30, -40), cpvzero)); - cpSpaceAddConstraint(space, cpGrooveJointNew(chassis, wheel2, cpv( 30, -10), cpv( 30, -40), cpvzero)); - - cpSpaceAddConstraint(space, cpDampedSpringNew(chassis, wheel1, cpv(-30, 0), cpvzero, 50.0f, 20.0f, 1.5f)); - cpSpaceAddConstraint(space, cpDampedSpringNew(chassis, wheel2, cpv( 30, 0), cpvzero, 50.0f, 20.0f, 1.5f)); - - return space; -} - -static void -update(int ticks) -{ - cpSpaceStep(space, 1.0f/60.0f); -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Joints = { - "Joints and Constraints", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/LogoSmash.c b/3rdparty/chipmunk-5.3.4/Demo/LogoSmash.c deleted file mode 100644 index d741263808..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/LogoSmash.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static const int image_width = 188; -static const int image_height = 35; -static const int image_row_length = 24; - -static const unsigned char image_bitmap[] = { - 15,-16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,-64,15,63,-32,-2,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,31,-64,15,127,-125,-1,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,127,-64,15,127,15,-1,-64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,-64,15,-2, - 31,-1,-64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,-64,0,-4,63,-1,-32,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,1,-1,-64,15,-8,127,-1,-32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,-1,-64,0,-8,-15,-1,-32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-31,-1,-64,15,-8,-32, - -1,-32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,-15,-1,-64,9,-15,-32,-1,-32,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,31,-15,-1,-64,0,-15,-32,-1,-32,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,63,-7,-1,-64,9,-29,-32,127,-61,-16,63,15,-61,-1,-8,31,-16,15,-8,126,7,-31, - -8,31,-65,-7,-1,-64,9,-29,-32,0,7,-8,127,-97,-25,-1,-2,63,-8,31,-4,-1,15,-13, - -4,63,-1,-3,-1,-64,9,-29,-32,0,7,-8,127,-97,-25,-1,-2,63,-8,31,-4,-1,15,-13, - -2,63,-1,-3,-1,-64,9,-29,-32,0,7,-8,127,-97,-25,-1,-1,63,-4,63,-4,-1,15,-13, - -2,63,-33,-1,-1,-32,9,-25,-32,0,7,-8,127,-97,-25,-1,-1,63,-4,63,-4,-1,15,-13, - -1,63,-33,-1,-1,-16,9,-25,-32,0,7,-8,127,-97,-25,-1,-1,63,-4,63,-4,-1,15,-13, - -1,63,-49,-1,-1,-8,9,-57,-32,0,7,-8,127,-97,-25,-8,-1,63,-2,127,-4,-1,15,-13, - -1,-65,-49,-1,-1,-4,9,-57,-32,0,7,-8,127,-97,-25,-8,-1,63,-2,127,-4,-1,15,-13, - -1,-65,-57,-1,-1,-2,9,-57,-32,0,7,-8,127,-97,-25,-8,-1,63,-2,127,-4,-1,15,-13, - -1,-1,-57,-1,-1,-1,9,-57,-32,0,7,-1,-1,-97,-25,-8,-1,63,-1,-1,-4,-1,15,-13,-1, - -1,-61,-1,-1,-1,-119,-57,-32,0,7,-1,-1,-97,-25,-8,-1,63,-1,-1,-4,-1,15,-13,-1, - -1,-61,-1,-1,-1,-55,-49,-32,0,7,-1,-1,-97,-25,-8,-1,63,-1,-1,-4,-1,15,-13,-1, - -1,-63,-1,-1,-1,-23,-49,-32,127,-57,-1,-1,-97,-25,-1,-1,63,-1,-1,-4,-1,15,-13, - -1,-1,-63,-1,-1,-1,-16,-49,-32,-1,-25,-1,-1,-97,-25,-1,-1,63,-33,-5,-4,-1,15, - -13,-1,-1,-64,-1,-9,-1,-7,-49,-32,-1,-25,-8,127,-97,-25,-1,-1,63,-33,-5,-4,-1, - 15,-13,-1,-1,-64,-1,-13,-1,-32,-49,-32,-1,-25,-8,127,-97,-25,-1,-2,63,-49,-13, - -4,-1,15,-13,-1,-1,-64,127,-7,-1,-119,-17,-15,-1,-25,-8,127,-97,-25,-1,-2,63, - -49,-13,-4,-1,15,-13,-3,-1,-64,127,-8,-2,15,-17,-1,-1,-25,-8,127,-97,-25,-1, - -8,63,-49,-13,-4,-1,15,-13,-3,-1,-64,63,-4,120,0,-17,-1,-1,-25,-8,127,-97,-25, - -8,0,63,-57,-29,-4,-1,15,-13,-4,-1,-64,63,-4,0,15,-17,-1,-1,-25,-8,127,-97, - -25,-8,0,63,-57,-29,-4,-1,-1,-13,-4,-1,-64,31,-2,0,0,103,-1,-1,-57,-8,127,-97, - -25,-8,0,63,-57,-29,-4,-1,-1,-13,-4,127,-64,31,-2,0,15,103,-1,-1,-57,-8,127, - -97,-25,-8,0,63,-61,-61,-4,127,-1,-29,-4,127,-64,15,-8,0,0,55,-1,-1,-121,-8, - 127,-97,-25,-8,0,63,-61,-61,-4,127,-1,-29,-4,63,-64,15,-32,0,0,23,-1,-2,3,-16, - 63,15,-61,-16,0,31,-127,-127,-8,31,-1,-127,-8,31,-128,7,-128,0,0 -}; - -static inline int -get_pixel(int x, int y) -{ - return (image_bitmap[(x>>3) + y*image_row_length]>>(~x&0x7)) & 1; -} - -static cpSpace *space; - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip = cpv(x, y); - - cpShape *shape = cpCircleShapeNew(body, 0.95f, cpvzero); - shape->e = 0.0f; shape->u = 0.0f; - - return shape; -} - -static cpSpace * -init(void) -{ - space = cpSpaceNew(); - cpSpaceResizeActiveHash(space, 2.0f, 10000); - cpSpaceResizeStaticHash(space, 2.0f, 10000); - space->iterations = 1; - - cpBody *body; - cpShape *shape; - - for(int y=0; ybody); - cpSpaceAddShape(space, shape); - } - } - - body = cpSpaceAddBody(space, cpBodyNew(INFINITY, INFINITY)); - body->p = cpv(-1000.0f, -10.0f); - body->v = cpv(400.0f, 0.0f); - - shape = cpSpaceAddShape(space, cpCircleShapeNew(body, 8.0f, cpvzero)); - shape->e = 0.0f; shape->u = 0.0f; - shape->layers = NOT_GRABABLE_MASK; - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -drawSpaceOptions draw_options = { - 0, 0, 0, 2.0f, 3.0f, 0.0f, -}; - -chipmunkDemo LogoSmash = { - "Logo Smash", - &draw_options, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/MagnetsElectric.c b/3rdparty/chipmunk-5.3.4/Demo/MagnetsElectric.c deleted file mode 100644 index 4c0dc89d2d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/MagnetsElectric.c +++ /dev/null @@ -1,501 +0,0 @@ -// This Demo was written by Juan Pablo Carbajal. Nov 2008. - -#include -#include -#include -#include -#include - -#include "chipmunk_private.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -#define WIDTH 600 -#define HEIGHT 400 - -#define SINGMAX 10 // Maximum number of singularities per body -#define NMAG 10 // Number of magnets -#define NCHG 10 // Number of charged bodies -#define NMIX 10 // Number of charged magnets - -#define COU_MKS 8.987551787e9 // Some physical constants -#define MAG_MKS 1e-7 - -// Prototypes -struct DataforForce; -typedef void (*SingForceFunc)(struct DataforForce* data); - -// Structures -// Singularities -typedef struct ActorSingularity{ - // Number of singularities - int Nsing; - // Value of the singularities - cpFloat value[SINGMAX]; - // Type of the singularities - char type[SINGMAX][100]; - // Global position of the singularities - cpVect Gpos[SINGMAX]; - // Local position of the singularities - cpVect position[SINGMAX]; - // Angle of the singularities measured in the body axes - cpFloat angle[SINGMAX]; - // Angle of the singularities measured from x - cpFloat Gangle[SINGMAX]; - // Force function - SingForceFunc force_func[SINGMAX]; - // Force function - SingForceFunc torque_func[SINGMAX]; -}Sing; - -// Data for the force functions -typedef struct DataforForce{ - //Everything in global coordinates - // Position of the source - cpVect p0; - // Observed position - cpVect p; - // Relative position source-observed - cpVect relp; - // distance, disntace^2, ditance ^3 - cpFloat r[3]; - // angle of the source - cpFloat ang0; - // angle of the observed singularity - cpFloat ang; - // Foce value - cpVect F; - // Torque value - cpFloat T; -}ForceData; - -// Global Varibales -static cpSpace *space; - - -// **** Forces ****** // -// Calculate the forces between two bodies. all this functions requieres -// a pointer to an structure with the necessary fields. - -// forces between charges -static void -CoulombForce(ForceData* data){ - data->F=cpvmult(cpvnormalize(data->relp),COU_MKS/data->r[1]); -} - -// forces between magnets -static void -MagDipoleForce(ForceData* data){ - static cpFloat phi,alpha,beta,Fr,Fphi; - - // Angle of the relative position vector - phi=cpvtoangle(data->relp); - alpha=data->ang0; - beta=data->ang; - - alpha =phi - alpha; - beta = phi - beta; - - - // Components in polar coordinates - Fr=(2.0e0*cos(alpha)*cos(beta) - sin(alpha)*sin(beta)); - Fphi=sin(alpha+beta); -// printf("%g %g %g %g %g\n",phi,alpha,beta,Fphi); - - // Cartesian coordinates - data->F=cpv(Fr*cos(phi)-Fphi*sin(phi),Fr*sin(phi)+Fphi*cos(phi)); - data->F=cpvmult(data->F,-3.e0*MAG_MKS/(data->r[1]*data->r[1])); -} - -static void -MagDipoleTorque(ForceData* data){ - static cpFloat phi,alpha,beta; - - phi=cpvtoangle(data->relp); - alpha=data->ang0; - beta=data->ang; - alpha =phi - alpha; - beta = phi - beta; - - // Torque. Though we could use a component of F to save some space, - // we use another variables for the sake of clarity. - - data->T=(MAG_MKS/data->r[2])*(3.0e0*cos(alpha)*sin(beta) + sin(alpha-beta)); -} -// ******* // - -// This function fills the data structure for the force functions -// The structure Sing has the information about the singularity (charge or magnet) -static void -FillForceData(Sing* source,int inds, Sing* obs,int indo, ForceData* data) -{ - // Global Position and orientation of the source singularity - data->p0=source->Gpos[inds]; - data->ang0=source->Gangle[inds]; - - // Global Position and orientation of the observed singularity - data->p=obs->Gpos[indo]; - data->ang=obs->Gangle[indo]; - - // Derived magnitudes - data->relp=cpvsub(data->p,data->p0); //Relative position - data->r[0]=cpvlength(data->relp); // Distance - data->r[1]=cpvlengthsq(data->relp); // Square Distance - data->r[2]=data->r[0]*data->r[1]; // Cubic distance - - source->force_func[inds](data); // The value of the force - data->F= cpvmult(data->F,source->value[inds]*obs->value[indo]); -} - -// Calculation of the interaction -static void -LRangeForceApply(cpBody *a, cpBody *b){ - - Sing* aux = (Sing*)a->data; - Sing* aux2 = (Sing*)b->data; - cpVect delta; - // General data needed to calculate interaction - static ForceData fdata; - fdata.F=cpvzero; - - // Calculate the forces between the charges of different bodies - for (int i=0; iNsing; i++) - { - for (int j=0; jNsing; j++) - { - if(!strcmp(aux->type[i],aux2->type[j])) - { - //printf("%s %s\n",aux->type[i],aux2->type[j]); - FillForceData (aux2,j,aux,i,&fdata); - - //Force applied to body A - delta=cpvsub(aux->Gpos[i], a->p); - cpBodyApplyForce(a,fdata.F, delta); - - if(aux->torque_func[i] != NULL) - { - //Torque on A - aux->torque_func[i](&fdata); - a->t += aux->value[i]*aux2->value[j]*fdata.T; - - } - } - } - } -} - -// function for the integration of the positions -// The following functions are variations to the starndrd integration in Chipmunk -// you can go ack to the standard ones by doing the appropiate changes. -static void -ChargedBodyUpdatePositionVerlet(cpBody *body, cpFloat dt) -{ - // Long range interaction - cpArray *bodies = space->bodies; - static cpBody* B; - Sing* aux=(Sing*)body->data; - Sing* aux2; - - // General data needed to calculate interaction - static ForceData fdata; - fdata.F=cpvzero; - - for(int i=0; i< bodies->num; i++) - { - B=(cpBody*)bodies->arr[i]; - aux2=(Sing*)B->data; - - if(B != body) - { - // Calculate the forces between the singularities of different bodies - LRangeForceApply(body, B); - } - } - - cpVect dp = cpvmult(cpvadd(body->v, body->v_bias), dt); - dp = cpvadd(dp,cpvmult(cpvmult(body->f, body->m_inv), 0.5e0*dt*dt)); - body->p = cpvadd(body->p, dp); - - cpBodySetAngle(body, body->a + (body->w + body->w_bias)*dt - + 0.5*body->t*body->i_inv*dt*dt); - - // Update position of the singularities - aux = (Sing*)body->data; - for (int i=0; iNsing; i++) - { - aux->Gpos[i]=cpvadd(body->p,cpvrotate(cpv(aux->position[i].x, - aux->position[i].y), body->rot)); - aux->Gangle[i]= aux->angle[i] + body->a; - } - - - body->v_bias = cpvzero; - body->w_bias = 0.0f; -} - -// function for the integration of the velocities -static void -ChargedBodyUpdateVelocityVerlet(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - body->v = cpvadd(body->v, cpvmult(cpvadd(gravity, cpvmult(body->f, body->m_inv)), 0.5e0*dt)); - body->w = body->w + body->t*body->i_inv*0.5e0*dt; - - body->f = cpvzero; - body->t = 0.0e0; - - // Long range interaction - cpArray *bodies = space->bodies; - static cpBody* B; - - // General data needed to calculate interaction - static ForceData fdata; - fdata.F=cpvzero; - - for(int i=0; i< bodies->num; i++) - { - B=(cpBody*)bodies->arr[i]; - - if(B != body) - { - // Calculate the forces between the singularities of different bodies - LRangeForceApply(body, B); - } - } - body->v = cpvadd(cpvmult(body->v,damping), cpvmult(cpvadd(gravity, cpvmult(body->f, body->m_inv)), 0.5e0*dt)); - body->w = body->w*damping + body->t*body->i_inv*0.5e0*dt; -} - -static void -update(int ticks) -{ - int steps = 10; - cpFloat dt = 1.0/60.0/(cpFloat)steps; - - cpArray *bodies = space->bodies; - - for(int i=0; i< bodies->num; i++) - cpBodyResetForces((cpBody*)bodies->arr[i]); - - for(int i=0; ip = p; - body->v = cpvzero; - cpBodySetAngle(body, ang); - body->w = 0.0e0; - - // Load the singularities - Sing *magnet=(Sing*)cpmalloc(sizeof(Sing)); - magnet->Nsing=1; - magnet->value[0]=mag; - sprintf(magnet->type[0],"magdipole"); - - // The position and angle could be different form the one of the body - magnet->position[0]=cpvzero; - magnet->Gpos[0]=cpvadd(p,magnet->position[0]); - magnet->angle[0]=0.0f; - magnet->Gangle[0]=ang; - - magnet->force_func[0]=MagDipoleForce; - magnet->torque_func[0]=MagDipoleTorque; - - body->data=magnet; - - body->position_func=ChargedBodyUpdatePositionVerlet; - body->velocity_func=ChargedBodyUpdateVelocityVerlet; - cpSpaceAddBody(space, body); - - cpShape *shape = cpPolyShapeNew(body, nverts, verts, cpvzero); - shape->e = 0.0; shape->u = 0.7; - cpSpaceAddShape(space, shape); -} - -static void -make_charged(cpVect p, cpFloat chg) -{ - int nverts=4; - cpVect verts[] = { - cpv(-10,-10), - cpv(-10, 10), - cpv( 10, 10), - cpv( 10,-10) - }; - - cpBody *body = cpBodyNew(1.0, cpMomentForPoly(1.0, nverts, verts, cpvzero)); - body->p = p; - body->v = cpvzero; - cpBodySetAngle(body, 0); - body->w = 0.0e0; - - // Load the singularities - Sing *charge=(Sing*)cpmalloc(sizeof(Sing));; - charge->Nsing=1; - charge->value[0]=chg; - sprintf(charge->type[0],"electrical"); - - // The position and angle could be different form the one of the body - charge->position[0]=cpvzero; - charge->Gpos[0]=cpvadd(p,charge->position[0]); - charge->Gangle[0]=0; - - charge->force_func[0]=CoulombForce; - charge->torque_func[0]=NULL; - - body->data=charge; - - body->position_func=ChargedBodyUpdatePositionVerlet; - body->velocity_func=ChargedBodyUpdateVelocityVerlet; - cpSpaceAddBody(space, body); - - cpShape *shape = cpPolyShapeNew(body, nverts, verts, cpvzero); - shape->e = 0.0; shape->u = 0.7; - cpSpaceAddShape(space, shape); -} -void -make_mix(cpVect p, cpFloat ang, cpFloat mag,cpFloat chg) -{ - int nverts=5; - cpVect verts[] = { - cpv(-10,-10), - cpv(-10, 10), - cpv( 10, 10), - cpv( 20, 0), - cpv( 10,-10) - }; - - cpBody *body = cpBodyNew(1.0, cpMomentForPoly(1.0, nverts, verts, cpvzero)); - body->p = p; - body->v = cpvzero; - cpBodySetAngle(body, ang); - body->w = 0.0e0; - - // Load the singularities - Sing *mix=(Sing*)cpmalloc(sizeof(Sing));; - mix->Nsing=2; - mix->value[0]=mag; - mix->value[1]=chg; - sprintf(mix->type[0],"magdipole"); - sprintf(mix->type[1],"electrical"); - - // The position and angle could be different form the one of the body - mix->position[0]=cpvzero; - mix->Gpos[0]=cpvadd(p,mix->position[0]); - mix->position[1]=cpvzero; - mix->Gpos[1]=cpvadd(p,mix->position[1]); - mix->Gangle[0]=ang; - mix->Gangle[1]=ang; - - mix->force_func[0]=MagDipoleForce; - mix->force_func[1]=CoulombForce; - mix->torque_func[0]=MagDipoleTorque; - mix->torque_func[1]=NULL; - - body->data=mix; - - body->position_func=ChargedBodyUpdatePositionVerlet; - body->velocity_func=ChargedBodyUpdateVelocityVerlet; - cpSpaceAddBody(space, body); - - cpShape *shape = cpPolyShapeNew(body, nverts, verts, cpvzero); - shape->e = 0.0; shape->u = 0.7; - cpSpaceAddShape(space, shape); -} - - -static cpSpace* -init(void) -{ - cpResetShapeIdCounter(); - space = cpSpaceNew(); - space->iterations = 5; - space->gravity = cpvzero; //cpv(0,-100); - - cpSpaceResizeActiveHash(space, 30.0, 2999); - - // Screen border -/* shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f); - shape->e = 1.0; shape->u = 1.0; - cpSpaceAddShape(space, shape); - - // Reference line - // Does not collide with other objects, we just want to draw it. - shape = cpSegmentShapeNew(staticBody, cpv(-320,0), cpv(320,0), 0.0f); - shape->collision_type = 1; - cpSpaceAddShape(space, shape); - // Add a collision pair function to filter collisions - cpSpaceAddCollisionPairFunc(space, 0, 1, NULL, NULL); -*/ - - srand((unsigned int) time(NULL)); - cpVect p; - cpFloat ang; - - // Create magnets - for(int i=0; i -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -typedef struct OneWayPlatform { - cpVect n; // direction objects may pass through -} OneWayPlatform; - -static OneWayPlatform platformInstance; - -static cpBool -preSolve(cpArbiter *arb, cpSpace *space, void *ignore) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - OneWayPlatform *platform = (OneWayPlatform *)a->data; - - if(cpvdot(cpArbiterGetNormal(arb, 0), platform->n) < 0){ - cpArbiterIgnore(arb); - return cpFalse; - } - - return cpTrue; -} - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 10; - space->gravity = cpv(0, -100); - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - // Add our one way segment - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-160,-100), cpv(160,-100), 10.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->collision_type = 1; - shape->layers = NOT_GRABABLE_MASK; - - // We'll use the data pointer for the OneWayPlatform struct - platformInstance.n = cpv(0, 1); // let objects pass upwards - shape->data = &platformInstance; - - - // Add a ball to make things more interesting - cpFloat radius = 15.0f; - body = cpSpaceAddBody(space, cpBodyNew(10.0f, cpMomentForCircle(10.0f, 0.0f, radius, cpvzero))); - body->p = cpv(0, -200); - body->v = cpv(0, 170); - - shape = cpSpaceAddShape(space, cpCircleShapeNew(body, radius, cpvzero)); - shape->e = 0.0f; shape->u = 0.9f; - shape->collision_type = 2; - - cpSpaceAddCollisionHandler(space, 1, 2, NULL, preSolve, NULL, NULL, NULL); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo OneWay = { - "One Way Platforms", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Planet.c b/3rdparty/chipmunk-5.3.4/Demo/Planet.c deleted file mode 100644 index 970e1000dc..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Planet.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; -static cpBody *planetBody; - -static cpFloat gravityStrength = 5.0e6f; - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip; - cpFloat sqdist = cpvlengthsq(p); - cpVect g = cpvmult(p, -gravityStrength / (sqdist * cpfsqrt(sqdist))); - - cpBodyUpdateVelocity(body, g, damping, dt); -} - -static cpVect -rand_pos(cpFloat radius) -{ - cpVect v; - do { - v = cpv(frand()*(640 - 2*radius) - (320 - radius), frand()*(480 - 2*radius) - (240 - radius)); - } while(cpvlength(v) < 85.0f); - - return v; -} - -static void -add_box() -{ - const cpFloat size = 10.0f; - const cpFloat mass = 1.0f; - - cpVect verts[] = { - cpv(-size,-size), - cpv(-size, size), - cpv( size, size), - cpv( size,-size), - }; - - cpFloat radius = cpvlength(cpv(size, size)); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, 4, verts, cpvzero))); - body->velocity_func = planetGravityVelocityFunc; - body->p = rand_pos(radius); - - // Set the box's velocity to put it into a circular orbit from its - // starting position. - cpFloat r = cpvlength(body->p); - cpFloat v = cpfsqrt(gravityStrength / r) / r; - body->v = cpvmult(cpvperp(body->p), v); - - // Set the box's angular velocity to match its orbital period and - // align its initial angle with its position. - body->w = v; - cpBodySetAngle(body, cpfatan2(body->p.y, body->p.x)); - - cpShape *shape = cpSpaceAddShape(space, cpPolyShapeNew(body, 4, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; -} - -static cpSpace * -init(void) -{ - planetBody = cpBodyNew(INFINITY, INFINITY); - planetBody->w = 0.2f; - - cpResetShapeIdCounter(); - - space = cpSpaceNew(); - cpSpaceResizeActiveHash(space, 30.0f, 10000); - space->iterations = 20; - - for(int i=0; i<30; i++) - add_box(); - - cpShape *shape = cpSpaceAddShape(space, cpCircleShapeNew(planetBody, 70.0f, cpvzero)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - return space; -} - -static void -destroy(void) -{ - cpBodyFree(planetBody); - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Planet = { - "Planet", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Player.c b/3rdparty/chipmunk-5.3.4/Demo/Player.c deleted file mode 100644 index c2bd40ee9a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Player.c +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -typedef struct PlayerStruct { - cpFloat u; - cpShape *shape; - cpVect groundNormal; - cpArray *groundShapes; -} PlayerStruct; - -PlayerStruct playerInstance; - -static cpBool -begin(cpArbiter *arb, cpSpace *space, void *ignore) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - PlayerStruct *player = (PlayerStruct *)a->data; - - cpVect n = cpvneg(cpArbiterGetNormal(arb, 0)); - if(n.y > 0.0f){ - cpArrayPush(player->groundShapes, b); - } - - return cpTrue; -} - -static cpBool -preSolve(cpArbiter *arb, cpSpace *space, void *ignore) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - PlayerStruct *player = (PlayerStruct *)a->data; - - if(cpArbiterIsFirstContact(arb)){ - a->u = player->u; - - // pick the most upright jump normal each frame - cpVect n = cpvneg(cpArbiterGetNormal(arb, 0)); - if(n.y >= player->groundNormal.y){ - player->groundNormal = n; - } - } - - return cpTrue; -} - -static void -separate(cpArbiter *arb, cpSpace *space, void *ignore) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - PlayerStruct *player = (PlayerStruct *)a->data; - - cpArrayDeleteObj(player->groundShapes, b); - - if(player->groundShapes->num == 0){ - a->u = 0.0f; - player->groundNormal = cpvzero; - } -} - -static void -playerUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - cpBodyUpdateVelocity(body, gravity, damping, dt); - body->v.y = cpfmax(body->v.y, -700); - body->v.x = cpfclamp(body->v.x, -400, 400); -} - - -static void -update(int ticks) -{ - static int lastJumpState = 0; - int jumpState = (arrowDirection.y > 0.0f); - - cpBody *body = playerInstance.shape->body; - - cpVect groundNormal = playerInstance.groundNormal; - if(groundNormal.y > 0.0f){ - playerInstance.shape->surface_v = cpvmult(cpvperp(groundNormal), 400.0f*arrowDirection.x); - if(arrowDirection.x) cpBodyActivate(body); - } else { - playerInstance.shape->surface_v = cpvzero; - } - - // apply jump - if(jumpState && !lastJumpState && cpvlengthsq(groundNormal)){ -// body->v = cpvmult(cpvslerp(groundNormal, cpv(0.0f, 1.0f), 0.5f), 500.0f); - body->v = cpvadd(body->v, cpvmult(cpvslerp(groundNormal, cpv(0.0f, 1.0f), 0.75f), 500.0f)); - cpBodyActivate(body); - } - - if(playerInstance.groundShapes->num == 0){ - cpFloat air_accel = body->v.x + arrowDirection.x*(2000.0f); - body->f.x = body->m*air_accel; -// body->v.x = cpflerpconst(body->v.x, 400.0f*arrowDirection.x, 2000.0f/60.0f); - } - - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 10; - space->gravity = cpv(0, -1500); - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - // add some other segments to play with - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-220,-200), cpv(-220,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(0,-240), cpv(320,-200), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(200,-240), cpv(320,-100), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-220,-80), cpv(200,-80), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - shape->collision_type = 2; - - // Set up the player - cpFloat radius = 15.0f; - body = cpSpaceAddBody(space, cpBodyNew(10.0f, INFINITY)); - body->p = cpv(0, -220); - body->velocity_func = playerUpdateVelocity; - - shape = cpSpaceAddShape(space, cpCircleShapeNew(body, radius, cpvzero)); - shape->e = 0.0f; shape->u = 2.0f; - shape->collision_type = 1; - - playerInstance.u = shape->u; - playerInstance.shape = shape; - playerInstance.groundShapes = cpArrayNew(0); - shape->data = &playerInstance; - - cpSpaceAddCollisionHandler(space, 1, 2, begin, preSolve, NULL, separate, NULL); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); - - cpArrayFree(playerInstance.groundShapes); -} - -chipmunkDemo Player = { - "Player", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Plink.c b/3rdparty/chipmunk-5.3.4/Demo/Plink.c deleted file mode 100644 index cf1323f43c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Plink.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -// Iterate over all of the bodies and reset the ones that have fallen offscreen. -static void -eachBody(cpBody *body, void *unused) -{ - if(body->p.y < -260 || cpfabs(body->p.x) > 340){ - cpFloat x = rand()/(cpFloat)RAND_MAX*640 - 320; - body->p = cpv(x, 260); - } -} - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 5; - space->gravity = cpv(0, -100); - - cpSpaceResizeStaticHash(space, 40.0f, 999); - cpSpaceResizeActiveHash(space, 30.0f, 2999); - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - // Create vertexes for a pentagon shape. - cpVect verts[NUM_VERTS]; - for(int i=0; ie = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - } - } - - // Add lots of pentagons. - for(int i=0; i<300; i++){ - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, NUM_VERTS, verts, cpvzero))); - cpFloat x = rand()/(cpFloat)RAND_MAX*640 - 320; - body->p = cpv(x, 350); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.4f; - } - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Plink = { - "Plink", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Pump.c b/3rdparty/chipmunk-5.3.4/Demo/Pump.c deleted file mode 100644 index 5141c240fe..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Pump.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; -static cpConstraint *motor; - -#define numBalls 5 -static cpBody *balls[numBalls]; - -static void -update(int ticks) -{ - cpFloat coef = (2.0f + arrowDirection.y)/3.0f; - cpFloat rate = arrowDirection.x*30.0f*coef; - - cpSimpleMotorSetRate(motor, rate); - motor->maxForce = (rate ? 1000000.0f : 0.0f); - - int steps = 2; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip.x > 320.0f){ - ball->v = cpvzero; - ball->p = cpv(-224.0f, 200.0f); - } - } - } -} - -static cpBody * -add_ball(cpVect pos) -{ - cpBody *body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForCircle(1.0f, 30, 0, cpvzero))); - body->p = pos; - - cpShape *shape = cpSpaceAddShape(space, cpCircleShapeNew(body, 30, cpvzero)); - shape->e = 0.0f; shape->u = 0.5f; - - return body; -} - -static cpSpace * -init(void) -{ - space = cpSpaceNew(); - space->gravity = cpv(0, -600); - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - - // beveling all of the line segments slightly helps prevent things from getting stuck on cracks - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-256,16), cpv(-256,300), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-256,16), cpv(-192,0), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-192,0), cpv(-192, -64), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-128,-64), cpv(-128,144), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-192,80), cpv(-192,176), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-192,176), cpv(-128,240), 2.0f)); - shape->e = 0.0f; shape->u = 0.0f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-128,144), cpv(192,64), 2.0f)); - shape->e = 0.0f; shape->u = 0.5f; shape->layers = 1; - shape->layers = NOT_GRABABLE_MASK; - - cpVect verts[] = { - cpv(-30,-80), - cpv(-30, 80), - cpv( 30, 64), - cpv( 30,-80), - }; - - cpBody *plunger = cpSpaceAddBody(space, cpBodyNew(1.0f, INFINITY)); - plunger->p = cpv(-160,-80); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(plunger, 4, verts, cpvzero)); - shape->e = 1.0f; shape->u = 0.5f; shape->layers = 1; - - // add balls to hopper - for(int i=0; ip = cpv(-160,-160); - cpBodySetAngle(smallGear, -M_PI_2); - - shape = cpSpaceAddShape(space, cpCircleShapeNew(smallGear, 80.0f, cpvzero)); - shape->layers = 0; - - cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, smallGear, cpv(-160,-160), cpvzero)); - - // add big gear - cpBody *bigGear = cpSpaceAddBody(space, cpBodyNew(40.0f, cpMomentForCircle(40.0f, 160, 0, cpvzero))); - bigGear->p = cpv(80,-160); - cpBodySetAngle(bigGear, M_PI_2); - - shape = cpSpaceAddShape(space, cpCircleShapeNew(bigGear, 160.0f, cpvzero)); - shape->layers = 0; - - cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, bigGear, cpv(80,-160), cpvzero)); - - // connect the plunger to the small gear. - cpSpaceAddConstraint(space, cpPinJointNew(smallGear, plunger, cpv(80,0), cpv(0,0))); - // connect the gears. - cpSpaceAddConstraint(space, cpGearJointNew(smallGear, bigGear, -M_PI_2, -2.0f)); - - - // feeder mechanism - cpFloat bottom = -300.0f; - cpFloat top = 32.0f; - cpBody *feeder = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForSegment(1.0f, cpv(-224.0f, bottom), cpv(-224.0f, top)))); - feeder->p = cpv(-224, (bottom + top)/2.0f); - - cpFloat len = top - bottom; - cpSpaceAddShape(space, cpSegmentShapeNew(feeder, cpv(0.0f, len/2.0f), cpv(0.0f, -len/2.0f), 20.0f)); - - cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, feeder, cpv(-224.0f, bottom), cpv(0.0f, -len/2.0f))); - cpVect anchr = cpBodyWorld2Local(feeder, cpv(-224.0f, -160.0f)); - cpSpaceAddConstraint(space, cpPinJointNew(feeder, smallGear, anchr, cpv(0.0f, 80.0f))); - - // motorize the second gear - motor = cpSpaceAddConstraint(space, cpSimpleMotorNew(staticBody, bigGear, 3.0f)); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Pump = { - "Pump", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/PyramidStack.c b/3rdparty/chipmunk-5.3.4/Demo/PyramidStack.c deleted file mode 100644 index 443bdf11de..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/PyramidStack.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static void -update(int ticks) -{ - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 30; - cpSpaceResizeStaticHash(space, 40.0f, 1000); - cpSpaceResizeActiveHash(space, 40.0f, 1000); - space->gravity = cpv(0, -100); - space->sleepTimeThreshold = 0.5f; - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - // Add lots of boxes. - for(int i=0; i<14; i++){ - for(int j=0; j<=i; j++){ - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForBox(1.0f, 30.0f, 30.0f))); - body->p = cpv(j*32 - i*16, 300 - i*32); - - shape = cpSpaceAddShape(space, cpBoxShapeNew(body, 30.0f, 30.0f)); - shape->e = 0.0f; shape->u = 0.8f; - } - } - - // Add a ball to make things more interesting - cpFloat radius = 15.0f; - body = cpSpaceAddBody(space, cpBodyNew(10.0f, cpMomentForCircle(10.0f, 0.0f, radius, cpvzero))); - body->p = cpv(0, -240 + radius+5); - - shape = cpSpaceAddShape(space, cpCircleShapeNew(body, radius, cpvzero)); - shape->e = 0.0f; shape->u = 0.9f; - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo PyramidStack = { - "Pyramid Stack", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/PyramidTopple.c b/3rdparty/chipmunk-5.3.4/Demo/PyramidTopple.c deleted file mode 100644 index e0b37e10b9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/PyramidTopple.c +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static void -update(int ticks) -{ - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 30; - cpSpaceResizeActiveHash(space, 30.0f, 2999); - cpSpaceResizeStaticHash(space, 30.0f, 999); - space->gravity = cpv(0, -300); - space->sleepTimeThreshold = 0.5f; - - cpBody *body; - - cpShape *shape; - - // Vertexes for the dominos. - int num = 4; - cpVect verts[] = { - cpv(-3,-20), - cpv(-3, 20), - cpv( 3, 20), - cpv( 3,-20), - }; - - // Add a floor. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(&space->staticBody, cpv(-600,-240), cpv(600,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - // Shared friction constant. - cpFloat u = 0.6f; - - // Add the dominoes. Skim over this. It doesn't do anything fancy, and it's hard to follow. - int n = 9; - for(int i=1; i<=n; i++){ - cpVect offset = cpv(-i*60/2.0f, (n - i)*52); - - for(int j=0; jp = cpvadd(cpv(j*60, -220), offset); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = u; - - - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero))); - body->p = cpvadd(cpv(j*60, -197), offset); - cpBodySetAngle(body, M_PI/2.0f); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = u; - - - if(j == (i - 1)) continue; - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero))); - body->p = cpvadd(cpv(j*60 + 30, -191), offset); - cpBodySetAngle(body, M_PI/2.0f); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = u; - } - - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero))); - body->p = cpvadd(cpv(-17, -174), offset); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = u; - - - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero))); - body->p = cpvadd(cpv((i - 1)*60 + 17, -174), offset); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = u; - } - - // Give the last domino a little tap. -// body->w = -1; -// body->v = cpv(-body->w*20, 0); - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo PyramidTopple = { - "Pyramid Topple", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Query.c b/3rdparty/chipmunk-5.3.4/Demo/Query.c deleted file mode 100644 index ed649f2101..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Query.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -#include "chipmunk_unsafe.h" - -static cpSpace *space; -extern cpVect mousePoint; - -static cpShape *querySeg = NULL; - - -static void -update(int ticks) -{ - messageString[0] = '\0'; - - cpVect start = cpvzero; - cpVect end = /*cpv(0, 85);//*/mousePoint; - cpVect lineEnd = end; - - { - char infoString[1024]; - sprintf(infoString, "Query: Dist(%f) Point%s, ", cpvdist(start, end), cpvstr(end)); - strcat(messageString, infoString); - } - - cpSegmentQueryInfo info = {}; - if(cpSpaceSegmentQueryFirst(space, start, end, CP_ALL_LAYERS, CP_NO_GROUP, &info)){ - cpVect point = cpSegmentQueryHitPoint(start, end, info); - lineEnd = cpvadd(point, cpvzero);//cpvmult(info.n, 4.0f)); - - char infoString[1024]; - sprintf(infoString, "Segment Query: Dist(%f) Normal%s", cpSegmentQueryHitDist(start, end, info), cpvstr(info.n)); - strcat(messageString, infoString); - } else { - strcat(messageString, "Segment Query (None)"); - } - - cpSegmentShapeSetEndpoints(querySeg, start, lineEnd); - cpShapeCacheBB(querySeg); // force it to update it's collision detection data so it will draw - - // normal other stuff. - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ielasticIterations = 0; - space->iterations = 5; - - cpSpaceResizeStaticHash(space, 40.0f, 999); - cpSpaceResizeActiveHash(space, 30.0f, 2999); - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - - // add a non-collidable segment as a quick and dirty way to draw the query line - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpvzero, cpv(100.0f, 0.0f), 4.0f)); - shape->layers = 0; - querySeg = shape; - - { // add a fat segment - cpFloat mass = 1.0f; - cpFloat length = 100.0f; - cpVect a = cpv(-length/2.0f, 0.0f), b = cpv(length/2.0f, 0.0f); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass, a, b))); - body->p = cpv(0.0f, 100.0f); - - cpSpaceAddShape(space, cpSegmentShapeNew(body, a, b, 20.0f)); - } - - { // add a static segment - cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(0, 300), cpv(300, 0), 0.0f)); - } - - { // add a pentagon - cpFloat mass = 1.0f; - const int NUM_VERTS = 5; - - cpVect verts[NUM_VERTS]; - for(int i=0; ip = cpv(50.0f, 50.0f); - - cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero)); - } - - { // add a circle - cpFloat mass = 1.0f; - cpFloat r = 20.0f; - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForCircle(mass, 0.0f, r, cpvzero))); - body->p = cpv(100.0f, 100.0f); - - cpSpaceAddShape(space, cpCircleShapeNew(body, r, cpvzero)); - } - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Query = { - "Segment Query", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Sensors.c b/3rdparty/chipmunk-5.3.4/Demo/Sensors.c deleted file mode 100644 index 89c0c3a079..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Sensors.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -enum CollisionTypes { - BALL_TYPE, - BLOCKING_SENSOR_TYPE, - CATCH_SENSOR_TYPE, -}; - -typedef struct Emitter { - int queue; - int blocked; - cpVect position; -} Emitter; - -static Emitter emitterInstance; - -static cpBool -blockerBegin(cpArbiter *arb, cpSpace *space, void *unused) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - Emitter *emitter = (Emitter *) a->data; - - emitter->blocked++; - - return cpFalse; // Return values from sensors callbacks are ignored, -} - -static void -blockerSeparate(cpArbiter *arb, cpSpace *space, void *unused) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - Emitter *emitter = (Emitter *) a->data; - - emitter->blocked--; -} - -static void -postStepRemove(cpSpace *space, cpShape *shape, void *unused) -{ - cpSpaceRemoveBody(space, shape->body); - cpSpaceRemoveShape(space, shape); - - cpBodyFree(shape->body); - cpShapeFree(shape); -} - -static cpBool -catcherBarBegin(cpArbiter *arb, cpSpace *space, void *unused) -{ - cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b); - Emitter *emitter = (Emitter *) a->data; - - emitter->queue++; - cpSpaceAddPostStepCallback(space, (cpPostStepFunc)postStepRemove, b, NULL); - - return cpFalse; -} - -static cpFloat frand_unit(){return 2.0f*((cpFloat)rand()/(cpFloat)RAND_MAX) - 1.0f;} - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - if(!emitterInstance.blocked && emitterInstance.queue){ - emitterInstance.queue--; - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForCircle(1.0f, 15.0f, 0.0f, cpvzero))); - body->p = emitterInstance.position; - body->v = cpvmult(cpv(frand_unit(), frand_unit()), 100.0f); - - cpShape *shape = cpSpaceAddShape(space, cpCircleShapeNew(body, 15.0f, cpvzero)); - shape->collision_type = BALL_TYPE; - } - - for(int i=0; iiterations = 10; - space->gravity = cpv(0, -100); - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - - // Data structure for our ball emitter - // We'll use two sensors for it, one to see if the emitter is blocked - // a second to catch the balls and add them back to the emitter - emitterInstance.queue = 5; - emitterInstance.blocked = 0; - emitterInstance.position = cpv(0, 150); - - // Create our blocking sensor, so we know when the emitter is clear to emit another ball - shape = cpSpaceAddShape(space, cpCircleShapeNew(staticBody, 15.0f, emitterInstance.position)); - shape->sensor = 1; - shape->collision_type = BLOCKING_SENSOR_TYPE; - shape->data = &emitterInstance; - - // Create our catch sensor to requeue the balls when they reach the bottom of the screen - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-2000, -200), cpv(2000, -200), 15.0f)); - shape->sensor = 1; - shape->collision_type = CATCH_SENSOR_TYPE; - shape->data = &emitterInstance; - - cpSpaceAddCollisionHandler(space, BLOCKING_SENSOR_TYPE, BALL_TYPE, blockerBegin, NULL, NULL, blockerSeparate, NULL); - cpSpaceAddCollisionHandler(space, CATCH_SENSOR_TYPE, BALL_TYPE, catcherBarBegin, NULL, NULL, NULL, NULL); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Sensors = { - "Sensors", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Simple.c b/3rdparty/chipmunk-5.3.4/Demo/Simple.c deleted file mode 100644 index 211e4b8b2a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Simple.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -// Init is called by the demo code to set up the demo. -static cpSpace * -init(void) -{ - // Create a space, a space is a simulation world. It simulates the motions of rigid bodies, - // handles collisions between them, and simulates the joints between them. - space = cpSpaceNew(); - - // Lets set some parameters of the space: - // More iterations make the simulation more accurate but slower - space->iterations = 10; - // These parameters tune the efficiency of the collision detection. - // For more info: http://code.google.com/p/chipmunk-physics/wiki/cpSpace - cpSpaceResizeStaticHash(space, 30.0f, 1000); - cpSpaceResizeActiveHash(space, 30.0f, 1000); - // Give it some gravity - space->gravity = cpv(0, -100); - - // Create A ground segment along the bottom of the screen - // By attaching it to &space->staticBody instead of a body, we make it a static shape. - cpShape *ground = cpSegmentShapeNew(&space->staticBody, cpv(-320,-240), cpv(320,-240), 0.0f); - // Set some parameters of the shape. - // For more info: http://code.google.com/p/chipmunk-physics/wiki/cpShape - ground->e = 1.0f; ground->u = 1.0f; - ground->layers = NOT_GRABABLE_MASK; // Used by the Demo mouse grabbing code - // Add the shape to the space as a static shape - // If a shape never changes position, add it as static so Chipmunk knows it only needs to - // calculate collision information for it once when it is added. - // Do not change the postion of a static shape after adding it. - cpSpaceAddShape(space, ground); - - // Add a moving circle object. - cpFloat radius = 15.0f; - cpFloat mass = 10.0f; - // This time we need to give a mass and moment of inertia when creating the circle. - cpBody *ballBody = cpBodyNew(mass, cpMomentForCircle(mass, 0.0f, radius, cpvzero)); - // Set some parameters of the body: - // For more info: http://code.google.com/p/chipmunk-physics/wiki/cpBody - ballBody->p = cpv(0, -240 + radius+50); - ballBody->v = cpv(0, -20); - // Add the body to the space so it will be simulated and move around. - cpSpaceAddBody(space, ballBody); - - - // Add a circle shape for the ball. - // Shapes are always defined relative to the center of gravity of the body they are attached to. - // When the body moves or rotates, the shape will move with it. - // Additionally, all of the cpSpaceAdd*() functions return the thing they added so you can create and add in one go. - cpShape *ballShape = cpSpaceAddShape(space, cpCircleShapeNew(ballBody, radius, cpvzero)); - ballShape->e = 0.0f; ballShape->u = 0.9f; - - return space; -} - -// Update is called by the demo code each frame. -static void -update(int ticks) -{ - // Chipmunk allows you to use a different timestep each frame, but it works much better when you use a fixed timestep. - // An excellent article on why fixed timesteps for game logic can be found here: http://gafferongames.com/game-physics/fix-your-timestep/ - cpSpaceStep(space, 1.0f/60.0f); -} - -// destroy is called by the demo code to free all the memory we've allocated -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Simple = { - "Simple", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Springies.c b/3rdparty/chipmunk-5.3.4/Demo/Springies.c deleted file mode 100644 index 2f0d247982..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Springies.c +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static cpFloat -springForce(cpConstraint *spring, cpFloat dist) -{ - cpFloat clamp = 20.0f; - return cpfclamp(cpDampedSpringGetRestLength(spring) - dist, -clamp, clamp)*cpDampedSpringGetStiffness(spring); -} - -static cpConstraint * -new_spring(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiff, cpFloat damp) -{ - cpConstraint *spring = cpDampedSpringNew(a, b, anchr1, anchr2, restLength, stiff, damp); - cpDampedSpringSetSpringForceFunc(spring, springForce); - - return spring; -} - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip = center; - - cpShape *shape = cpSpaceAddShape(space, cpSegmentShapeNew(body, cpvsub(a, center), cpvsub(b, center), 10.0f)); - shape->group = group; - - return body; -} - -static cpSpace * -init(void) -{ - space = cpSpaceNew(); - cpBody *staticBody = &space->staticBody; - - cpBody *body1 = add_bar(cpv(-240, 160), cpv(-160, 80), 1); - cpBody *body2 = add_bar(cpv(-160, 80), cpv( -80, 160), 1); - cpBody *body3 = add_bar(cpv( 0, 160), cpv( 80, 0), 0); - cpBody *body4 = add_bar(cpv( 160, 160), cpv( 240, 160), 0); - cpBody *body5 = add_bar(cpv(-240, 0), cpv(-160, -80), 2); - cpBody *body6 = add_bar(cpv(-160, -80), cpv( -80, 0), 2); - cpBody *body7 = add_bar(cpv( -80, 0), cpv( 0, 0), 2); - cpBody *body8 = add_bar(cpv( 0, -80), cpv( 80, -80), 0); - cpBody *body9 = add_bar(cpv( 240, 80), cpv( 160, 0), 3); - cpBody *body10 = add_bar(cpv( 160, 0), cpv( 240, -80), 3); - cpBody *body11 = add_bar(cpv(-240, -80), cpv(-160, -160), 4); - cpBody *body12 = add_bar(cpv(-160, -160), cpv( -80, -160), 0); - cpBody *body13 = add_bar(cpv( 0, -160), cpv( 80, -160), 0); - cpBody *body14 = add_bar(cpv( 160, -160), cpv( 240, -160), 0); - - cpSpaceAddConstraint(space, cpPivotJointNew2( body1, body2, cpv( 40,-40), cpv(-40,-40))); - cpSpaceAddConstraint(space, cpPivotJointNew2( body5, body6, cpv( 40,-40), cpv(-40,-40))); - cpSpaceAddConstraint(space, cpPivotJointNew2( body6, body7, cpv( 40, 40), cpv(-40, 0))); - cpSpaceAddConstraint(space, cpPivotJointNew2( body9, body10, cpv(-40,-40), cpv(-40, 40))); - cpSpaceAddConstraint(space, cpPivotJointNew2(body11, body12, cpv( 40,-40), cpv(-40, 0))); - - cpFloat stiff = 100.0f; - cpFloat damp = 0.5f; - cpSpaceAddConstraint(space, new_spring(staticBody, body1, cpv(-320, 240), cpv(-40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body1, cpv(-320, 80), cpv(-40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body1, cpv(-160, 240), cpv(-40, 40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body2, cpv(-160, 240), cpv( 40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body2, cpv( 0, 240), cpv( 40, 40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body3, cpv( 80, 240), cpv(-40, 80), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body4, cpv( 80, 240), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body4, cpv( 320, 240), cpv( 40, 0), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body5, cpv(-320, 80), cpv(-40, 40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body9, cpv( 320, 80), cpv( 40, 40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body10, cpv( 320, 0), cpv( 40,-40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body10, cpv( 320,-160), cpv( 40,-40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body11, cpv(-320,-160), cpv(-40, 40), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body12, cpv(-240,-240), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body12, cpv( 0,-240), cpv( 40, 0), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body13, cpv( 0,-240), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body13, cpv( 80,-240), cpv( 40, 0), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring(staticBody, body14, cpv( 80,-240), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body14, cpv( 240,-240), cpv( 40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(staticBody, body14, cpv( 320,-160), cpv( 40, 0), 0.0f, stiff, damp)); - - cpSpaceAddConstraint(space, new_spring( body1, body5, cpv( 40,-40), cpv(-40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body1, body6, cpv( 40,-40), cpv( 40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body2, body3, cpv( 40, 40), cpv(-40, 80), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body4, cpv(-40, 80), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body4, cpv( 40,-80), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body7, cpv( 40,-80), cpv( 40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body7, cpv(-40, 80), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body8, cpv( 40,-80), cpv( 40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body3, body9, cpv( 40,-80), cpv(-40,-40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body4, body9, cpv( 40, 0), cpv( 40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body5, body11, cpv(-40, 40), cpv(-40, 40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body5, body11, cpv( 40,-40), cpv( 40,-40), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body7, body8, cpv( 40, 0), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body8, body12, cpv(-40, 0), cpv( 40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body8, body13, cpv(-40, 0), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body8, body13, cpv( 40, 0), cpv( 40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring( body8, body14, cpv( 40, 0), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(body10, body14, cpv( 40,-40), cpv(-40, 0), 0.0f, stiff, damp)); - cpSpaceAddConstraint(space, new_spring(body10, body14, cpv( 40,-40), cpv(-40, 0), 0.0f, stiff, damp)); - - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Springies = { - "Springies", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/Tank.c b/3rdparty/chipmunk-5.3.4/Demo/Tank.c deleted file mode 100644 index a0cdc1d336..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/Tank.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -extern cpVect mousePoint; - -static cpSpace *space; - -static cpBody *tankBody, *tankControlBody; - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip); - cpFloat turn = cpvtoangle(cpvunrotate(tankBody->rot, mouseDelta)); - cpBodySetAngle(tankControlBody, tankBody->a - turn); - - // drive the tank towards the mouse - if(cpvnear(mousePoint, tankBody->p, 30.0)){ - tankControlBody->v = cpvzero; // stop - } else { - cpFloat direction = (cpvdot(mouseDelta, tankBody->rot) > 0.0 ? 1.0 : -1.0); - tankControlBody->v = cpvrotate(tankBody->rot, cpv(30.0f*direction, 0.0f)); - } - - cpSpaceStep(space, dt); - } -} - -static cpBody * -add_box(cpFloat size, cpFloat mass) -{ - cpVect verts[] = { - cpv(-size,-size), - cpv(-size, size), - cpv( size, size), - cpv( size,-size), - }; - - cpFloat radius = cpvlength(cpv(size, size)); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, 4, verts, cpvzero))); - body->p = cpv(frand()*(640 - 2*radius) - (320 - radius), frand()*(480 - 2*radius) - (240 - radius)); - - cpShape *shape = cpSpaceAddShape(space, cpPolyShapeNew(body, 4, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - - return body; -} - -static cpSpace * -init(void) -{ - cpResetShapeIdCounter(); - - space = cpSpaceNew(); - cpSpaceResizeActiveHash(space, 30.0f, 1000); - space->iterations = 10; - space->sleepTimeThreshold = 0.5f; - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, cpv(-320,240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - for(int i=0; i<50; i++){ - cpBody *body = add_box(10.0, 1.0); - - cpConstraint *pivot = cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, body, cpvzero, cpvzero)); - pivot->biasCoef = 0.0f; // disable joint correction - pivot->maxForce = 1000.0f; // emulate linear friction - - cpConstraint *gear = cpSpaceAddConstraint(space, cpGearJointNew(staticBody, body, 0.0f, 1.0f)); - gear->biasCoef = 0.0f; // disable joint correction - gear->maxForce = 5000.0f; // emulate angular friction - } - - // We joint the tank to the control body and control the tank indirectly by modifying the control body. - tankControlBody = cpBodyNew(INFINITY, INFINITY); - tankBody = add_box(15.0, 10.0); - - cpConstraint *pivot = cpSpaceAddConstraint(space, cpPivotJointNew2(tankControlBody, tankBody, cpvzero, cpvzero)); - pivot->biasCoef = 0.0f; // disable joint correction - pivot->maxForce = 10000.0f; // emulate linear friction - - cpConstraint *gear = cpSpaceAddConstraint(space, cpGearJointNew(tankControlBody, tankBody, 0.0f, 1.0f)); - gear->biasCoef = 1.0f; // limit angular correction rate - gear->maxBias = 1.0f; // limit angular correction rate - gear->maxForce = 500000.0f; // emulate angular friction - - return space; -} - -static void -destroy(void) -{ - cpBodyFree(tankControlBody); - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Tank = { - "Tank", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/TheoJansen.c b/3rdparty/chipmunk-5.3.4/Demo/TheoJansen.c deleted file mode 100644 index 896cfbb89d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/TheoJansen.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * The previous WalkBot demo I designed was fairly disappointing, so I implemented - * the mechanism that Theo Jansen uses in his kinetic sculptures. Brilliant. - * Read more here: http://en.wikipedia.org/wiki/Theo_Jansen - */ - -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -static cpConstraint *motor; - -static void -update(int ticks) -{ - cpFloat coef = (2.0f + arrowDirection.y)/3.0f; - cpFloat rate = arrowDirection.x*10.0f*coef; - cpSimpleMotorSetRate(motor, rate); - motor->maxForce = (rate) ? 100000.0f : 0.0f; - - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip = cpv(offset, 0.0f); - cpSpaceAddBody(space, upper_leg); - cpSpaceAddShape(space, cpSegmentShapeNew(upper_leg, a, b, seg_radius)); - cpSpaceAddConstraint(space, cpPivotJointNew2(chassis, upper_leg, cpv(offset, 0.0f), cpvzero)); - - // lower leg - a = cpvzero, b = cpv(0.0f, -1.0f*side); - cpBody *lower_leg = cpBodyNew(leg_mass, cpMomentForSegment(leg_mass, a, b)); - lower_leg->p = cpv(offset, -side); - cpSpaceAddBody(space, lower_leg); - shape = cpSegmentShapeNew(lower_leg, a, b, seg_radius); - shape->group = 1; - cpSpaceAddShape(space, shape); - shape = cpCircleShapeNew(lower_leg, seg_radius*2.0f, b); - shape->group = 1; - shape->e = 0.0f; shape->u = 1.0f; - cpSpaceAddShape(space, shape); - cpSpaceAddConstraint(space, cpPinJointNew(chassis, lower_leg, cpv(offset, 0.0f), cpvzero)); - - cpSpaceAddConstraint(space, cpGearJointNew(upper_leg, lower_leg, 0.0f, 1.0f)); - - cpConstraint *constraint; - cpFloat diag = cpfsqrt(side*side + offset*offset); - - constraint = cpPinJointNew(crank, upper_leg, anchor, cpv(0.0f, side)); - cpPinJointSetDist(constraint, diag); - cpSpaceAddConstraint(space, constraint); - constraint = cpPinJointNew(crank, lower_leg, anchor, cpvzero); - cpPinJointSetDist(constraint, diag); - cpSpaceAddConstraint(space, constraint); -} - -static cpSpace * -init(void) -{ - space = cpSpaceNew(); - - cpResetShapeIdCounter(); - - space = cpSpaceNew(); - space->iterations = 20; - space->gravity = cpv(0,-500); - - cpBody *staticBody = &space->staticBody; - cpShape *shape; - cpVect a, b; - - // Create segments around the edge of the screen. - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - cpSpaceAddShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - cpSpaceAddShape(space, shape); - - shape = cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - cpSpaceAddShape(space, shape); - - cpFloat offset = 30.0f; - - // make chassis - cpFloat chassis_mass = 2.0f; - a = cpv(-offset, 0.0f), b = cpv(offset, 0.0f); - cpBody *chassis = cpBodyNew(chassis_mass, cpMomentForSegment(chassis_mass, a, b)); - cpSpaceAddBody(space, chassis); - shape = cpSegmentShapeNew(chassis, a, b, seg_radius); - shape->group = 1; - cpSpaceAddShape(space, shape); - - // make crank - cpFloat crank_mass = 1.0f; - cpFloat crank_radius = 13.0f; - cpBody *crank = cpBodyNew(crank_mass, cpMomentForCircle(crank_mass, crank_radius, 0.0f, cpvzero)); - cpSpaceAddBody(space, crank); - shape = cpCircleShapeNew(crank, crank_radius, cpvzero); - shape->group = 1; - cpSpaceAddShape(space, shape); - cpSpaceAddConstraint(space, cpPivotJointNew2(chassis, crank, cpvzero, cpvzero)); - - cpFloat side = 30.0f; - - int num_legs = 2; - for(int i=0; i -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; -static cpBody *staticBody; - -static void -update(int ticks) -{ - int steps = 3; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; igravity = cpv(0, -600); - - cpBody *body; - cpShape *shape; - - // Vertexes for the bricks - int num = 4; - cpVect verts[] = { - cpv(-30,-15), - cpv(-30, 15), - cpv( 30, 15), - cpv( 30,-15), - }; - - // Set up the static box. - cpVect a = cpv(-200, -200); - cpVect b = cpv(-200, 200); - cpVect c = cpv( 200, 200); - cpVect d = cpv( 200, -200); - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, a, b, 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, b, c, 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, c, d, 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddShape(space, cpSegmentShapeNew(staticBody, d, a, 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - // Give the box a little spin. - // Because staticBody is never added to the space, we will need to - // update it ourselves. (see above). - // NOTE: Normally you would want to add the segments as normal and not static shapes. - // I'm just doing it to demonstrate the cpSpaceRehashStatic() function. - staticBody->w = 0.4f; - - // Add the bricks. - for(int i=0; i<3; i++){ - for(int j=0; j<7; j++){ - body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts, cpvzero))); - body->p = cpv(i*60 - 150, j*30 - 150); - - shape = cpSpaceAddShape(space, cpPolyShapeNew(body, num, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - } - } - - return space; -} - -static void -destroy(void) -{ - cpBodyFree(staticBody); - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo Tumble = { - "Tumble", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/UnsafeOps.c b/3rdparty/chipmunk-5.3.4/Demo/UnsafeOps.c deleted file mode 100644 index 1f3e16743d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/UnsafeOps.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "chipmunk.h" -#include "chipmunk_unsafe.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -static cpSpace *space; - -#define NUM_CIRCLES 30 -static cpShape *circles[NUM_CIRCLES]; -static cpFloat circleRadius = 30.0f; - -static void -update(int ticks) -{ - if(arrowDirection.y){ - circleRadius = cpfmax(10.0f, circleRadius + arrowDirection.y); - - for(int i=0; ibody->m = cpMomentForCircle(1.0f, 0.0f, circleRadius, cpvzero); - cpCircleShapeSetRadius(circles[i], circleRadius); - } - } - - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; iiterations = 5; - space->gravity = cpv(0, -100); - - cpSpaceResizeStaticHash(space, 40.0f, 999); - cpSpaceResizeActiveHash(space, 30.0f, 2999); - - cpBody *body, *staticBody = &space->staticBody; - cpShape *shape; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - for(int i=0; ip = cpvmult(cpv(frand()*2.0f - 1.0f, frand()*2.0f - 1.0f), circleRadius*5.0f); - - circles[i] = shape = cpSpaceAddShape(space, cpCircleShapeNew(body, circleRadius, cpvzero)); - shape->e = 0.0f; shape->u = 1.0f; - } - - strcat(messageString, - "chipmunk_unsafe.h Contains functions for changing shapes, but they can cause severe stability problems if used incorrectly.\n" - "Shape changes occur as instantaneous changes to position without an accompanying velocity change. USE WITH CAUTION!"); - return space; -} - -static void -destroy(void) -{ - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -chipmunkDemo UnsafeOps = { - "Unsafe Operations", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Demo/drawSpace.c b/3rdparty/chipmunk-5.3.4/Demo/drawSpace.c deleted file mode 100644 index 7e6ea6705c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/drawSpace.c +++ /dev/null @@ -1,512 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#ifdef __APPLE__ - #include "OpenGL/gl.h" - #include "OpenGL/glu.h" - #include -#else -#ifdef WIN32 - #include -#endif - #include - #include - #include -#endif - -#include "chipmunk_private.h" -#include "drawSpace.h" - -/* - IMPORTANT - READ ME! - - This file sets up a simple interface that the individual demos can use to get - a Chipmunk space running and draw what's in it. In order to keep the Chipmunk - examples clean and simple, they contain no graphics code. All drawing is done - by accessing the Chipmunk structures at a very low level. It is NOT - recommended to write a game or application this way as it does not scale - beyond simple shape drawing and is very dependent on implementation details - about Chipmunk which may change with little to no warning. -*/ - -#define LINE_COLOR 0.0f, 0.0f, 0.0f -#define COLLISION_COLOR 1.0f, 0.0f, 0.0f -#define BODY_COLOR 0.0f, 0.0f, 1.0f - -static void -glColor_from_pointer(void *ptr) -{ - unsigned long val = (long)ptr; - - // hash the pointer up nicely - val = (val+0x7ed55d16) + (val<<12); - val = (val^0xc761c23c) ^ (val>>19); - val = (val+0x165667b1) + (val<<5); - val = (val+0xd3a2646c) ^ (val<<9); - val = (val+0xfd7046c5) + (val<<3); - val = (val^0xb55a4f09) ^ (val>>16); - -// GLfloat v = (GLfloat)val/(GLfloat)ULONG_MAX; -// v = 0.95f - v*0.15f; -// -// glColor3f(v, v, v); - - GLubyte r = (val>>0) & 0xFF; - GLubyte g = (val>>8) & 0xFF; - GLubyte b = (val>>16) & 0xFF; - - GLubyte max = r>g ? (r>b ? r : b) : (g>b ? g : b); - - const int mult = 127; - const int add = 63; - r = (r*mult)/max + add; - g = (g*mult)/max + add; - b = (b*mult)/max + add; - - glColor3ub(r, g, b); -} - -static void -glColor_for_shape(cpShape *shape, cpSpace *space) -{ - cpBody *body = shape->body; - if(body){ - if(body->node.next){ - GLfloat v = 0.25f; - glColor3f(v,v,v); - return; - } else if(body->node.idleTime > space->sleepTimeThreshold) { - GLfloat v = 0.9f; - glColor3f(v,v,v); - return; - } - } - - glColor_from_pointer(shape); -} - -static const GLfloat circleVAR[] = { - 0.0000f, 1.0000f, - 0.2588f, 0.9659f, - 0.5000f, 0.8660f, - 0.7071f, 0.7071f, - 0.8660f, 0.5000f, - 0.9659f, 0.2588f, - 1.0000f, 0.0000f, - 0.9659f, -0.2588f, - 0.8660f, -0.5000f, - 0.7071f, -0.7071f, - 0.5000f, -0.8660f, - 0.2588f, -0.9659f, - 0.0000f, -1.0000f, - -0.2588f, -0.9659f, - -0.5000f, -0.8660f, - -0.7071f, -0.7071f, - -0.8660f, -0.5000f, - -0.9659f, -0.2588f, - -1.0000f, -0.0000f, - -0.9659f, 0.2588f, - -0.8660f, 0.5000f, - -0.7071f, 0.7071f, - -0.5000f, 0.8660f, - -0.2588f, 0.9659f, - 0.0000f, 1.0000f, - 0.0f, 0.0f, // For an extra line to see the rotation. -}; -static const int circleVAR_count = sizeof(circleVAR)/sizeof(GLfloat)/2; - -static void -drawCircleShape(cpBody *body, cpCircleShape *circle, cpSpace *space) -{ - glVertexPointer(2, GL_FLOAT, 0, circleVAR); - - glPushMatrix(); { - cpVect center = circle->tc; - glTranslatef(center.x, center.y, 0.0f); - glRotatef(body->a*180.0f/M_PI, 0.0f, 0.0f, 1.0f); - glScalef(circle->r, circle->r, 1.0f); - - if(!circle->shape.sensor){ - glColor_for_shape((cpShape *)circle, space); - glDrawArrays(GL_TRIANGLE_FAN, 0, circleVAR_count - 1); - } - - glColor3f(LINE_COLOR); - glDrawArrays(GL_LINE_STRIP, 0, circleVAR_count); - } glPopMatrix(); -} - -static const GLfloat pillVAR[] = { - 0.0000f, 1.0000f, 1.0f, - 0.2588f, 0.9659f, 1.0f, - 0.5000f, 0.8660f, 1.0f, - 0.7071f, 0.7071f, 1.0f, - 0.8660f, 0.5000f, 1.0f, - 0.9659f, 0.2588f, 1.0f, - 1.0000f, 0.0000f, 1.0f, - 0.9659f, -0.2588f, 1.0f, - 0.8660f, -0.5000f, 1.0f, - 0.7071f, -0.7071f, 1.0f, - 0.5000f, -0.8660f, 1.0f, - 0.2588f, -0.9659f, 1.0f, - 0.0000f, -1.0000f, 1.0f, - - 0.0000f, -1.0000f, 0.0f, - -0.2588f, -0.9659f, 0.0f, - -0.5000f, -0.8660f, 0.0f, - -0.7071f, -0.7071f, 0.0f, - -0.8660f, -0.5000f, 0.0f, - -0.9659f, -0.2588f, 0.0f, - -1.0000f, -0.0000f, 0.0f, - -0.9659f, 0.2588f, 0.0f, - -0.8660f, 0.5000f, 0.0f, - -0.7071f, 0.7071f, 0.0f, - -0.5000f, 0.8660f, 0.0f, - -0.2588f, 0.9659f, 0.0f, - 0.0000f, 1.0000f, 0.0f, -}; -static const int pillVAR_count = sizeof(pillVAR)/sizeof(GLfloat)/3; - -static void -drawSegmentShape(cpBody *body, cpSegmentShape *seg, cpSpace *space) -{ - cpVect a = seg->ta; - cpVect b = seg->tb; - - if(seg->r){ - glVertexPointer(3, GL_FLOAT, 0, pillVAR); - glPushMatrix(); { - cpVect d = cpvsub(b, a); - cpVect r = cpvmult(d, seg->r/cpvlength(d)); - - const GLfloat matrix[] = { - r.x, r.y, 0.0f, 0.0f, - -r.y, r.x, 0.0f, 0.0f, - d.x, d.y, 0.0f, 0.0f, - a.x, a.y, 0.0f, 1.0f, - }; - glMultMatrixf(matrix); - - if(!seg->shape.sensor){ - glColor_for_shape((cpShape *)seg, space); - glDrawArrays(GL_TRIANGLE_FAN, 0, pillVAR_count); - } - - glColor3f(LINE_COLOR); - glDrawArrays(GL_LINE_LOOP, 0, pillVAR_count); - } glPopMatrix(); - } else { - glColor3f(LINE_COLOR); - glBegin(GL_LINES); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - } -} - -static void -drawPolyShape(cpBody *body, cpPolyShape *poly, cpSpace *space) -{ - int count = poly->numVerts; -#if CP_USE_DOUBLES - glVertexPointer(2, GL_DOUBLE, 0, poly->tVerts); -#else - glVertexPointer(2, GL_FLOAT, 0, poly->tVerts); -#endif - - if(!poly->shape.sensor){ - glColor_for_shape((cpShape *)poly, space); - glDrawArrays(GL_TRIANGLE_FAN, 0, count); - } - - glColor3f(LINE_COLOR); - glDrawArrays(GL_LINE_LOOP, 0, count); -} - -static void -drawObject(cpShape *shape, cpSpace *space) -{ - cpBody *body = shape->body; - - switch(shape->klass->type){ - case CP_CIRCLE_SHAPE: - drawCircleShape(body, (cpCircleShape *)shape, space); - break; - case CP_SEGMENT_SHAPE: - drawSegmentShape(body, (cpSegmentShape *)shape, space); - break; - case CP_POLY_SHAPE: - drawPolyShape(body, (cpPolyShape *)shape, space); - break; - default: - printf("Bad enumeration in drawObject().\n"); - } -} - -static const GLfloat springVAR[] = { - 0.00f, 0.0f, - 0.20f, 0.0f, - 0.25f, 3.0f, - 0.30f,-6.0f, - 0.35f, 6.0f, - 0.40f,-6.0f, - 0.45f, 6.0f, - 0.50f,-6.0f, - 0.55f, 6.0f, - 0.60f,-6.0f, - 0.65f, 6.0f, - 0.70f,-3.0f, - 0.75f, 6.0f, - 0.80f, 0.0f, - 1.00f, 0.0f, -}; -static const int springVAR_count = sizeof(springVAR)/sizeof(GLfloat)/2; - -static void -drawSpring(cpDampedSpring *spring, cpBody *body_a, cpBody *body_b) -{ - cpVect a = cpvadd(body_a->p, cpvrotate(spring->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(spring->anchr2, body_b->rot)); - - glPointSize(5.0f); - glBegin(GL_POINTS); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - - cpVect delta = cpvsub(b, a); - - glVertexPointer(2, GL_FLOAT, 0, springVAR); - glPushMatrix(); { - GLfloat x = a.x; - GLfloat y = a.y; - GLfloat cos = delta.x; - GLfloat sin = delta.y; - GLfloat s = 1.0f/cpvlength(delta); - - const GLfloat matrix[] = { - cos, sin, 0.0f, 0.0f, - -sin*s, cos*s, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - x, y, 0.0f, 1.0f, - }; - - glMultMatrixf(matrix); - glDrawArrays(GL_LINE_STRIP, 0, springVAR_count); - } glPopMatrix(); -} - -static void -drawConstraint(cpConstraint *constraint) -{ - cpBody *body_a = constraint->a; - cpBody *body_b = constraint->b; - - const cpConstraintClass *klass = constraint->klass; - if(klass == cpPinJointGetClass()){ - cpPinJoint *joint = (cpPinJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(5.0f); - glBegin(GL_POINTS); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - - glBegin(GL_LINES); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - } else if(klass == cpSlideJointGetClass()){ - cpSlideJoint *joint = (cpSlideJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(5.0f); - glBegin(GL_POINTS); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - - glBegin(GL_LINES); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - } else if(klass == cpPivotJointGetClass()){ - cpPivotJoint *joint = (cpPivotJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(10.0f); - glBegin(GL_POINTS); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - } else if(klass == cpGrooveJointGetClass()){ - cpGrooveJoint *joint = (cpGrooveJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->grv_a, body_a->rot)); - cpVect b = cpvadd(body_a->p, cpvrotate(joint->grv_b, body_a->rot)); - cpVect c = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(5.0f); - glBegin(GL_POINTS); { - glVertex2f(c.x, c.y); - } glEnd(); - - glBegin(GL_LINES); { - glVertex2f(a.x, a.y); - glVertex2f(b.x, b.y); - } glEnd(); - } else if(klass == cpDampedSpringGetClass()){ - drawSpring((cpDampedSpring *)constraint, body_a, body_b); - } else { -// printf("Cannot draw constraint\n"); - } -} - -static void -drawBB(cpShape *shape, void *unused) -{ - glBegin(GL_LINE_LOOP); { - glVertex2f(shape->bb.l, shape->bb.b); - glVertex2f(shape->bb.l, shape->bb.t); - glVertex2f(shape->bb.r, shape->bb.t); - glVertex2f(shape->bb.r, shape->bb.b); - } glEnd(); -} - -// copied from cpSpaceHash.c -static inline cpHashValue -hash_func(cpHashValue x, cpHashValue y, cpHashValue n) -{ - return (x*1640531513ul ^ y*2654435789ul) % n; -} - -static void -drawSpatialHash(cpSpaceHash *hash) -{ - cpBB bb = cpBBNew(-320, -240, 320, 240); - - cpFloat dim = hash->celldim; - int n = hash->numcells; - - int l = (int)floor(bb.l/dim); - int r = (int)floor(bb.r/dim); - int b = (int)floor(bb.b/dim); - int t = (int)floor(bb.t/dim); - - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - int cell_count = 0; - - int index = hash_func(i,j,n); - for(cpSpaceHashBin *bin = hash->table[index]; bin; bin = bin->next) - cell_count++; - - GLfloat v = 1.0f - (GLfloat)cell_count/10.0f; - glColor3f(v,v,v); - glRectf(i*dim, j*dim, (i + 1)*dim, (j + 1)*dim); - } - } -} - -void -drawSpace(cpSpace *space, drawSpaceOptions *options) -{ - if(options->drawHash){ - glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_TRUE); - drawSpatialHash(space->activeShapes); - glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); - drawSpatialHash(space->staticShapes); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - } - - glLineWidth(options->lineThickness); - if(options->drawShapes){ - cpSpaceHashEach(space->activeShapes, (cpSpaceHashIterator)drawObject, space); - cpSpaceHashEach(space->staticShapes, (cpSpaceHashIterator)drawObject, space); - } - - glLineWidth(1.0f); - if(options->drawBBs){ - glColor3f(0.3f, 0.5f, 0.3f); - cpSpaceHashEach(space->activeShapes, (cpSpaceHashIterator)drawBB, NULL); - cpSpaceHashEach(space->staticShapes, (cpSpaceHashIterator)drawBB, NULL); - } - - cpArray *constraints = space->constraints; - - glColor3f(0.5f, 1.0f, 0.5f); - for(int i=0, count = constraints->num; iarr[i]); - } - - if(options->bodyPointSize){ - glPointSize(options->bodyPointSize); - - glBegin(GL_POINTS); { - glColor3f(LINE_COLOR); - cpArray *bodies = space->bodies; - for(int i=0, count = bodies->num; iarr[i]; - glVertex2f(body->p.x, body->p.y); - } - -// glColor3f(0.5f, 0.5f, 0.5f); -// cpArray *components = space->components; -// for(int i=0; inum; i++){ -// cpBody *root = components->arr[i]; -// cpBody *body = root, *next; -// do { -// next = body->node.next; -// glVertex2f(body->p.x, body->p.y); -// } while((body = next) != root); -// } - } glEnd(); - } - - if(options->collisionPointSize){ - glPointSize(options->collisionPointSize); - glBegin(GL_POINTS); { - cpArray *arbiters = space->arbiters; - for(int i=0; inum; i++){ - cpArbiter *arb = (cpArbiter*)arbiters->arr[i]; - - glColor3f(COLLISION_COLOR); - for(int i=0; inumContacts; i++){ - cpVect v = arb->contacts[i].p; - glVertex2f(v.x, v.y); - } - } - } glEnd(); - } -} diff --git a/3rdparty/chipmunk-5.3.4/Demo/drawSpace.h b/3rdparty/chipmunk-5.3.4/Demo/drawSpace.h deleted file mode 100644 index c950bfc0eb..0000000000 --- a/3rdparty/chipmunk-5.3.4/Demo/drawSpace.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef struct drawSpaceOptions { - int drawHash; - int drawBBs; - int drawShapes; - float collisionPointSize; - float bodyPointSize; - float lineThickness; -} drawSpaceOptions; - -void drawSpace(cpSpace *space, drawSpaceOptions *options); diff --git a/3rdparty/chipmunk-5.3.4/LICENSE.txt b/3rdparty/chipmunk-5.3.4/LICENSE.txt deleted file mode 100644 index 2d6563ff6d..0000000000 --- a/3rdparty/chipmunk-5.3.4/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2007 Scott Lembcke and Howling Moon Software - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_body_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_body_8h_source.html deleted file mode 100644 index 68fec282b6..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_body_8h_source.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkBody.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_constraint_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_constraint_8h_source.html deleted file mode 100644 index e2f3ccc91c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_constraint_8h_source.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkConstraint.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_extras_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_extras_8h_source.html deleted file mode 100644 index 8921f49a9e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_extras_8h_source.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkExtras.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_object_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_object_8h_source.html deleted file mode 100644 index 012a194284..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_object_8h_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkObject.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_shape_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_shape_8h_source.html deleted file mode 100644 index 19b6d2f0ae..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_shape_8h_source.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkShape.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_space_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_space_8h_source.html deleted file mode 100644 index 980d106601..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_chipmunk_space_8h_source.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSpace.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_objective_chipmunk_8h_source.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_objective_chipmunk_8h_source.html deleted file mode 100644 index 6fc5b5c856..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/_objective_chipmunk_8h_source.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -Objective Chipmunk: ObjectiveChipmunk.h Source File - - - - - - - - - - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/annotated.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/annotated.html deleted file mode 100644 index 39838b2a66..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/annotated.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Objective Chipmunk: Class List - - - - - - - - - -
-
-

Class List

-
-
-Here are the classes, structs, unions and interfaces with brief descriptions: - - - - - - - - - - - - - - - - - - - - - - - - -
<ChipmunkBaseObject>This protocol is implemented by objects that know how to add themselves to a space
ChipmunkBodyRigid bodies are the basic unit of simulation in Chipmunk
ChipmunkCircleShapeA perfect circle shape
ChipmunkConstraintConstraints connect two ChipmunkBody objects together
ChipmunkDampedRotarySpringLike a ChipmunkDampedSpring, but operates in a rotational fashion
ChipmunkDampedSpringA spring with a damper
ChipmunkGearJointGear joints constrain the rotational speed of one body to another
ChipmunkGrooveJointGroove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove
<ChipmunkObject>Allows you to add composite objects to a space in a single method call
ChipmunkPinJointPin joints hold a set distance between points on two bodies
ChipmunkPivotJointPivot joints hold two points on two bodies together allowing them to rotate freely around the pivot
ChipmunkPolyShapeA convex polygon shape
ChipmunkRatchetJointRatchet joints create rotary ratches similar to a socket wrench
ChipmunkRotaryLimitJointConstrains the angle between two bodies
ChipmunkSegmentQueryInfoHolds collision information from segment queries. You should never need to create one
ChipmunkSegmentShapeA beveled (rounded) segment shape
ChipmunkShapeAbstract base class for collsion shape types
ChipmunkShapeQueryInfoHolds collision information from segment queries. You should never need to create one
ChipmunkSimpleMotorSimple motors make two objects spin relative to each other
ChipmunkSlideJointSlide joints hold the distance between points on two bodies between a minimum and a maximum
ChipmunkSpaceChipmunk spaces are simulation containers
ChipmunkStaticCircleShapeA subclass of ChipmunkCircleShape that is added as a static shape when using add: (ChipmunkSpace)
ChipmunkStaticPolyShapeA subclass of ChipmunkPolyShape that is added as a static shape when using add: (ChipmunkSpace)
ChipmunkStaticSegmentShapeA subclass of ChipmunkSegmentShape that is added as a static shape when using add: (ChipmunkSpace)
-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/bc_s.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/bc_s.png deleted file mode 100644 index e4018628b5..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/bc_s.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_body-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_body-members.html deleted file mode 100644 index 9d15d8376b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_body-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkBody Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_circle_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_circle_shape-members.html deleted file mode 100644 index 5d43e344f5..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_circle_shape-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkCircleShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_constraint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_constraint-members.html deleted file mode 100644 index 2fd5aeca7c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_constraint-members.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkConstraint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_rotary_spring-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_rotary_spring-members.html deleted file mode 100644 index 21aed19056..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_rotary_spring-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkDampedRotarySpring Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_spring-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_spring-members.html deleted file mode 100644 index f9a764ab39..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_damped_spring-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkDampedSpring Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_gear_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_gear_joint-members.html deleted file mode 100644 index bfc46102ff..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_gear_joint-members.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkGearJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_groove_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_groove_joint-members.html deleted file mode 100644 index 8e312b38c2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_groove_joint-members.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkGrooveJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pin_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pin_joint-members.html deleted file mode 100644 index c133b2e171..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pin_joint-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkPinJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pivot_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pivot_joint-members.html deleted file mode 100644 index 5a12c39496..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_pivot_joint-members.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkPivotJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_poly_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_poly_shape-members.html deleted file mode 100644 index 91f9a0c7ed..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_poly_shape-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkPolyShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_ratchet_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_ratchet_joint-members.html deleted file mode 100644 index a60ab97568..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_ratchet_joint-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkRatchetJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_rotary_limit_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_rotary_limit_joint-members.html deleted file mode 100644 index 96994b964b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_rotary_limit_joint-members.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkRotaryLimitJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_query_info-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_query_info-members.html deleted file mode 100644 index d58a8cfbd9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_query_info-members.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkSegmentQueryInfo Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_shape-members.html deleted file mode 100644 index 14d39231ca..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_segment_shape-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkSegmentShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape-members.html deleted file mode 100644 index 12258f4802..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape_query_info-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape_query_info-members.html deleted file mode 100644 index 9e1498f2b7..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_shape_query_info-members.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkShapeQueryInfo Member List

-
-
-This is the complete list of members for ChipmunkShapeQueryInfo, including all inherited members. - - - -
contactPoints (defined in ChipmunkShapeQueryInfo)ChipmunkShapeQueryInfo
initWithShape:andPoints: (defined in ChipmunkShapeQueryInfo)ChipmunkShapeQueryInfo
shape (defined in ChipmunkShapeQueryInfo)ChipmunkShapeQueryInfo
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_simple_motor-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_simple_motor-members.html deleted file mode 100644 index b2b28873b9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_simple_motor-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkSimpleMotor Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_slide_joint-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_slide_joint-members.html deleted file mode 100644 index df233eeb56..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_slide_joint-members.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkSlideJoint Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_space-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_space-members.html deleted file mode 100644 index 6464cca7d8..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_space-members.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkSpace Member List

-
-
-This is the complete list of members for ChipmunkSpace, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
activateShapesTouchingShape:ChipmunkSpace
add:ChipmunkSpace
addBaseObjects:ChipmunkSpace
addBody:ChipmunkSpace(Extras)
addBounds:thickness:elasticity:friction:layers:group:collisionType:ChipmunkSpace(Extras)
addCollisionHandler:typeA:typeB:begin:preSolve:postSolve:separate:ChipmunkSpace
addConstraint:ChipmunkSpace(Extras)
addPostStepCallback:selector:context: (defined in ChipmunkSpace)ChipmunkSpace
addPostStepCallback:selector:key:ChipmunkSpace
addPostStepRemoval:ChipmunkSpace
addShape:ChipmunkSpace(Extras)
addShapeAHandler:typeA:typeB:begin:preSolve:postSolve:separate:ChipmunkSpace
addShapeBHandler:typeA:typeB:begin:preSolve:postSolve:separate:ChipmunkSpace
addStaticShape:ChipmunkSpace(Extras)
bbQueryAll:layers:group:ChipmunkSpace
dampingChipmunkSpace
elasticIterationsChipmunkSpace
gravityChipmunkSpace
idleSpeedThresholdChipmunkSpace
iterationsChipmunkSpace
pointQueryAll:layers:group:ChipmunkSpace
pointQueryFirst:layers:group:ChipmunkSpace
rehashShape:ChipmunkSpace
rehashStaticChipmunkSpace
remove:ChipmunkSpace
removeBaseObjects:ChipmunkSpace
removeBody:ChipmunkSpace(Extras)
removeCollisionHandlerForTypeA:andB:ChipmunkSpace
removeConstraint:ChipmunkSpace(Extras)
removeShape:ChipmunkSpace(Extras)
removeStaticShape:ChipmunkSpace(Extras)
resizeActiveHashWithDim:andCount:ChipmunkSpace
resizeStaticHashWithDim:andCount:ChipmunkSpace
segmentQueryAllFrom:to:layers:group:ChipmunkSpace
segmentQueryFirstFrom:to:layers:group:ChipmunkSpace
setDefaultCollisionHandler:begin:preSolve:postSolve:separate:ChipmunkSpace
shapeQueryAll:ChipmunkSpace
shapeTest:ChipmunkSpace
sleepTimeThresholdChipmunkSpace
spaceChipmunkSpace
staticBodyChipmunkSpace
step:ChipmunkSpace
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_circle_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_circle_shape-members.html deleted file mode 100644 index 2fc1aea7b3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_circle_shape-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkStaticCircleShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_poly_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_poly_shape-members.html deleted file mode 100644 index 103050743d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_poly_shape-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkStaticPolyShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_segment_shape-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_segment_shape-members.html deleted file mode 100644 index d7bb3ea29a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/class_chipmunk_static_segment_shape-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

ChipmunkStaticSegmentShape Member List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/classes.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/classes.html deleted file mode 100644 index 1819e9a3ee..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/classes.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -Objective Chipmunk: Alphabetical List - - - - - - - - - -
-
-

Class Index

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/closed.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/closed.png deleted file mode 100644 index b7d4bd9fef..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/closed.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/deprecated.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/deprecated.html deleted file mode 100644 index b95cca3506..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/deprecated.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -Objective Chipmunk: Deprecated List - - - - - - - - - -
-
-

Deprecated List

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.css b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.css deleted file mode 100644 index 0d71dee0e6..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.css +++ /dev/null @@ -1,656 +0,0 @@ -/* The standard CSS for doxygen */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; -} - -/* @group Heading Levels */ - -h1 { - font-size: 150%; -} - -h2 { - font-size: 120%; -} - -h3 { - font-size: 100%; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - padding: 2px; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code { - color: #4665A2; -} - -a.codeRef { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 3px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.memitem { - padding: 0; - margin-bottom: 10px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - -} - -.memdoc { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 2px 5px; - background-color: #FBFCFD; - border-top-width: 0; - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right: 15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.navpath a:hover -{ - color:#6884BD; -} - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.png deleted file mode 100644 index 635ed52fce..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/doxygen.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/files.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/files.html deleted file mode 100644 index f55883c28e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/files.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - -Objective Chipmunk: File Index - - - - - - - - - -
-
-

File List

-
-
-Here is a list of all documented files with brief descriptions: - - - - - - - -
ChipmunkBody.h [code]
ChipmunkConstraint.h [code]
ChipmunkExtras.h [code]
ChipmunkObject.h [code]
ChipmunkShape.h [code]
ChipmunkSpace.h [code]
ObjectiveChipmunk.h [code]
-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions.html deleted file mode 100644 index 7ef18d5ae3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions.html +++ /dev/null @@ -1,613 +0,0 @@ - - - - -Objective Chipmunk: Class Members - - - - - - - - - -
-Here is a list of all documented class members with links to the class documentation for each member: - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- v -

- - -

- w -

-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_func.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_func.html deleted file mode 100644 index 7ec018081a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_func.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - -Objective Chipmunk: Class Members - Functions - - - - - - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- g -

- - -

- i -

- - -

- l -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- w -

-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_prop.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_prop.html deleted file mode 100644 index efbd362744..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/functions_prop.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - -Objective Chipmunk: Class Members - Properties - - - - - - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- v -

-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/hierarchy.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/hierarchy.html deleted file mode 100644 index 9033d720e1..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/hierarchy.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -Objective Chipmunk: Hierarchical Index - - - - - - - - - -
-
-

Class Hierarchy

-
- - - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/index.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/index.html deleted file mode 100644 index abf1db8ca8..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -Objective Chipmunk: Objective-Chipmunk API reference. - - - - - - - - - -
-
-

Objective-Chipmunk API reference.

-
-
-

5.3.2

What is Chipmunk?

-

First of all, Chipmunk is a 2D rigid body physics library distributed under the MIT license. It is intended to be fast, portable, numerically stable, and easy to use. For this reason it’s been used in hundreds of games on every system you can name. This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! I’ve put thousands of hours of work over many years to make Chipmunk what it is today.

-

Objective-Chipmunk is an Objective-C wrapper for Chipmunk that makes developing physics based iPhone games a snap. It integrates with the Objective-C memory model and provides a number of higher level APIs that ease development and save you time. While we do charge for Objective-Chipmunk, it will almost certainly save you more time than the small cost to license it. As a bonus, you’ll be helping to ensure that we can afford to continue to work on Chipmunk improvements.

-

You can find out more about Objective-Chipmunk on our webpage. Objective-Chipmunk

-

Where do I start?

-

Probably the best place to start is to by going over the Simple Objective-Chipmunk tutorial. This tutorial is included with the base Chipmunk source distribution. So you probably already have it. Check in the Objective-Chipmunk/ directory.

-

From there, you probably want to skim over the latest documentation. While geared towards C developers, it introduces all the important building blocks. The Objective-C API simply takes things to the next logical step.

-
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/installdox b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/installdox deleted file mode 100644 index b22e9c8124..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/installdox +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/perl - -%subst = ( ); -$quiet = 0; - -if (open(F,"search.cfg")) -{ - $_= ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; - $_= ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; -} - -while ( @ARGV ) { - $_ = shift @ARGV; - if ( s/^-// ) { - if ( /^l(.*)/ ) { - $v = ($1 eq "") ? shift @ARGV : $1; - ($v =~ /\/$/) || ($v .= "/"); - $_ = $v; - if ( /(.+)\@(.+)/ ) { - if ( exists $subst{$1} ) { - $subst{$1} = $2; - } else { - print STDERR "Unknown tag file $1 given with option -l\n"; - &usage(); - } - } else { - print STDERR "Argument $_ is invalid for option -l\n"; - &usage(); - } - } - elsif ( /^q/ ) { - $quiet = 1; - } - elsif ( /^\?|^h/ ) { - &usage(); - } - else { - print STDERR "Illegal option -$_\n"; - &usage(); - } - } - else { - push (@files, $_ ); - } -} - -foreach $sub (keys %subst) -{ - if ( $subst{$sub} eq "" ) - { - print STDERR "No substitute given for tag file `$sub'\n"; - &usage(); - } - elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) - { - print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; - } -} - -if ( ! @files ) { - if (opendir(D,".")) { - foreach $file ( readdir(D) ) { - $match = ".html"; - next if ( $file =~ /^\.\.?$/ ); - ($file =~ /$match/) && (push @files, $file); - ($file =~ "tree.js") && (push @files, $file); - } - closedir(D); - } -} - -if ( ! @files ) { - print STDERR "Warning: No input files given and none found!\n"; -} - -foreach $f (@files) -{ - if ( ! $quiet ) { - print "Editing: $f...\n"; - } - $oldf = $f; - $f .= ".bak"; - unless (rename $oldf,$f) { - print STDERR "Error: cannot rename file $oldf\n"; - exit 1; - } - if (open(F,"<$f")) { - unless (open(G,">$oldf")) { - print STDERR "Error: opening file $oldf for writing\n"; - exit 1; - } - if ($oldf ne "tree.js") { - while () { - s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; - print G "$_"; - } - } - else { - while () { - s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; - print G "$_"; - } - } - } - else { - print STDERR "Warning file $f does not exist\n"; - } - unlink $f; -} - -sub usage { - print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; - print STDERR "Options:\n"; - print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; - print STDERR " -q Quiet mode\n\n"; - exit 1; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_body.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_body.html deleted file mode 100644 index 2ec8c36d47..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_body.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkBody Class Reference - - - - - - - - - -
- -
-

ChipmunkBody Class Reference

-
-
- -

Rigid bodies are the basic unit of simulation in Chipmunk. -More...

- -

#import <ChipmunkBody.h>

- -

Inherits ChipmunkBaseObject-p.

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithMass:andMoment:
 Initialize a rigid body with the given mass and moment of inertia.
(id) - initStaticBody
 Initialize a rigid body with infinite mass and moment.
(cpVect) - local2world:
 Convert from body local to world coordinates.
(cpVect) - world2local:
 Convert from world to body local Coordinates.
(void) - resetForces
 Reset force and torque.
(void) - applyForce:offset:
 Apply a force to a rigid body.
(void) - applyImpulse:offset:
 Apply an impulse to a rigid body.
-(void) - activate
 Wake up the body if it's sleeping, or reset the idle timer if it's active.
(void) - sleepWithGroup:
 Force the body to sleep immediately.
(void) - sleep
 Equivalent to [ChipmunkBody sleepWithGroup:nil].
-(void) - addToSpace:
 Implements the ChipmunkBaseObject protocol, not particularly useful outside of the library code.
-(void) - removeFromSpace:
 Implements the ChipmunkBaseObject protocol, not particularly useful outside of the library code.
-(CGAffineTransform) - affineTransform
 Get an affine transform to match this body.

-Static Public Member Functions

(id) + bodyWithMass:andMoment:
 Create an autoreleased rigid body with the given mass and moment.
(id) + staticBody
 Create an autoreleased rigid body with infinite mass and moment.

-Properties

-cpFloat mass
 Mass of the rigid body. Mass does not have to be expressed in any particular units, but relative masses should be consistent.
-cpFloat moment
 Moment of inertia of the body. The mass tells you how hard it is to push an object, the MoI tells you how hard it is to spin the object. Don't try to guess the MoI, use the cpMomentFor*() functions to try and estimate it.
-cpVect pos
 The position of the rigid body's center of gravity.
-cpVect vel
 The linear velocity of the rigid body.
-cpVect force
 The linear force applied to the rigid body. Unlike in some physics engines, the force does not reset itself during each step. Make sure that you are reseting the force between frames if that is what you intended.
-cpFloat angle
 The rotation angle of the rigid body in radians.
-cpFloat angVel
 The angular velocity of the rigid body in radians per second.
-cpFloat torque
 The torque being applied to the rigid body. Like force, this property is not reset every frame.
-cpVect rot
 A unit length vector vector that stores the current rotation of the body as a 2D spinor or complex number. Can be used for fast rotation.
-cpBody * body
 Returns a pointer to the underlying cpBody C struct.
id data
 An object that this constraint is associated with.
-bool isSleeping
 Has the body been put to sleep by the space?
-bool isRogue
 Has the body not been added to any spaces?
-bool isStatic
 Is the body the static body associated with a space?
-

Detailed Description

-

Rigid bodies are the basic unit of simulation in Chipmunk.

-

They hold the physical properties of an object (mass, position, rotation, velocity, etc.). After creating a ChipmunkBody object, you can attach collision shapes (ChipmunkShape) and joints (ChipmunkConstraint) to it.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
- (void) applyForce: (cpVect)  force
offset:(cpVect)  offset 
-
-
- -

Apply a force to a rigid body.

-

An offset of cpvzero is equivalent to adding directly to the force property.

-
Parameters:
- - - -
force A force in expressed in absolute (word) coordinates.
offset An offset expressed in world coordinates. Note that it is still an offset, meaning that it's position is relative, but the rotation is not.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
- (void) applyImpulse: (cpVect)  impulse
offset:(cpVect)  offset 
-
-
- -

Apply an impulse to a rigid body.

-
Parameters:
- - - -
impulse An impulse in expressed in absolute (word) coordinates.
offset An offset expressed in world coordinates. Note that it is still an offset, meaning that it's position is relative, but the rotation is not.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
+ (id) bodyWithMass: (cpFloat)  mass
andMoment:(cpFloat)  moment 
-
-
- -

Create an autoreleased rigid body with the given mass and moment.

-

Guessing the moment of inertia is usually a bad idea. Use the moment estimation functions (cpMomentFor*()).

- -
-
- -
-
- - - - - - - - -
- (id) initStaticBody  
-
-
- -

Initialize a rigid body with infinite mass and moment.

-

This is most useful when you want to create a rogue body for controlling a moving platform or some other strictly controlled object.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
- (id) initWithMass: (cpFloat)  mass
andMoment:(cpFloat)  moment 
-
-
- -

Initialize a rigid body with the given mass and moment of inertia.

-

Guessing the moment of inertia is usually a bad idea. Use the moment estimation functions (cpMomentFor*()).

- -
-
- -
-
- - - - - - - - - -
- (cpVect) local2world: (cpVect)  v 
-
-
- -

Convert from body local to world coordinates.

-

Convert a point in world (absolute) coordinates to body local coordinates affected by the position and rotation of the rigid body.

- -
-
- -
-
- - - - - - - - -
- (void) resetForces  
-
-
- -

Reset force and torque.

-

Set the force on this rigid body to cpvzero, and set the torque to 0.0.

- -
-
- -
-
- - - - - - - - -
- (void) sleep  
-
-
- -

Equivalent to [ChipmunkBody sleepWithGroup:nil].

-

That is the object is forced to sleep immediately, but is not grouped with any other sleeping bodies.

- -
-
- -
-
- - - - - - - - - -
- (void) sleepWithGroup: (ChipmunkBody *)  group 
-
-
- -

Force the body to sleep immediately.

-

The body will be added to the same group as . When any object in a group is woken up, all of the bodies are woken up with it. If group is nil, then a new group is created and the body is added to it. It is an error pass a non-sleeping body as group. This is useful if you want an object to be inactive until something hits it such as a pile of boxes you want the player to plow through or a stalactite hanging from a cave ceiling. Make sure the body is fully set up before you call this. Adding this body or any shapes or constraints attached to it to a space, or modifying any of their properties automatically wake a body up.

- -
-
- -
-
- - - - - - - - -
+ (id) staticBody  
-
-
- -

Create an autoreleased rigid body with infinite mass and moment.

-

This is most useful when you want to create a rogue body for controlling a moving platform or some other strictly controlled object.

- -
-
- -
-
- - - - - - - - - -
- (cpVect) world2local: (cpVect)  v 
-
-
- -

Convert from world to body local Coordinates.

-

Convert a point in body local coordinates coordinates to world (absolute) coordinates.

- -
-
-

Property Documentation

- -
-
- - - - -
- (id) data [read, write, assign]
-
-
- -

An object that this constraint is associated with.

-

You can use this get a reference to your game object or controller object from within callbacks.

-
Attention:
Like most delegate properties this is a weak reference and does not call retain. This prevents reference cycles from occuring.
- -

Reimplemented from <ChipmunkBaseObject>.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_circle_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_circle_shape.html deleted file mode 100644 index 0c0f0ba8bf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_circle_shape.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkCircleShape Class Reference - - - - - - - - - -
- -
-

ChipmunkCircleShape Class Reference

-
-
- -

A perfect circle shape. -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkShape.

- -

Inherited by ChipmunkStaticCircleShape.

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

-(id) - initWithBody:radius:offset:
 Initialize a circle shape with the given radius and offset from the center of gravity.

-Static Public Member Functions

-(id) + circleWithBody:radius:offset:
 Create an autoreleased circle shape with the given radius and offset from the center of gravity.

-Properties

-cpFloat radius
 The radius of the circle.
-cpVect offset
 The offset from the center of gravity.
-

Detailed Description

-

A perfect circle shape.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_constraint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_constraint.html deleted file mode 100644 index cad0cfc28f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_constraint.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkConstraint Class Reference - - - - - - - - - -
- -
-

ChipmunkConstraint Class Reference

-
-
- -

Constraints connect two ChipmunkBody objects together. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkBaseObject-p.

- -

Inherited by ChipmunkDampedRotarySpring, ChipmunkDampedSpring, ChipmunkGearJoint, ChipmunkGrooveJoint, ChipmunkPinJoint, ChipmunkPivotJoint, ChipmunkRatchetJoint, ChipmunkRotaryLimitJoint, ChipmunkSimpleMotor, and ChipmunkSlideJoint.

- -

List of all members.

- - - - - - - - - - - - - - - - -

-Properties

-cpConstraint * constraint
 Returns a pointer to the underlying cpConstraint C struct.
-ChipmunkBodybodyA
 The first ChipmunkBody the constraint controls.
-ChipmunkBodybodyB
 The second ChipmunkBody the constraint controls.
cpFloat maxForce
 Maximum force this constraint is allowed to use (defalts to infinity).
cpFloat biasCoef
 Amount of constraint error to correct each step (defaults to 10%).
cpFloat maxBias
 Maximum rate (speed) that a joint can be corrected at (defaults to infinity).
id data
 An object that this constraint is associated with.
-

Detailed Description

-

Constraints connect two ChipmunkBody objects together.

-

Most often constraints are simple joints, but can also be things like motors, friction generators or servos.

- - - - - - -

Property Documentation

- -
-
- - - - -
- (cpFloat) biasCoef [read, write, assign]
-
-
- -

Amount of constraint error to correct each step (defaults to 10%).

-

This can be used to fine tune constraint parameters.

- -
-
- -
-
- - - - -
- (id) data [read, write, assign]
-
-
- -

An object that this constraint is associated with.

-

You can use this get a reference to your game object or controller object from within callbacks.

-
Attention:
Like most delegate properties this is a weak reference and does not call retain. This prevents reference cycles from occuring.
- -

Reimplemented from <ChipmunkBaseObject>.

- -
-
- -
-
- - - - -
- (cpFloat) maxBias [read, write, assign]
-
-
- -

Maximum rate (speed) that a joint can be corrected at (defaults to infinity).

-

Setting this value to a finite value allows you to control a joint like a

- -
-
- -
-
- - - - -
- (cpFloat) maxForce [read, write, assign]
-
-
- -

Maximum force this constraint is allowed to use (defalts to infinity).

-

This allows joints to be pulled apart if too much force is applied to them. It also allows you to use constraints as force or friction generators for controlling bodies.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_rotary_spring.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_rotary_spring.html deleted file mode 100644 index c0e193a6cd..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_rotary_spring.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkDampedRotarySpring Class Reference - - - - - - - - - -
- -
-

ChipmunkDampedRotarySpring Class Reference

-
-
- -

Like a ChipmunkDampedSpring, but operates in a rotational fashion. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:restAngle:stiffness:damping:
 Initialize a damped rotary spring between the given bodies.

-Static Public Member Functions

(ChipmunkDampedRotarySpring *) + dampedRotarySpringWithBodyA:bodyB:restAngle:stiffness:damping:
 Create an autoreleased damped rotary spring between the given bodies.

-Properties

-cpFloat restAngle
 The angular offset the spring attempts to keep between the two bodies.
-cpFloat stiffness
 The young's modulus of the spring.
-cpFloat damping
 The amount of viscous damping to apply.
-

Detailed Description

-

Like a ChipmunkDampedSpring, but operates in a rotational fashion.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkDampedRotarySpring *) dampedRotarySpringWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
restAngle:(cpFloat)  restAngle
stiffness:(cpFloat)  stiffness
damping:(cpFloat)  damping 
-
-
- -

Create an autoreleased damped rotary spring between the given bodies.

-
Parameters:
- - - - -
restAngle The angular offset in radians the spring attempts to keep between the two bodies.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
restAngle:(cpFloat)  restAngle
stiffness:(cpFloat)  stiffness
damping:(cpFloat)  damping 
-
-
- -

Initialize a damped rotary spring between the given bodies.

-
Parameters:
- - - - -
restAngle The angular offset in radians the spring attempts to keep between the two bodies.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_spring.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_spring.html deleted file mode 100644 index 2ccf574c21..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_damped_spring.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkDampedSpring Class Reference - - - - - - - - - -
- -
-

ChipmunkDampedSpring Class Reference

-
-
- -

A spring with a damper. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:anchr1:anchr2:restLength:stiffness:damping:
 Initialize a damped spring between two bodies at the given anchor points.

-Static Public Member Functions

(ChipmunkDampedSpring *) + dampedSpringWithBodyA:bodyB:anchr1:anchr2:restLength:stiffness:damping:
 Create an autoreleased damped spring between two bodies at the given anchor points.

-Properties

-cpVect anchr1
 The anchor point on the first body.
-cpVect anchr2
 The anchor point on the second body.
-cpFloat restLength
 The length the spring wants to contract or expand to.
-cpFloat stiffness
 The young's modulus of the spring.
-cpFloat damping
 The amount of viscous damping to apply.
-

Detailed Description

-

A spring with a damper.

-

While a spring is not technically a constraint, the damper is. The spring forces are simply a convenience.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkDampedSpring *) dampedSpringWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2
restLength:(cpFloat)  restLength
stiffness:(cpFloat)  stiffness
damping:(cpFloat)  damping 
-
-
- -

Create an autoreleased damped spring between two bodies at the given anchor points.

-
Parameters:
- - - - -
restLength The length the spring wants to contract or expand to.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2
restLength:(cpFloat)  restLength
stiffness:(cpFloat)  stiffness
damping:(cpFloat)  damping 
-
-
- -

Initialize a damped spring between two bodies at the given anchor points.

-
Parameters:
- - - - -
restLength The length the spring wants to contract or expand to.
stiffness The young's modulus of the spring.
damping The amount of viscous damping to apply.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_gear_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_gear_joint.html deleted file mode 100644 index 6cf8b556c9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_gear_joint.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkGearJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkGearJoint Class Reference

-
-
- -

Gear joints constrain the rotational speed of one body to another. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:phase:ratio:
 Initialize a gear joint between the given bodies.

-Static Public Member Functions

(ChipmunkGearJoint *) + gearJointWithBodyA:bodyB:phase:ratio:
 Create an autoreleased gear joint between the given bodies.

-Properties

-cpFloat phase
 The angular offset in radians.
-cpFloat ratio
 The ratio of the rotational speeds.
-

Detailed Description

-

Gear joints constrain the rotational speed of one body to another.

-

A ratio of 1.0 will lock the rotation of two bodies together, and negative ratios will cause them to spin in opposite directions. You can also use gear joints as rotary servos by setting ChipmunkConstraint.maxForce and ChipmunkConstraint.maxBias to finite values and changing the ChipmunkGearJoint.phase property.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkGearJoint *) gearJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
phase:(cpFloat)  phase
ratio:(cpFloat)  ratio 
-
-
- -

Create an autoreleased gear joint between the given bodies.

-
Parameters:
- - - -
phase The angular offset.
ratio The ratio of the rotational speeds.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
phase:(cpFloat)  phase
ratio:(cpFloat)  ratio 
-
-
- -

Initialize a gear joint between the given bodies.

-
Parameters:
- - - -
phase The angular offset in radians.
ratio The ratio of the rotational speeds.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_groove_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_groove_joint.html deleted file mode 100644 index 0875d6d827..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_groove_joint.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkGrooveJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkGrooveJoint Class Reference

-
-
- -

Groove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:groove_a:groove_b:anchr2:
 Initialize a groove joint between the two bodies.

-Static Public Member Functions

(ChipmunkGrooveJoint *) + grooveJointWithBodyA:bodyB:groove_a:groove_b:anchr2:
 Create an autoreleased groove joint between the two bodies.
-

Detailed Description

-

Groove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkGrooveJoint *) grooveJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
groove_a:(cpVect)  groove_a
groove_b:(cpVect)  groove_b
anchr2:(cpVect)  anchr2 
-
-
- -

Create an autoreleased groove joint between the two bodies.

-

Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.

-
Parameters:
- - - - -
groove_a The start of the line segment on the first body.
groove_b The end of the line segment on the first body.
anchr2 The anchor point on the second body that is held to the line segment on the first.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
groove_a:(cpVect)  groove_a
groove_b:(cpVect)  groove_b
anchr2:(cpVect)  anchr2 
-
-
- -

Initialize a groove joint between the two bodies.

-

Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.

-
Parameters:
- - - - -
groove_a The start of the line segment on the first body.
groove_b The end of the line segment on the first body.
anchr2 The anchor point on the second body that is held to the line segment on the first.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pin_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pin_joint.html deleted file mode 100644 index 2204a49079..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pin_joint.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkPinJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkPinJoint Class Reference

-
-
- -

Pin joints hold a set distance between points on two bodies. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:anchr1:anchr2:
 Initialize a pin joint between the two bodies with the given anchor points.

-Static Public Member Functions

(ChipmunkPinJoint *) + pinJointWithBodyA:bodyB:anchr1:anchr2:
 Create an autoreleased pin joint between the two bodies with the given anchor points.

-Properties

-cpVect anchr1
 The anchor point on the first body.
-cpVect anchr2
 The anchor point on the second body.
-cpFloat dist
 The distance between the two anchor points that the joint keeps.
-

Detailed Description

-

Pin joints hold a set distance between points on two bodies.

-

Think of them as connecting a solid pin or rod between the two anchor points.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2 
-
-
- -

Initialize a pin joint between the two bodies with the given anchor points.

-

The distance is calculated when the joint is initialized. It can be set explicitly using the property.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkPinJoint *) pinJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2 
-
-
- -

Create an autoreleased pin joint between the two bodies with the given anchor points.

-

The distance is calculated when the joint is initialized. It can be set explicitly using the property.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pivot_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pivot_joint.html deleted file mode 100644 index 7c6565af04..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_pivot_joint.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkPivotJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkPivotJoint Class Reference

-
-
- -

Pivot joints hold two points on two bodies together allowing them to rotate freely around the pivot. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:anchr1:anchr2:
 Initialize a pivot joint between the two bodies with the two anchor points.
-(id) - initWithBodyA:bodyB:pivot:
 Initialize a pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates.

-Static Public Member Functions

(ChipmunkPivotJoint *) + pivotJointWithBodyA:bodyB:anchr1:anchr2:
 Create an autoreleased pivot joint between the two bodies with the two anchor points.
-(ChipmunkPivotJoint *) + pivotJointWithBodyA:bodyB:pivot:
 Create an autoreleased pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates.

-Properties

-cpVect anchr1
 The anchor point on the first body.
-cpVect anchr2
 The anchor point on the second body.
-

Detailed Description

-

Pivot joints hold two points on two bodies together allowing them to rotate freely around the pivot.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2 
-
-
- -

Initialize a pivot joint between the two bodies with the two anchor points.

-

Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkPivotJoint *) pivotJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
anchr1:(cpVect)  anchr1
anchr2:(cpVect)  anchr2 
-
-
- -

Create an autoreleased pivot joint between the two bodies with the two anchor points.

-

Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_poly_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_poly_shape.html deleted file mode 100644 index 4568657d80..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_poly_shape.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkPolyShape Class Reference - - - - - - - - - -
- -
-

ChipmunkPolyShape Class Reference

-
-
- -

A convex polygon shape. -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkShape.

- -

Inherited by ChipmunkStaticPolyShape.

- -

List of all members.

- - - - - - - - - - - - - - - - -

-Public Member Functions

-(id) - initWithBody:count:verts:offset:
 Initialize a polygon shape from the given vertex and offset from the center of gravity.
-(id) - initBoxWithBody:width:height:
 Initialize a box shape centered on the center of gravity.
-(cpVect) - getVertex:
 Access the vertexes of this polygon.

-Static Public Member Functions

-(id) + polyWithBody:count:verts:offset:
 Create an autoreleased polygon shape from the given vertex and offset from the center of gravity.
-(id) + boxWithBody:width:height:
 Create an autoreleased box shape centered on the center of gravity.

-Properties

-int count
 The number of vertexes in this polygon.
-

Detailed Description

-

A convex polygon shape.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_ratchet_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_ratchet_joint.html deleted file mode 100644 index ae2fba8c8d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_ratchet_joint.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkRatchetJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkRatchetJoint Class Reference

-
-
- -

Ratchet joints create rotary ratches similar to a socket wrench. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:phase:ratchet:
 Initialize a ratchet joint between the given bodies.

-Static Public Member Functions

(ChipmunkRatchetJoint *) + ratchetJointWithBodyA:bodyB:phase:ratchet:
 Create an autoreleased ratchet joint between the given bodies.

-Properties

-cpFloat angle
 The current ratchet position in radians.
-cpFloat phase
 The angular offset of the ratchet positions in radians.
-cpFloat ratchet
 The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction.
-

Detailed Description

-

Ratchet joints create rotary ratches similar to a socket wrench.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
phase:(cpFloat)  phase
ratchet:(cpFloat)  ratchet 
-
-
- -

Initialize a ratchet joint between the given bodies.

-
Parameters:
- - - -
phase The angular offset of the ratchet positions in radians.
ratchet The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkRatchetJoint *) ratchetJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
phase:(cpFloat)  phase
ratchet:(cpFloat)  ratchet 
-
-
- -

Create an autoreleased ratchet joint between the given bodies.

-
Parameters:
- - - -
phase The angular offset of the ratchet positions in radians.
ratchet The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_rotary_limit_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_rotary_limit_joint.html deleted file mode 100644 index a99dfb0037..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_rotary_limit_joint.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkRotaryLimitJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkRotaryLimitJoint Class Reference

-
-
- -

Constrains the angle between two bodies. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

(id) - initWithBodyA:bodyB:min:max:
 Create an autoreleased rotary limit joint between the two bodies and angular range in radians.

-Static Public Member Functions

(ChipmunkRotaryLimitJoint *) + rotaryLimitJointWithBodyA:bodyB:min:max:
 Create an autoreleased rotary limit joint between the two bodies and angular range in radians.

-Properties

-cpFloat min
 The minimum angular delta of the joint in radians.
-cpFloat max
 The maximum angular delta of the joint in radians.
-

Detailed Description

-

Constrains the angle between two bodies.

-

This joint is often used in conjuction with a separate ChipmunkPivotJoint in order to limit the rotation around the pivot.

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (id) initWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
min:(cpFloat)  min
max:(cpFloat)  max 
-
-
- -

Create an autoreleased rotary limit joint between the two bodies and angular range in radians.

-

Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ (ChipmunkRotaryLimitJoint *) rotaryLimitJointWithBodyA: (ChipmunkBody *)  a
bodyB:(ChipmunkBody *)  b
min:(cpFloat)  min
max:(cpFloat)  max 
-
-
- -

Create an autoreleased rotary limit joint between the two bodies and angular range in radians.

-

Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_query_info.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_query_info.html deleted file mode 100644 index 74e8af9676..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_query_info.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSegmentQueryInfo Class Reference - - - - - - - - - -
- -
-

ChipmunkSegmentQueryInfo Class Reference

-
-
- -

Holds collision information from segment queries. You should never need to create one. -More...

- -

#import <ChipmunkShape.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-(id) - initWithStart:end:

-Properties

-cpSegmentQueryInfo * info
 Returns a pointer to the underlying cpSegmentQueryInfo C struct.
-ChipmunkShapeshape
 The ChipmunkShape found.
-cpFloat t
 The percentage between the start and end points where the collision occurred.
-cpVect normal
 The normal of the collision with the shape.
-cpVect point
 The point of the collision in absolute (world) coordinates.
-cpFloat dist
 The distance from the start point where the collision occurred.
-cpVect start
 The start point.
-cpVect end
 The end point.
-

Detailed Description

-

Holds collision information from segment queries. You should never need to create one.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_shape.html deleted file mode 100644 index 23fe3c6278..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_segment_shape.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSegmentShape Class Reference - - - - - - - - - -
- -
-

ChipmunkSegmentShape Class Reference

-
-
- -

A beveled (rounded) segment shape. -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkShape.

- -

Inherited by ChipmunkStaticSegmentShape.

- -

List of all members.

- - - - - - - - - - - - - - - - -

-Public Member Functions

-(id) - initWithBody:from:to:radius:
 Initialize a segment shape with the given endpoints and radius.

-Static Public Member Functions

-(id) + segmentWithBody:from:to:radius:
 Create an autoreleased segment shape with the given endpoints and radius.

-Properties

-cpVect a
 The start of the segment shape.
-cpVect b
 The end of the segment shape.
-cpVect normal
 The normal of the segment shape.
-cpFloat radius
 The beveling radius of the segment shape.
-

Detailed Description

-

A beveled (rounded) segment shape.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape.html deleted file mode 100644 index 5b846ec3a9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkShape Class Reference - - - - - - - - - -
- -
-

ChipmunkShape Class Reference

-
-
- -

Abstract base class for collsion shape types. -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkBaseObject-p.

- -

Inherited by ChipmunkCircleShape, ChipmunkPolyShape, and ChipmunkSegmentShape.

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-(cpBB) - cacheBB
 Update and cache the axis-aligned bounding box for this shape.
-(bool) - pointQuery:
 Check if a point in absolute coordinates lies within the shape.

-Properties

-cpShape * shape
 Returns a pointer to the underlying cpShape C struct.
-ChipmunkBodybody
 The ChipmunkBody that this shape is attached to.
-cpBB bb
 The axis-aligned bounding box for this shape.
-BOOL sensor
 Sensor shapes send collision callback messages, but don't create a collision response.
-cpFloat elasticity
 How bouncy this shape is.
-cpFloat friction
 How much friction this shape has.
cpVect surfaceVel
 The velocity of the shape's surface.
id collisionType
 An object reference used as a collision type identifier.
id group
 An object reference used as a collision group identifier.
-cpLayers layers
 A layer bitmask that defines which objects.
id data
 An object that this shape is associated with.
-

Detailed Description

-

Abstract base class for collsion shape types.

-

Property Documentation

- -
-
- - - - -
- (id) collisionType [read, write, assign]
-
-
- -

An object reference used as a collision type identifier.

-

This is used when defining collision handlers.

-
Attention:
Like most delegate properties this is a weak reference and does not call retain.
- -
-
- -
-
- - - - -
- (id) data [read, write, assign]
-
-
- -

An object that this shape is associated with.

-

You can use this get a reference to your game object or controller object from within callbacks.

-
Attention:
Like most delegate properties this is a weak reference and does not call retain. This prevents reference cycles from occuring.
- -

Reimplemented from <ChipmunkBaseObject>.

- -
-
- -
-
- - - - -
- (id) group [read, write, assign]
-
-
- -

An object reference used as a collision group identifier.

-

Shapes with the same group do not collide.

-
Attention:
Like most delegate properties this is a weak reference and does not call retain.
- -
-
- -
-
- - - - -
- (cpVect) surfaceVel [read, write, assign]
-
-
- -

The velocity of the shape's surface.

-

This velocity is used in the collision response when calculating the friction only.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape_query_info.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape_query_info.html deleted file mode 100644 index 75e410d276..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_shape_query_info.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkShapeQueryInfo Class Reference - - - - - - - - - -
- -
-

ChipmunkShapeQueryInfo Class Reference

-
-
- -

Holds collision information from segment queries. You should never need to create one. -More...

- -

#import <ChipmunkShape.h>

- -

List of all members.

- - - - - - -

-Public Member Functions

-(id) - initWithShape:andPoints:

-Properties

-ChipmunkShapeshape
-cpContactPointSet * contactPoints
-

Detailed Description

-

Holds collision information from segment queries. You should never need to create one.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_simple_motor.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_simple_motor.html deleted file mode 100644 index c871333c3f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_simple_motor.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSimpleMotor Class Reference - - - - - - - - - -
- -
-

ChipmunkSimpleMotor Class Reference

-
-
- -

Simple motors make two objects spin relative to each other. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - -

-Public Member Functions

-(id) - initWithBodyA:bodyB:rate:
 Initialize a simple motor between the given bodies and relative rotation rate in radians per second.

-Static Public Member Functions

-(ChipmunkSimpleMotor *) + simpleMotorWithBodyA:bodyB:rate:
 Create an autoreleased simple motor between the given bodies and relative rotation rate in radians per second.

-Properties

-cpFloat rate
 The relative rotation speed of the two bodies in radians per second.
-

Detailed Description

-

Simple motors make two objects spin relative to each other.

-

They are most often used with the ChipmunkConstraint.maxForce property set to a finite value.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_slide_joint.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_slide_joint.html deleted file mode 100644 index 7039aebfe3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_slide_joint.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSlideJoint Class Reference - - - - - - - - - -
- -
-

ChipmunkSlideJoint Class Reference

-
-
- -

Slide joints hold the distance between points on two bodies between a minimum and a maximum. -More...

- -

#import <ChipmunkConstraint.h>

- -

Inherits ChipmunkConstraint.

- -

List of all members.

- - - - - - - - - - - - - - - - -

-Public Member Functions

-(id) - initWithBodyA:bodyB:anchr1:anchr2:min:max:
 Initialize a slide joint between the two bodies with the given anchor points and distance range.

-Static Public Member Functions

-(ChipmunkSlideJoint *) + slideJointWithBodyA:bodyB:anchr1:anchr2:min:max:
 Create an autoreleased slide joint between the two bodies with the given anchor points and distance range.

-Properties

-cpVect anchr1
 The anchor point on the first body.
-cpVect anchr2
 The anchor point on the second body.
-cpFloat min
 The minimum allowed distance between anchor points.
-cpFloat max
 The maximum allowed distance between anchor points.
-

Detailed Description

-

Slide joints hold the distance between points on two bodies between a minimum and a maximum.

-

Think of them as a telescoping ChipmunkPinJoint.

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_space.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_space.html deleted file mode 100644 index bbcea8fb9e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_space.html +++ /dev/null @@ -1,667 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkSpace Class Reference - - - - - - - - - -
- -
-

ChipmunkSpace Class Reference

-
-
- -

Chipmunk spaces are simulation containers. -More...

- -

#import <ChipmunkSpace.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

(void) - setDefaultCollisionHandler:begin:preSolve:postSolve:separate:
 Set the default collision handler.
(void) - addCollisionHandler:typeA:typeB:begin:preSolve:postSolve:separate:
 Set a collision handler to handle specific collision types.
(void) - addShapeAHandler:typeA:typeB:begin:preSolve:postSolve:separate:
 Deprecated in 5.3.0.
(void) - addShapeBHandler:typeA:typeB:begin:preSolve:postSolve:separate:
 Deprecated in 5.3.0.
-(void) - removeCollisionHandlerForTypeA:andB:
 Remove a collision handler.
(id) - add:
 Add an object to the space.
(void) - addBaseObjects:
 Add a collection of ChipmunkBaseObject objects to the space.
(id) - remove:
 Remove an object from the space.
(void) - removeBaseObjects:
 Remove a collection of ChipmunkBaseObject objects from the space.
-(void) - addPostStepCallback:selector:context:
(void) - addPostStepCallback:selector:key:
 Define a callback to be run just before [ChipmunkSpace step:] finishes.
-(void) - addPostStepRemoval:
 Remove the Chipmunk Object from the space at the end of the step:
-(NSArray *) - pointQueryAll:layers:group:
 Returns a NSArray of all shapes that overlap the given point. The point is treated as having the given group and layers.
-(ChipmunkShape *) - pointQueryFirst:layers:group:
 Returns the first shape that overlaps the given point. The point is treated as having the given group and layers.
-(NSArray *) - segmentQueryAllFrom:to:layers:group:
 Return a NSArray of ChipmunkSegmentQueryInfo objects for all the shapes that overlap the segment. The objects are unsorted.
-(ChipmunkSegmentQueryInfo *) - segmentQueryFirstFrom:to:layers:group:
 Returns the first shape that overlaps the given segment. The segment is treated as having the given group and layers.
-(NSArray *) - bbQueryAll:layers:group:
 Returns a NSArray of all shapes whose bounding boxes overlap the given bounding box. The box is treated as having the given group and layers.
-(NSArray *) - shapeQueryAll:
 Returns a NSArray of ChipmunkShapeQueryInfo objects for all the shapes that overlap shape.
-(BOOL) - shapeTest:
 Returns true if the shape overlaps anything in the space.
-(void) - activateShapesTouchingShape:
 Perform a shape query for shape and call cpBodyActivate() for everythnig it touches.
-(void) - resizeStaticHashWithDim:andCount:
 Retune the performance of the static shapes hash. See the C API documentation for a detailed description.
-(void) - resizeActiveHashWithDim:andCount:
 Retune the performance of the active shapes hash. See the C API documentation for a detailed description.
-(void) - rehashStatic
 Update all the static shapes.
(void) - rehashShape:
 Update the collision info for a single shape.
-(void) - step:
 Step time forward. While variable timesteps may be used, a constant timestep will allow you to reduce CPU usage by using fewer iterations.
-(void) - addBounds:thickness:elasticity:friction:layers:group:collisionType:
 Add a border of collision segments around a box. See ChipmunkShape for more information on the other parameters.
-(ChipmunkBody *) - addBody:
 Add a body to the space. Normally you would simply use add:.
-(ChipmunkBody *) - removeBody:
 Remove a body to the space. Normally you would simply use remove:.
-(ChipmunkShape *) - addShape:
 Add a shape to the space. Normally you would simply use add:.
-(ChipmunkShape *) - removeShape:
 Remove a shape to the space. Normally you would simply use remove:.
-(ChipmunkShape *) - addStaticShape:
 Add a static shape to the space. Normally you would simply create a static shape use add:.
-(ChipmunkShape *) - removeStaticShape:
 Remove a static shape to the space. Normally you would simply create a static shape use remove:.
-(ChipmunkConstraint *) - addConstraint:
 Add a constraint to the space. Normally you would simply use add:.
-(ChipmunkConstraint *) - removeConstraint:
 Remove a constraint to the space. Normally you would simply use remove:.

-Properties

int iterations
 The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10).
int elasticIterations
 Deprecated in 5.3.0, should not be needed.
-cpVect gravity
 Global gravity value to use for all rigid bodies in this space (default value is cpvzero).
cpFloat damping
 Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping).
-cpFloat idleSpeedThreshold
 If a body is moving slower than this speed, it is considered idle. The default value is 0, which signals that the space should guess a good value based on the current gravity.
cpFloat sleepTimeThreshold
 Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping).
-cpSpace * space
 Returns a pointer to the underlying cpSpace C struct.
ChipmunkBodystaticBody
 The space's designated static body.
-

Detailed Description

-

Chipmunk spaces are simulation containers.

-

You add a bunch of physics objects to a space (rigid bodies, collision shapes, and joints) and step the entire space forward through time as a whole.

-

Member Function Documentation

- -
-
- - - - - - - - - -
- (id) add: (NSObject< ChipmunkObject > *)  obj 
-
-
- -

Add an object to the space.

-

This can be any object that implements the ChipmunkObject protocol. This includes all the basic types such as ChipmunkBody, ChipmunkShape and ChipmunkConstraint as well as any composite game objects you may define that implement the protocol.

-
Warning:
This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that.
- -
-
- -
-
- - - - - - - - - -
- (void) addBaseObjects: (id< NSFastEnumeration >)  objects 
-
-
- -

Add a collection of ChipmunkBaseObject objects to the space.

-

The objects must implement the ChipmunkBaseObject protocol. These include ChipmunkBody, ChipmunkShape and ChipmunkConstraint objects.

-
Warning:
This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void) addCollisionHandler: (id)  target
typeA:(id)  a
typeB:(id)  b
begin:(SEL)  begin
preSolve:(SEL)  preSolve
postSolve:(SEL)  postSolve
separate:(SEL)  separate 
-
-
- -

Set a collision handler to handle specific collision types.

-

The methods are called only when shapes with the specified collisionTypes collide.

-

typeA and typeB should be the same object references set to ChipmunkShape.collisionType. They can be any uniquely identifying object. Class and global NSString objects work well as collision types as they are easy to get a reference to and do not require you to allocate any objects.

-

The expected method selectors are as follows:

-
- (bool)begin:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (bool)preSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (void)postSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (void)separate:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
- (void) addPostStepCallback: (id)  target
selector:(SEL)  selector
key:(id)  key 
-
-
- -

Define a callback to be run just before [ChipmunkSpace step:] finishes.

-

The main reason you want to define post-step callbacks is to get around the restriction that you cannot call the add/remove methods from a collision handler callback. Post-step callbacks run right before the next (or current) call to step: returns when it is safe to add and remove objects. You can only schedule one post-step callback per context value, this prevents you from accidentally removing an object twice. Registering a second callback for the same object will replace the first.

-

The method signature of the method should be:

-
- (void)postStepCallback:(id)key</code></pre>
-

This makes it easy to call a removal method on your game controller to remove a game object that died or was destroyed as the result of a collision:

-
[space addPostStepCallback:gameController selector:@selector(remove:) key:gameObject];
-
Attention:
Not to be confused with post-solve collision handler callbacks.
-
Warning:
target and object cannot be retained by the ChipmunkSpace. If you need to release either after registering the callback, use autorelease to ensure that they won't be deallocated until after [ChipmunkSpace step:] returns.
-
See also:
- addPostStepRemoval:
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void) addShapeAHandler: (Class)  klass
typeA:(id)  a
typeB:(id)  b
begin:(SEL)  begin
preSolve:(SEL)  preSolve
postSolve:(SEL)  postSolve 
-
-
- -

Deprecated in 5.3.0.

-
Deprecated:
since 5.3.0
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void) addShapeBHandler: (Class)  klass
typeA:(id)  a
typeB:(id)  b
begin:(SEL)  begin
preSolve:(SEL)  preSolve
postSolve:(SEL)  postSolve 
-
-
- -

Deprecated in 5.3.0.

-
Deprecated:
since 5.3.0
- -
-
- -
-
- - - - - - - - - -
- (void) rehashShape: (ChipmunkShape *)  shape 
-
-
- -

Update the collision info for a single shape.

-

Can be used to update individual static shapes that were moved or active shapes that were moved that you want to query against.

- -
-
- -
-
- - - - - - - - - -
- (id) remove: (NSObject< ChipmunkObject > *)  obj 
-
-
- -

Remove an object from the space.

-

This can be any object that implements the ChipmunkObject protocol. This includes all the basic types such as ChipmunkBody, ChipmunkShape and ChipmunkConstraint as well as any composite game objects you may define that implement the protocol.

-
Warning:
This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that.
- -
-
- -
-
- - - - - - - - - -
- (void) removeBaseObjects: (id< NSFastEnumeration >)  objects 
-
-
- -

Remove a collection of ChipmunkBaseObject objects from the space.

-

The objects must implement the ChipmunkBaseObject protocol. These include ChipmunkBody, ChipmunkShape and ChipmunkConstraint objects.

-
Warning:
This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void) setDefaultCollisionHandler: (id)  target
begin:(SEL)  begin
preSolve:(SEL)  preSolve
postSolve:(SEL)  postSolve
separate:(SEL)  separate 
-
-
- -

Set the default collision handler.

-

The default handler is used for all collisions when a specific collision handler cannot be found.

-

The expected method selectors are as follows:

-
- (bool)begin:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (bool)preSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (void)postSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-- (void)separate:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
-
-
-
-

Property Documentation

- -
-
- - - - -
- (cpFloat) damping [read, write, assign]
-
-
- -

Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping).

-

This value is the fraction of velocity a body should have after 1 second. A value of 0.9 would mean that each second, a body would have 80% of the velocity it had the previous second.

- -
-
- -
-
- - - - -
- (int) elasticIterations [read, write, assign]
-
-
- -

Deprecated in 5.3.0, should not be needed.

-
Deprecated:
since 5.3.0
- -
-
- -
-
- - - - -
- (int) iterations [read, write, assign]
-
-
- -

The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10).

-

Fewer iterations mean less CPU usage, but lower quality (mushy looking) physics.

- -
-
- -
-
- - - - -
- (cpFloat) sleepTimeThreshold [read, write, assign]
-
-
- -

Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping).

-

If an entire group of touching or jointed bodies has been idle for at least this long, the space will put all of the bodies into a sleeping state where they consume very little CPU.

- -
-
- -
-
- - - - -
- (ChipmunkBody*) staticBody [read, assign]
-
-
- -

The space's designated static body.

-

Collision shapes added to the body will automatically be marked as static shapes, and rigid bodies that come to rest while touching or jointed to this body will fall asleep.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_circle_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_circle_shape.html deleted file mode 100644 index f6daf07be3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_circle_shape.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkStaticCircleShape Class Reference - - - - - - - - - -
-
-

ChipmunkStaticCircleShape Class Reference

-
-
- -

A subclass of ChipmunkCircleShape that is added as a static shape when using add: (ChipmunkSpace). -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkCircleShape.

- -

List of all members.

- -
-

Detailed Description

-

A subclass of ChipmunkCircleShape that is added as a static shape when using add: (ChipmunkSpace).

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_poly_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_poly_shape.html deleted file mode 100644 index 1fcc0a53ef..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_poly_shape.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkStaticPolyShape Class Reference - - - - - - - - - -
-
-

ChipmunkStaticPolyShape Class Reference

-
-
- -

A subclass of ChipmunkPolyShape that is added as a static shape when using add: (ChipmunkSpace). -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkPolyShape.

- -

List of all members.

- -
-

Detailed Description

-

A subclass of ChipmunkPolyShape that is added as a static shape when using add: (ChipmunkSpace).

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_segment_shape.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_segment_shape.html deleted file mode 100644 index d83e8e040f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/interface_chipmunk_static_segment_shape.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Objective Chipmunk: ChipmunkStaticSegmentShape Class Reference - - - - - - - - - -
-
-

ChipmunkStaticSegmentShape Class Reference

-
-
- -

A subclass of ChipmunkSegmentShape that is added as a static shape when using add: (ChipmunkSpace). -More...

- -

#import <ChipmunkShape.h>

- -

Inherits ChipmunkSegmentShape.

- -

List of all members.

- -
-

Detailed Description

-

A subclass of ChipmunkSegmentShape that is added as a static shape when using add: (ChipmunkSpace).

-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_f.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_f.png deleted file mode 100644 index 1b07a16207..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_f.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_h.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_h.png deleted file mode 100644 index 01f5fa6a59..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/nav_h.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/open.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/open.png deleted file mode 100644 index 7b35d2c2c3..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/open.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/pages.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/pages.html deleted file mode 100644 index 3df4c9ee6b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/pages.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -Objective Chipmunk: Page Index - - - - - - - - - -
-
-

Related Pages

-
-
-Here is a list of all related documentation pages: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p-members.html deleted file mode 100644 index 1e954836b2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p-members.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

<ChipmunkBaseObject> Member List

-
-
-This is the complete list of members for <ChipmunkBaseObject>, including all inherited members. - - - - -
addToSpace: (defined in <ChipmunkBaseObject>)<ChipmunkBaseObject>
chipmunkObjects<ChipmunkObject>
data (defined in <ChipmunkBaseObject>)<ChipmunkBaseObject>
removeFromSpace: (defined in <ChipmunkBaseObject>)<ChipmunkBaseObject>
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p.html deleted file mode 100644 index 35d284698a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_base_object-p.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -Objective Chipmunk: <ChipmunkBaseObject> Protocol Reference - - - - - - - - - -
- -
-

<ChipmunkBaseObject> Protocol Reference

-
-
- -

This protocol is implemented by objects that know how to add themselves to a space. -More...

- -

#import <ChipmunkObject.h>

- -

Inherits ChipmunkObject-p.

- -

Inherited by ChipmunkBody, ChipmunkConstraint, and ChipmunkShape.

- -

List of all members.

- - - - - - -

-Public Member Functions

-(void) - addToSpace:
-(void) - removeFromSpace:

-Properties

-id data
-

Detailed Description

-

This protocol is implemented by objects that know how to add themselves to a space.

-

It's used internally as part of the ChipmunkObject protocol. You should never need to implement it yourself.

-
The documentation for this protocol was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p-members.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p-members.html deleted file mode 100644 index e149a2c8da..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p-members.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - -Objective Chipmunk: Member List - - - - - - - - - -
-
-

<ChipmunkObject> Member List

-
-
-This is the complete list of members for <ChipmunkObject>, including all inherited members. - -
chipmunkObjects<ChipmunkObject>
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p.html deleted file mode 100644 index c15da5996f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/protocol_chipmunk_object-p.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Objective Chipmunk: <ChipmunkObject> Protocol Reference - - - - - - - - - -
- -
-

<ChipmunkObject> Protocol Reference

-
-
- -

Allows you to add composite objects to a space in a single method call. -More...

- -

#import <ChipmunkObject.h>

- -

Inherited by <ChipmunkBaseObject>.

- -

List of all members.

- - - - -

-Public Member Functions

-(NSSet *) - chipmunkObjects
 Returns a set of ChipmunkBaseObject objects.
-

Detailed Description

-

Allows you to add composite objects to a space in a single method call.

-

The easiest way to implement the ChipmunkObject protocol is to add a chipmunkObjects instance variable with a type of NSSet* to your class, create a synthesized property for it, and initialize it with the ChipmunkObjectFlatten() function.

-
The documentation for this protocol was generated from the following file: -
- - - - -
- -
- - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_61.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_61.html deleted file mode 100644 index b32cd4d5cb..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_61.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- a - ChipmunkSegmentShape -
-
-
-
- activate - ChipmunkBody -
-
-
-
- affineTransform - ChipmunkBody -
-
- - - -
-
- angVel - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_62.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_62.html deleted file mode 100644 index ee1f4234bb..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_62.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- b - ChipmunkSegmentShape -
-
-
-
- bb - ChipmunkShape -
-
-
-
- biasCoef - ChipmunkConstraint -
-
- -
-
- bodyA - ChipmunkConstraint -
-
-
-
- bodyB - ChipmunkConstraint -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_63.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_63.html deleted file mode 100644 index 9c5ea1c07f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_63.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- cacheBB - ChipmunkShape -
-
- -
- -
- - - - - - - -
-
- chipmunkObjects - ChipmunkObject-p -
-
- - - - - - - -
- -
- - - -
- -
- - - -
-
- collisionType - ChipmunkShape -
-
-
-
- constraint - ChipmunkConstraint -
-
-
-
- count - ChipmunkPolyShape -
-
-
-
- - ChipmunkCircleShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_64.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_64.html deleted file mode 100644 index 65f5acad2b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_64.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - -
-
Loading...
- - - -
-
- - ChipmunkDampedRotarySpring -
-
-
-
- - ChipmunkDampedSpring -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_65.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_65.html deleted file mode 100644 index c4ac9a0bfd..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_65.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- elasticIterations - ChipmunkSpace -
-
-
-
- elasticity - ChipmunkShape -
-
-
-
- end - ChipmunkSegmentQueryInfo -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_66.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_66.html deleted file mode 100644 index 99089018cf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_66.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- force - ChipmunkBody -
-
-
-
- friction - ChipmunkShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_67.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_67.html deleted file mode 100644 index 8061f1b43c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_67.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- gravity - ChipmunkSpace -
-
-
-
- group - ChipmunkShape -
-
-
-
- - ChipmunkGrooveJoint -
-
-
-
- - ChipmunkGearJoint -
-
-
-
- - ChipmunkPolyShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_69.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_69.html deleted file mode 100644 index 47fa0bb608..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_69.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- idleSpeedThreshold - ChipmunkSpace -
-
-
-
- info - ChipmunkSegmentQueryInfo -
-
-
-
- initStaticBody - ChipmunkBody -
-
-
-
- isRogue - ChipmunkBody -
-
-
-
- isSleeping - ChipmunkBody -
-
-
-
- isStatic - ChipmunkBody -
-
-
-
- iterations - ChipmunkSpace -
-
-
-
- - ChipmunkSimpleMotor -
-
-
-
- - ChipmunkPivotJoint -
-
-
-
- - ChipmunkGearJoint -
-
-
-
- - ChipmunkRatchetJoint -
-
-
-
- - ChipmunkRotaryLimitJoint -
-
-
-
- - ChipmunkSlideJoint -
-
-
-
- - ChipmunkDampedSpring -
-
-
-
- - ChipmunkGrooveJoint -
-
- -
-
- - ChipmunkCircleShape -
-
-
-
- - ChipmunkSegmentShape -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkDampedRotarySpring -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6c.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6c.html deleted file mode 100644 index 1655bc4162..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6c.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- layers - ChipmunkShape -
-
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6d.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6d.html deleted file mode 100644 index 28957093c6..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6d.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- mass - ChipmunkBody -
-
- -
-
- maxBias - ChipmunkConstraint -
-
-
-
- maxForce - ChipmunkConstraint -
-
- -
-
- moment - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6e.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6e.html deleted file mode 100644 index e94fc85a54..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6e.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -
-
Loading...
- -
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6f.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6f.html deleted file mode 100644 index 14f42aab76..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_6f.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- offset - ChipmunkCircleShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_70.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_70.html deleted file mode 100644 index 9e72a8c7bc..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_70.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -
-
Loading...
- -
-
- point - ChipmunkSegmentQueryInfo -
-
-
-
- pos - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkShape -
-
-
-
- - ChipmunkPinJoint -
-
-
-
- - ChipmunkPivotJoint -
-
-
-
- - ChipmunkPivotJoint -
-
-
-
- - ChipmunkPolyShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_72.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_72.html deleted file mode 100644 index 20220e97e3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_72.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -
-
Loading...
- -
-
- ratchet - ChipmunkRatchetJoint -
-
-
-
- rate - ChipmunkSimpleMotor -
-
-
-
- ratio - ChipmunkGearJoint -
-
-
-
- rehashStatic - ChipmunkSpace -
-
-
-
- resetForces - ChipmunkBody -
-
-
-
- restAngle - ChipmunkDampedRotarySpring -
-
-
-
- restLength - ChipmunkDampedSpring -
-
-
-
- rot - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkRotaryLimitJoint -
-
-
-
- - ChipmunkRatchetJoint -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_73.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_73.html deleted file mode 100644 index a904891d4f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_73.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- sensor - ChipmunkShape -
-
- -
-
- sleep - ChipmunkBody -
-
-
-
- sleepTimeThreshold - ChipmunkSpace -
-
-
-
- space - ChipmunkSpace -
-
-
-
- start - ChipmunkSegmentQueryInfo -
-
- - -
-
- surfaceVel - ChipmunkShape -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSegmentShape -
-
-
-
- - ChipmunkSimpleMotor -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSlideJoint -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_74.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_74.html deleted file mode 100644 index ab560fc206..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_74.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- t - ChipmunkSegmentQueryInfo -
-
-
-
- torque - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_76.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_76.html deleted file mode 100644 index 1700359c18..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_76.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- vel - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_77.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_77.html deleted file mode 100644 index 0c49cf330f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/all_77.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/classes_63.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/classes_63.html deleted file mode 100644 index ce9fc7508b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/classes_63.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -
-
Loading...
- -
- -
- - - - - - - - - - - - - - -
- -
- - - -
- -
- - - -
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/close.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/close.png deleted file mode 100644 index 9342d3dfee..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/close.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_61.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_61.html deleted file mode 100644 index e1c35088dc..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_61.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- activate - ChipmunkBody -
-
-
-
- affineTransform - ChipmunkBody -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_62.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_62.html deleted file mode 100644 index b9a150f0b2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_62.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_63.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_63.html deleted file mode 100644 index f8fe1b0a9d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_63.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- cacheBB - ChipmunkShape -
-
-
-
- chipmunkObjects - ChipmunkObject-p -
-
-
-
- - ChipmunkCircleShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_64.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_64.html deleted file mode 100644 index 90c35a6f73..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_64.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkDampedRotarySpring -
-
-
-
- - ChipmunkDampedSpring -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_67.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_67.html deleted file mode 100644 index 5f12a26035..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_67.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkGearJoint -
-
-
-
- - ChipmunkGrooveJoint -
-
-
-
- - ChipmunkPolyShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_69.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_69.html deleted file mode 100644 index 218e9d4caa..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_69.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- initStaticBody - ChipmunkBody -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkDampedRotarySpring -
-
-
-
- - ChipmunkSimpleMotor -
-
-
-
- - ChipmunkPivotJoint -
-
-
-
- - ChipmunkGearJoint -
-
-
-
- - ChipmunkRatchetJoint -
-
-
-
- - ChipmunkRotaryLimitJoint -
-
-
-
- - ChipmunkGrooveJoint -
-
-
-
- - ChipmunkDampedSpring -
-
-
-
- - ChipmunkSlideJoint -
-
- -
-
- - ChipmunkCircleShape -
-
-
-
- - ChipmunkSegmentShape -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkPolyShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_6c.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_6c.html deleted file mode 100644 index 5b4b75a5a0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_6c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_70.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_70.html deleted file mode 100644 index 551dcbe0e1..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_70.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkPinJoint -
-
-
-
- - ChipmunkPolyShape -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkShape -
-
-
-
- - ChipmunkPivotJoint -
-
-
-
- - ChipmunkPivotJoint -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_72.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_72.html deleted file mode 100644 index d1d98cc5f2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_72.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- rehashStatic - ChipmunkSpace -
-
-
-
- resetForces - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkRatchetJoint -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkRotaryLimitJoint -
-
-
-
- - ChipmunkSpace -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_73.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_73.html deleted file mode 100644 index 54b64c05ac..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_73.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- sleep - ChipmunkBody -
-
-
-
- staticBody - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSlideJoint -
-
-
-
- - ChipmunkBody -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSimpleMotor -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSpace -
-
-
-
- - ChipmunkSegmentShape -
-
-
-
- - ChipmunkSpace -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_77.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_77.html deleted file mode 100644 index 0c49cf330f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/functions_77.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/mag_sel.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/mag_sel.png deleted file mode 100644 index 81f6040a20..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/mag_sel.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/nomatches.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/nomatches.html deleted file mode 100644 index 529a265854..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
-
No Matches
-
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_61.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_61.html deleted file mode 100644 index e50b44a6db..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_61.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- a - ChipmunkSegmentShape -
-
- - - -
-
- angVel - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_62.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_62.html deleted file mode 100644 index e5d232561a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_62.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- b - ChipmunkSegmentShape -
-
-
-
- bb - ChipmunkShape -
-
-
-
- biasCoef - ChipmunkConstraint -
-
- -
-
- bodyA - ChipmunkConstraint -
-
-
-
- bodyB - ChipmunkConstraint -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_63.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_63.html deleted file mode 100644 index 4aac63e23a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_63.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- collisionType - ChipmunkShape -
-
-
-
- constraint - ChipmunkConstraint -
-
-
-
- count - ChipmunkPolyShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_64.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_64.html deleted file mode 100644 index 9eadf41aaf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_64.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -
-
Loading...
- - - -
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_65.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_65.html deleted file mode 100644 index c4ac9a0bfd..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_65.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- elasticIterations - ChipmunkSpace -
-
-
-
- elasticity - ChipmunkShape -
-
-
-
- end - ChipmunkSegmentQueryInfo -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_66.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_66.html deleted file mode 100644 index 99089018cf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_66.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- force - ChipmunkBody -
-
-
-
- friction - ChipmunkShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_67.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_67.html deleted file mode 100644 index e8a5fdaadc..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_67.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- gravity - ChipmunkSpace -
-
-
-
- group - ChipmunkShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_69.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_69.html deleted file mode 100644 index 8d0d8c83d7..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_69.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- idleSpeedThreshold - ChipmunkSpace -
-
-
-
- info - ChipmunkSegmentQueryInfo -
-
-
-
- isRogue - ChipmunkBody -
-
-
-
- isSleeping - ChipmunkBody -
-
-
-
- isStatic - ChipmunkBody -
-
-
-
- iterations - ChipmunkSpace -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6c.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6c.html deleted file mode 100644 index 88c406c88b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- layers - ChipmunkShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6d.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6d.html deleted file mode 100644 index 28957093c6..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6d.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- mass - ChipmunkBody -
-
- -
-
- maxBias - ChipmunkConstraint -
-
-
-
- maxForce - ChipmunkConstraint -
-
- -
-
- moment - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6e.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6e.html deleted file mode 100644 index e94fc85a54..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6e.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - -
-
Loading...
- -
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6f.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6f.html deleted file mode 100644 index 14f42aab76..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_6f.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- offset - ChipmunkCircleShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_70.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_70.html deleted file mode 100644 index 110a45304c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_70.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -
-
Loading...
- -
-
- point - ChipmunkSegmentQueryInfo -
-
-
-
- pos - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_72.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_72.html deleted file mode 100644 index f2193c4081..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_72.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - -
-
Loading...
- -
-
- ratchet - ChipmunkRatchetJoint -
-
-
-
- rate - ChipmunkSimpleMotor -
-
-
-
- ratio - ChipmunkGearJoint -
-
-
-
- restAngle - ChipmunkDampedRotarySpring -
-
-
-
- restLength - ChipmunkDampedSpring -
-
-
-
- rot - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_73.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_73.html deleted file mode 100644 index e7a83ac7d0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_73.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- sensor - ChipmunkShape -
-
- -
-
- sleepTimeThreshold - ChipmunkSpace -
-
-
-
- space - ChipmunkSpace -
-
-
-
- start - ChipmunkSegmentQueryInfo -
-
-
-
- staticBody - ChipmunkSpace -
-
- -
-
- surfaceVel - ChipmunkShape -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_74.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_74.html deleted file mode 100644 index ab560fc206..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_74.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- t - ChipmunkSegmentQueryInfo -
-
-
-
- torque - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_76.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_76.html deleted file mode 100644 index 1700359c18..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/properties_76.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
-
Loading...
-
-
- vel - ChipmunkBody -
-
-
Searching...
-
No Matches
- -
- - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.css b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.css deleted file mode 100644 index 5e95c7dc94..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.css +++ /dev/null @@ -1,240 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#searchli { - float: right; - display: block; - width: 170px; - height: 36px; -} - -#MSearchBox { - white-space : nowrap; - position: absolute; - float: none; - display: inline; - margin-top: 8px; - right: 0px; - width: 170px; - z-index: 102; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:116px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:0px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 1; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.js b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.js deleted file mode 100644 index 5bb1d1b801..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search.js +++ /dev/null @@ -1,732 +0,0 @@ -// Search script generated by doxygen -// Copyright (C) 2009 by Dimitri van Heesch. - -// The code in this file is loosly based on main.js, part of Natural Docs, -// which is Copyright (C) 2003-2008 Greg Valure -// Natural Docs is licensed under the GPL. - -var indexSectionsWithContent = -{ - 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111101001111101110110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111100101001000101100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111101001111101110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -}; - -var indexSectionNames = -{ - 0: "all", - 1: "classes", - 2: "functions", - 3: "properties" -}; - -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var hexCode; - if (code<16) - { - hexCode="0"+code.toString(16); - } - else - { - hexCode=code.toString(16); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') - { - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location.href = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_l.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_l.png deleted file mode 100644 index c872f4da4a..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_l.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_m.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_m.png deleted file mode 100644 index b429a16ba6..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_m.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_r.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_r.png deleted file mode 100644 index 97ee8b4396..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/search/search_r.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_a.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_a.png deleted file mode 100644 index 2d99ef23fe..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_a.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_b.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_b.png deleted file mode 100644 index b2c3d2be3c..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_b.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_h.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_h.png deleted file mode 100644 index c11f48f19b..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_h.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_s.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_s.png deleted file mode 100644 index 978943ac80..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tab_s.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tabs.css b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tabs.css deleted file mode 100644 index c25d63bacf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/API Docs/tabs.css +++ /dev/null @@ -1,59 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkBody.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkBody.h deleted file mode 100644 index 35d918af34..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkBody.h +++ /dev/null @@ -1,135 +0,0 @@ -// TODO headerdoc the moment functions - -/** - Rigid bodies are the basic unit of simulation in Chipmunk. - They hold the physical properties of an object (mass, position, rotation, velocity, etc.). After creating a ChipmunkBody object, you can attach collision shapes (ChipmunkShape) and joints (ChipmunkConstraint) to it. -*/ -@interface ChipmunkBody : NSObject { -@private - cpBody _body; - id data; -} - -/** - Create an autoreleased rigid body with the given mass and moment. - Guessing the moment of inertia is usually a bad idea. Use the moment estimation functions (cpMomentFor*()). -*/ -+ (id)bodyWithMass:(cpFloat)mass andMoment:(cpFloat)moment; - -/** - Create an autoreleased rigid body with infinite mass and moment. - This is most useful when you want to create a rogue body for controlling a moving platform or some other strictly controlled object. -*/ -+ (id)staticBody; - -/** - Initialize a rigid body with the given mass and moment of inertia. - Guessing the moment of inertia is usually a bad idea. Use the moment estimation functions (cpMomentFor*()). -*/ -- (id)initWithMass:(cpFloat)mass andMoment:(cpFloat)moment; - -/** - Initialize a rigid body with infinite mass and moment. - This is most useful when you want to create a rogue body for controlling a moving platform or some other strictly controlled object. -*/ -- (id)initStaticBody; - -/// Mass of the rigid body. Mass does not have to be expressed in any particular units, but relative masses should be consistent. -@property cpFloat mass; - -/// Moment of inertia of the body. The mass tells you how hard it is to push an object, the MoI tells you how hard it is to spin the object. Don't try to guess the MoI, use the cpMomentFor*() functions to try and estimate it. -@property cpFloat moment; - -/// The position of the rigid body's center of gravity. -@property cpVect pos; - -/// The linear velocity of the rigid body. -@property cpVect vel; - -/// The linear force applied to the rigid body. Unlike in some physics engines, the force does not reset itself during each step. Make sure that you are reseting the force between frames if that is what you intended. -@property cpVect force; - -/// The rotation angle of the rigid body in radians. -@property cpFloat angle; - -/// The angular velocity of the rigid body in radians per second. -@property cpFloat angVel; - -/// The torque being applied to the rigid body. Like force, this property is not reset every frame. -@property cpFloat torque; - -/// A unit length vector vector that stores the current rotation of the body as a 2D spinor or complex number. Can be used for fast rotation. -@property (readonly) cpVect rot; - -/// Returns a pointer to the underlying cpBody C struct. -@property (readonly) cpBody *body; - -/** - An object that this constraint is associated with. You can use this get a reference to your game object or controller object from within callbacks. - @attention Like most @c delegate properties this is a weak reference and does not call @c retain. This prevents reference cycles from occuring. -*/ -@property (assign) id data; - -/// Has the body been put to sleep by the space? -@property (readonly) bool isSleeping; - -/// Has the body not been added to any spaces? -@property (readonly) bool isRogue; - -/// Is the body the static body associated with a space? -@property (readonly) bool isStatic; - -/** - Convert from body local to world coordinates. - Convert a point in world (absolute) coordinates to body local coordinates affected by the position and rotation of the rigid body. -*/ -- (cpVect)local2world:(cpVect)v; - -/** - Convert from world to body local Coordinates. - Convert a point in body local coordinates coordinates to world (absolute) coordinates. -*/ -- (cpVect)world2local:(cpVect)v; - -/** - Reset force and torque. - Set the force on this rigid body to cpvzero, and set the torque to 0.0. -*/ -- (void)resetForces; - -/** - Apply a force to a rigid body. An offset of cpvzero is equivalent to adding directly to the force property. - @param force A force in expressed in absolute (word) coordinates. - @param offset An offset expressed in world coordinates. Note that it is still an offset, meaning that it's position is relative, but the rotation is not. -*/ -- (void)applyForce:(cpVect)force offset:(cpVect)offset; - -/** - Apply an impulse to a rigid body. - @param impulse An impulse in expressed in absolute (word) coordinates. - @param offset An offset expressed in world coordinates. Note that it is still an offset, meaning that it's position is relative, but the rotation is not. -*/ -- (void)applyImpulse:(cpVect)impulse offset:(cpVect)offset; - -/// Wake up the body if it's sleeping, or reset the idle timer if it's active. -- (void)activate; - -/** - Force the body to sleep immediately. The body will be added to the same group as @group. When any object in a group is woken up, all of the bodies are woken up with it. - If @c group is nil, then a new group is created and the body is added to it. It is an error pass a non-sleeping body as @c group. - This is useful if you want an object to be inactive until something hits it such as a pile of boxes you want the player to plow through or a stalactite hanging from a cave ceiling. - Make sure the body is fully set up before you call this. Adding this body or any shapes or constraints attached to it to a space, or modifying any of their properties automatically wake a body up. -*/ -- (void)sleepWithGroup:(ChipmunkBody *)group; - -/** - Equivalent to [ChipmunkBody sleepWithGroup:nil]. That is the object is forced to sleep immediately, but is not grouped with any other sleeping bodies. -*/ -- (void)sleep; - -/// Implements the ChipmunkBaseObject protocol, not particularly useful outside of the library code -- (void)addToSpace:(ChipmunkSpace *)space; -/// Implements the ChipmunkBaseObject protocol, not particularly useful outside of the library code -- (void)removeFromSpace:(ChipmunkSpace *)space; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkConstraint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkConstraint.h deleted file mode 100644 index 5a7da64a98..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkConstraint.h +++ /dev/null @@ -1,384 +0,0 @@ -/** - Constraints connect two ChipmunkBody objects together. Most often constraints are simple joints, but can also be things like motors, friction generators or servos. - - @htmlonly - - - - - - @endhtmlonly -*/ -@interface ChipmunkConstraint : NSObject { -@private - id data; -} - -/// Returns a pointer to the underlying cpConstraint C struct. -@property (readonly) cpConstraint *constraint; - -/// The first ChipmunkBody the constraint controls. -@property (retain) ChipmunkBody *bodyA; - -/// The second ChipmunkBody the constraint controls. -@property (retain) ChipmunkBody *bodyB; - -/** - Maximum force this constraint is allowed to use (defalts to infinity). - This allows joints to be pulled apart if too much force is applied to them. - It also allows you to use constraints as force or friction generators for controlling bodies. -*/ -@property cpFloat maxForce; - -/** - Amount of constraint error to correct each step (defaults to 10%). - This can be used to fine tune constraint parameters. -*/ -@property cpFloat biasCoef; - -/** - Maximum rate (speed) that a joint can be corrected at (defaults to infinity). - Setting this value to a finite value allows you to control a joint like a -*/ -@property cpFloat maxBias; - -/** - An object that this constraint is associated with. You can use this get a reference to your game object or controller object from within callbacks. - @attention Like most @c delegate properties this is a weak reference and does not call @c retain. This prevents reference cycles from occuring. -*/ -@property (assign) id data; - -@end - - -/** - Pin joints hold a set distance between points on two bodies. - Think of them as connecting a solid pin or rod between the two anchor points. -*/ -@interface ChipmunkPinJoint : ChipmunkConstraint { -@private - cpPinJoint _constraint; -} - -/** - Create an autoreleased pin joint between the two bodies with the given anchor points. - The distance is calculated when the joint is initialized. It can be set explicitly using the property. -*/ -+ (ChipmunkPinJoint *)pinJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2; - -/** - Initialize a pin joint between the two bodies with the given anchor points. - The distance is calculated when the joint is initialized. It can be set explicitly using the property. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2; - -/// The anchor point on the first body. -@property cpVect anchr1; - -/// The anchor point on the second body. -@property cpVect anchr2; - -/// The distance between the two anchor points that the joint keeps. -@property cpFloat dist; - -@end - - -/** - Slide joints hold the distance between points on two bodies between a minimum and a maximum. - Think of them as a telescoping ChipmunkPinJoint. -*/ -@interface ChipmunkSlideJoint : ChipmunkConstraint { -@private - cpSlideJoint _constraint; -} - -/** - Create an autoreleased slide joint between the two bodies with the given anchor points and distance range. -*/ -+ (ChipmunkSlideJoint *)slideJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2 min:(cpFloat)min max:(cpFloat)max; - -/** - Initialize a slide joint between the two bodies with the given anchor points and distance range. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2 min:(cpFloat)min max:(cpFloat)max; - -/// The anchor point on the first body. -@property cpVect anchr1; - -/// The anchor point on the second body. -@property cpVect anchr2; - -/// The minimum allowed distance between anchor points. -@property cpFloat min; - -/// The maximum allowed distance between anchor points. -@property cpFloat max; - -@end - - -/** - Pivot joints hold two points on two bodies together allowing them to rotate freely around the pivot. -*/ -@interface ChipmunkPivotJoint : ChipmunkConstraint { -@private - cpPivotJoint _constraint; -} - -/** - Create an autoreleased pivot joint between the two bodies with the two anchor points. - Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space. -*/ -+ (ChipmunkPivotJoint *)pivotJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2; - -/** - Create an autoreleased pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates. -*/ -+ (ChipmunkPivotJoint *)pivotJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b pivot:(cpVect)pivot; - -/** - Initialize a pivot joint between the two bodies with the two anchor points. - Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2; - -/** - Initialize a pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b pivot:(cpVect)pivot; - -/// The anchor point on the first body. -@property cpVect anchr1; - -/// The anchor point on the second body. -@property cpVect anchr2; - -@end - - -/** - Groove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove. -*/ -@interface ChipmunkGrooveJoint : ChipmunkConstraint { -@private - cpGrooveJoint _constraint; -} - -/** - Create an autoreleased groove joint between the two bodies. - Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space. - @param groove_a The start of the line segment on the first body. - @param groove_b The end of the line segment on the first body. - @param anchr2 The anchor point on the second body that is held to the line segment on the first. -*/ -+ (ChipmunkGrooveJoint *)grooveJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b groove_a:(cpVect)groove_a groove_b:(cpVect)groove_b anchr2:(cpVect)anchr2; - -/** - Initialize a groove joint between the two bodies. - Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space. - @param groove_a The start of the line segment on the first body. - @param groove_b The end of the line segment on the first body. - @param anchr2 The anchor point on the second body that is held to the line segment on the first. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b groove_a:(cpVect)groove_a groove_b:(cpVect)groove_b anchr2:(cpVect)anchr2; - -// TODO groove setters - -@end - - -/** - A spring with a damper. - While a spring is not technically a constraint, the damper is. The spring forces are simply a convenience. -*/ -@interface ChipmunkDampedSpring : ChipmunkConstraint { -@private - cpDampedSpring _constraint; -} - -/** - Create an autoreleased damped spring between two bodies at the given anchor points. - @param restLength The length the spring wants to contract or expand to. - @param stiffness The young's modulus of the spring. - @param damping The amount of viscous damping to apply. -*/ -+ (ChipmunkDampedSpring *)dampedSpringWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2 restLength:(cpFloat)restLength stiffness:(cpFloat)stiffness damping:(cpFloat)damping; - -/** - Initialize a damped spring between two bodies at the given anchor points. - @param restLength The length the spring wants to contract or expand to. - @param stiffness The young's modulus of the spring. - @param damping The amount of viscous damping to apply. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b anchr1:(cpVect)anchr1 anchr2:(cpVect)anchr2 restLength:(cpFloat)restLength stiffness:(cpFloat)stiffness damping:(cpFloat)damping; - -/// The anchor point on the first body. -@property cpVect anchr1; - -/// The anchor point on the second body. -@property cpVect anchr2; - -/// The length the spring wants to contract or expand to. -@property cpFloat restLength; - -/// The young's modulus of the spring. -@property cpFloat stiffness; - -/// The amount of viscous damping to apply. -@property cpFloat damping; - -@end - - -/** - Like a ChipmunkDampedSpring, but operates in a rotational fashion. -*/ -@interface ChipmunkDampedRotarySpring : ChipmunkConstraint { -@private - cpDampedRotarySpring _constraint; -} - - -/** - Create an autoreleased damped rotary spring between the given bodies. - @param restAngle The angular offset in radians the spring attempts to keep between the two bodies. - @param stiffness The young's modulus of the spring. - @param damping The amount of viscous damping to apply. -*/ -+ (ChipmunkDampedRotarySpring *)dampedRotarySpringWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b restAngle:(cpFloat)restAngle stiffness:(cpFloat)stiffness damping:(cpFloat)damping; - -/** - Initialize a damped rotary spring between the given bodies. - @param restAngle The angular offset in radians the spring attempts to keep between the two bodies. - @param stiffness The young's modulus of the spring. - @param damping The amount of viscous damping to apply. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b restAngle:(cpFloat)restAngle stiffness:(cpFloat)stiffness damping:(cpFloat)damping; - -/// The angular offset the spring attempts to keep between the two bodies. -@property cpFloat restAngle; - -/// The young's modulus of the spring. -@property cpFloat stiffness; - -/// The amount of viscous damping to apply. -@property cpFloat damping; - -@end - - -/** - Constrains the angle between two bodies. - This joint is often used in conjuction with a separate ChipmunkPivotJoint in order to limit the rotation around the pivot. -*/ -@interface ChipmunkRotaryLimitJoint : ChipmunkConstraint { -@private - cpRotaryLimitJoint _constraint; -} - -/** - Create an autoreleased rotary limit joint between the two bodies and angular range in radians. - Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space. -*/ -+ (ChipmunkRotaryLimitJoint *)rotaryLimitJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b min:(cpFloat)min max:(cpFloat)max; - -/** - Create an autoreleased rotary limit joint between the two bodies and angular range in radians. - Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b min:(cpFloat)min max:(cpFloat)max; - -/// The minimum angular delta of the joint in radians. -@property cpFloat min; - -/// The maximum angular delta of the joint in radians. -@property cpFloat max; - -@end - - -/** - Simple motors make two objects spin relative to each other. - They are most often used with the ChipmunkConstraint.maxForce property set to a finite value. -*/ -@interface ChipmunkSimpleMotor : ChipmunkConstraint { -@private - cpSimpleMotor _constraint; -} - -/// Create an autoreleased simple motor between the given bodies and relative rotation rate in radians per second. -+ (ChipmunkSimpleMotor *)simpleMotorWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b rate:(cpFloat)rate; - -/// Initialize a simple motor between the given bodies and relative rotation rate in radians per second. -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b rate:(cpFloat)rate; - -/// The relative rotation speed of the two bodies in radians per second. -@property cpFloat rate; - -@end - - -/** - Gear joints constrain the rotational speed of one body to another. - A ratio of 1.0 will lock the rotation of two bodies together, and negative ratios will cause them to spin in opposite directions. - You can also use gear joints as rotary servos by setting ChipmunkConstraint.maxForce and ChipmunkConstraint.maxBias to finite values and changing the ChipmunkGearJoint.phase property. -*/ -@interface ChipmunkGearJoint : ChipmunkConstraint { -@private - cpGearJoint _constraint; -} - -/** - Create an autoreleased gear joint between the given bodies. - @param phase The angular offset. - @param ratio The ratio of the rotational speeds. -*/ -+ (ChipmunkGearJoint *)gearJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b phase:(cpFloat)phase ratio:(cpFloat)ratio; - -/** - Initialize a gear joint between the given bodies. - @param phase The angular offset in radians. - @param ratio The ratio of the rotational speeds. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b phase:(cpFloat)phase ratio:(cpFloat)ratio; - -/// The angular offset in radians. -@property cpFloat phase; -/// The ratio of the rotational speeds. -@property cpFloat ratio; - -@end - -/** - Ratchet joints create rotary ratches similar to a socket wrench. -*/ -@interface ChipmunkRatchetJoint : ChipmunkConstraint { -@private - cpRatchetJoint _constraint; -} - -/** - Create an autoreleased ratchet joint between the given bodies. - @param phase The angular offset of the ratchet positions in radians. - @param ratchet The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. -*/ -+ (ChipmunkRatchetJoint *)ratchetJointWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b phase:(cpFloat)phase ratchet:(cpFloat)ratchet; - -/** - Initialize a ratchet joint between the given bodies. - @param phase The angular offset of the ratchet positions in radians. - @param ratchet The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. -*/ -- (id)initWithBodyA:(ChipmunkBody *)a bodyB:(ChipmunkBody *)b phase:(cpFloat)phase ratchet:(cpFloat)ratchet; - -/// The current ratchet position in radians. -@property cpFloat angle; - -/// The angular offset of the ratchet positions in radians -@property cpFloat phase; - -/// The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. -@property cpFloat ratchet; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkExtras.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkExtras.h deleted file mode 100644 index 079e29fa56..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkExtras.h +++ /dev/null @@ -1,40 +0,0 @@ -#define ChipmunkGetObject(s) s->data -#define ChipmunkGetData(s) [s->data data] - -@interface ChipmunkBody (Extras) - -/// Get an affine transform to match this body. -- (CGAffineTransform)affineTransform; - -@end - -/// Redundant API used to implement higher level functionality such as addObject. -@interface ChipmunkSpace (Extras) - -/// Add a border of collision segments around a box. See ChipmunkShape for more information on the other parameters. -- (void)addBounds:(CGRect)bounds thickness:(cpFloat)radius - elasticity:(cpFloat)elasticity friction:(cpFloat)friction - layers:(cpLayers)layers group:(id)group - collisionType:(id)collisionType; - -/// Add a body to the space. Normally you would simply use ChipmunkSpace.add:. -- (ChipmunkBody *)addBody:(ChipmunkBody *)obj; -/// Remove a body to the space. Normally you would simply use ChipmunkSpace.remove:. -- (ChipmunkBody *)removeBody:(ChipmunkBody *)obj; - -/// Add a shape to the space. Normally you would simply use ChipmunkSpace.add:. -- (ChipmunkShape *)addShape:(ChipmunkShape *)obj; -/// Remove a shape to the space. Normally you would simply use ChipmunkSpace.remove:. -- (ChipmunkShape *)removeShape:(ChipmunkShape *)obj; - -/// Add a static shape to the space. Normally you would simply create a static shape use ChipmunkSpace.add:. -- (ChipmunkShape *)addStaticShape:(ChipmunkShape *)obj; -/// Remove a static shape to the space. Normally you would simply create a static shape use ChipmunkSpace.remove:. -- (ChipmunkShape *)removeStaticShape:(ChipmunkShape *)obj; - -/// Add a constraint to the space. Normally you would simply use ChipmunkSpace.add:. -- (ChipmunkConstraint *)addConstraint:(ChipmunkConstraint *)obj; -/// Remove a constraint to the space. Normally you would simply use ChipmunkSpace.remove:. -- (ChipmunkConstraint *)removeConstraint:(ChipmunkConstraint *)obj; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkObject.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkObject.h deleted file mode 100644 index 220bf9c05f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkObject.h +++ /dev/null @@ -1,29 +0,0 @@ -@class ChipmunkSpace; - -/** - Allows you to add composite objects to a space in a single method call. - The easiest way to implement the ChipmunkObject protocol is to add a @c chipmunkObjects instance variable with a type of @c NSSet* to your class, - create a synthesized property for it, and initialize it with the ChipmunkObjectFlatten() function. -*/ -@protocol ChipmunkObject - -/// Returns a set of ChipmunkBaseObject objects. -- (NSSet *)chipmunkObjects; - -@end - -/// Build a flattened set of ChipmunkBaseObjects from a list of ChipmunkObjects. Don't forget to @c nil terminate the list. -NSSet * ChipmunkObjectFlatten(id firstObject, ...); - -/** - This protocol is implemented by objects that know how to add themselves to a space. - It's used internally as part of the ChipmunkObject protocol. You should never need to implement it yourself. -*/ -@protocol ChipmunkBaseObject - -@property (assign) id data; - -- (void)addToSpace:(ChipmunkSpace *)space; -- (void)removeFromSpace:(ChipmunkSpace *)space; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkShape.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkShape.h deleted file mode 100644 index e33d5ac321..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkShape.h +++ /dev/null @@ -1,197 +0,0 @@ -/// Abstract base class for collsion shape types. -@interface ChipmunkShape : NSObject { -@public - id data; -} - -/// Returns a pointer to the underlying cpShape C struct. -@property (readonly) cpShape *shape; - -/// The ChipmunkBody that this shape is attached to. -@property (retain) ChipmunkBody *body; - -/// The axis-aligned bounding box for this shape. -@property (readonly) cpBB bb; - -/// Sensor shapes send collision callback messages, but don't create a collision response. -@property BOOL sensor; - -/// How bouncy this shape is. -@property cpFloat elasticity; - -/// How much friction this shape has. -@property cpFloat friction; - -/** - The velocity of the shape's surface. - This velocity is used in the collision response when calculating the friction only. -*/ -@property cpVect surfaceVel; - -/** - An object reference used as a collision type identifier. This is used when defining collision handlers. - @attention Like most @c delegate properties this is a weak reference and does not call @c retain. -*/ -@property (assign) id collisionType; - -/** - An object reference used as a collision group identifier. Shapes with the same group do not collide. - @attention Like most @c delegate properties this is a weak reference and does not call @c retain. -*/ -@property (assign) id group; - -/// A layer bitmask that defines which objects -@property (assign) cpLayers layers; - -/** - An object that this shape is associated with. You can use this get a reference to your game object or controller object from within callbacks. - @attention Like most @c delegate properties this is a weak reference and does not call @c retain. This prevents reference cycles from occuring. -*/ -@property (assign) id data; - -/// Update and cache the axis-aligned bounding box for this shape. -- (cpBB)cacheBB; - -/// Check if a point in absolute coordinates lies within the shape. -- (bool)pointQuery:(cpVect)point; - -@end - - -/// Holds collision information from segment queries. You should never need to create one. -@interface ChipmunkSegmentQueryInfo : NSObject { -@private - cpSegmentQueryInfo _info; - cpVect _start, _end; -} - -- (id)initWithStart:(cpVect)start end:(cpVect)end; - -/// Returns a pointer to the underlying cpSegmentQueryInfo C struct. -@property (readonly) cpSegmentQueryInfo *info; - -/// The ChipmunkShape found. -@property (readonly) ChipmunkShape *shape; - -/// The percentage between the start and end points where the collision occurred. -@property (readonly) cpFloat t; - -/// The normal of the collision with the shape. -@property (readonly) cpVect normal; - -/// The point of the collision in absolute (world) coordinates. -@property (readonly) cpVect point; - -/// The distance from the start point where the collision occurred. -@property (readonly) cpFloat dist; - -/// The start point. -@property (readonly) cpVect start; - -/// The end point. -@property (readonly) cpVect end; - -@end - - -/// Holds collision information from segment queries. You should never need to create one. -@interface ChipmunkShapeQueryInfo : NSObject { -@private - ChipmunkShape *_shape; - cpContactPointSet _contactPoints; -} - -- (id)initWithShape:(ChipmunkShape *)shape andPoints:(cpContactPointSet *)set; - -@property (readonly) ChipmunkShape *shape; -@property (readonly) cpContactPointSet *contactPoints; - -@end - - -/// A perfect circle shape. -@interface ChipmunkCircleShape : ChipmunkShape { -@private - cpCircleShape _shape; -} - -/// Create an autoreleased circle shape with the given radius and offset from the center of gravity. -+ (id)circleWithBody:(ChipmunkBody *)body radius:(cpFloat)radius offset:(cpVect)offset; - -/// Initialize a circle shape with the given radius and offset from the center of gravity. -- (id)initWithBody:(ChipmunkBody *)body radius:(cpFloat)radius offset:(cpVect)offset; - -/// The radius of the circle. -@property (readonly) cpFloat radius; - -/// The offset from the center of gravity. -@property (readonly) cpVect offset; - -@end - - -/// A beveled (rounded) segment shape. -@interface ChipmunkSegmentShape : ChipmunkShape { -@private - cpSegmentShape _shape; -} - -/// Create an autoreleased segment shape with the given endpoints and radius. -+ (id)segmentWithBody:(ChipmunkBody *)body from:(cpVect)a to:(cpVect)b radius:(cpFloat)radius; - -/// Initialize a segment shape with the given endpoints and radius. -- (id)initWithBody:(ChipmunkBody *)body from:(cpVect)a to:(cpVect)b radius:(cpFloat)radius; - -/// The start of the segment shape. -@property (readonly) cpVect a; - -/// The end of the segment shape. -@property (readonly) cpVect b; - -/// The normal of the segment shape. -@property (readonly) cpVect normal; - -/// The beveling radius of the segment shape. -@property (readonly) cpFloat radius; - -@end - - -/// A convex polygon shape. -@interface ChipmunkPolyShape : ChipmunkShape { -@private - cpPolyShape _shape; -} - -/// Create an autoreleased polygon shape from the given vertex and offset from the center of gravity. -+ (id)polyWithBody:(ChipmunkBody *)body count:(int)count verts:(cpVect *)verts offset:(cpVect)offset; - -/// Create an autoreleased box shape centered on the center of gravity. -+ (id)boxWithBody:(ChipmunkBody *)body width:(cpFloat)width height:(cpFloat)height; - -/// Initialize a polygon shape from the given vertex and offset from the center of gravity. -- (id)initWithBody:(ChipmunkBody *)body count:(int)count verts:(cpVect *)verts offset:(cpVect)offset; - -/// Initialize a box shape centered on the center of gravity. -- (id)initBoxWithBody:(ChipmunkBody *)body width:(cpFloat)width height:(cpFloat)height; - -/// The number of vertexes in this polygon. -@property (readonly) int count; - -/// Access the vertexes of this polygon. -- (cpVect)getVertex:(int)index; - -@end - -/// A subclass of ChipmunkCircleShape that is added as a static shape when using ChipmunkSpace.add:. -@interface ChipmunkStaticCircleShape : ChipmunkCircleShape -@end - - -/// A subclass of ChipmunkSegmentShape that is added as a static shape when using ChipmunkSpace.add:. -@interface ChipmunkStaticSegmentShape : ChipmunkSegmentShape -@end - -/// A subclass of ChipmunkPolyShape that is added as a static shape when using ChipmunkSpace.add:. -@interface ChipmunkStaticPolyShape : ChipmunkPolyShape -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkSpace.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkSpace.h deleted file mode 100644 index e9ceccbed0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ChipmunkSpace.h +++ /dev/null @@ -1,246 +0,0 @@ -/** - Chipmunk spaces are simulation containers. You add a bunch of physics objects to a space (rigid bodies, collision shapes, and joints) and step the entire space forward through time as a whole. -*/ -@interface ChipmunkSpace : NSObject { -@private - cpSpace _space; - ChipmunkBody *_staticBody; - - NSMutableSet *_children; - NSMutableArray *_handlers; - - // TODO should probably add a weak data reference like the other objects have -} - -/** - The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10). - Fewer iterations mean less CPU usage, but lower quality (mushy looking) physics. -*/ -@property int iterations; - -/// Deprecated in 5.3.0, should not be needed. @deprecated since 5.3.0 -@property int elasticIterations; - -/// Global gravity value to use for all rigid bodies in this space (default value is @c cpvzero). -@property cpVect gravity; - -/** - Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping). - This value is the fraction of velocity a body should have after 1 second. - A value of 0.9 would mean that each second, a body would have 80% of the velocity it had the previous second. -*/ -@property cpFloat damping; - -/// If a body is moving slower than this speed, it is considered idle. The default value is 0, which signals that the space should guess a good value based on the current gravity. -@property cpFloat idleSpeedThreshold; - -/** - Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping). - If an entire group of touching or jointed bodies has been idle for at least this long, the space will put all of the bodies into a sleeping state where they consume very little CPU. -*/ -@property cpFloat sleepTimeThreshold; - -/// Returns a pointer to the underlying cpSpace C struct -@property (readonly) cpSpace *space; - -/** - The space's designated static body. - Collision shapes added to the body will automatically be marked as static shapes, and rigid bodies that come to rest while touching or jointed to this body will fall asleep. -*/ -@property (readonly) ChipmunkBody *staticBody; - -/** - A macro that defines and initializes shape variables for you in a collision callback. - They are initialized in the order that they were defined in the collision handler associated with the arbiter. - If you defined the handler as: - - @code - [space addCollisionHandler:target typeA:foo typeB:bar ...] - @endcode - - You you will find that @code a->collision_type == 1 @endcode and @code b->collision_type == 2 @endcode. -*/ -#define CHIPMUNK_ARBITER_GET_SHAPES(arb, a, b) ChipmunkShape *a, *b; { \ - cpShape *shapeA, *shapeB; \ - cpArbiterGetShapes(arb, &shapeA, &shapeB); \ - a = shapeA->data; b = shapeB->data; \ -} - -/** - Set the default collision handler. - The default handler is used for all collisions when a specific collision handler cannot be found. - - The expected method selectors are as follows: - @code -- (bool)begin:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (bool)preSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (void)postSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (void)separate:(cpArbiter *)arbiter space:(ChipmunkSpace*)space - @endcode -*/ -- (void)setDefaultCollisionHandler:(id)target - begin:(SEL)begin - preSolve:(SEL)preSolve - postSolve:(SEL)postSolve - separate:(SEL)separate; - -/** - Set a collision handler to handle specific collision types. - The methods are called only when shapes with the specified collisionTypes collide. - - @c typeA and @c typeB should be the same object references set to ChipmunkShape.collisionType. They can be any uniquely identifying object. - Class and global NSString objects work well as collision types as they are easy to get a reference to and do not require you to allocate any objects. - - The expected method selectors are as follows: - @code -- (bool)begin:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (bool)preSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (void)postSolve:(cpArbiter *)arbiter space:(ChipmunkSpace*)space -- (void)separate:(cpArbiter *)arbiter space:(ChipmunkSpace*)space - @endcode -*/ -- (void)addCollisionHandler:(id)target - typeA:(id)a typeB:(id)b - begin:(SEL)begin - preSolve:(SEL)preSolve - postSolve:(SEL)postSolve - separate:(SEL)separate; - - -// TODO these might be a really bad idea as they will not call subclass methods. -// The following two methods use the [shape data] object as the collision handler. -// In order to cache the method lookups, it needs to know the class of the object. -// This means that [shape data] objects _must_ be a direct instance of klass and never a subclass. -// See OneWay.m for an example. - -/// Deprecated in 5.3.0 @deprecated since 5.3.0 -- (void)addShapeAHandler:(Class)klass - typeA:(id)a typeB:(id)b - begin:(SEL)begin - preSolve:(SEL)preSolve - postSolve:(SEL)postSolve - separate:(SEL)separate - __attribute__((deprecated)); - -/// Deprecated in 5.3.0 @deprecated since 5.3.0 -- (void)addShapeBHandler:(Class)klass - typeA:(id)a typeB:(id)b - begin:(SEL)begin - preSolve:(SEL)preSolve - postSolve:(SEL)postSolve - separate:(SEL)separate - __attribute__((deprecated)); - -/// Remove a collision handler. -- (void)removeCollisionHandlerForTypeA:(id)a andB:(id)b; - -/** - Add an object to the space. - This can be any object that implements the ChipmunkObject protocol. - This includes all the basic types such as ChipmunkBody, ChipmunkShape and ChipmunkConstraint as well as any composite game objects you may define that implement the protocol. - @warning This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. -*/ -- (id)add:(NSObject *)obj; - -/** - Add a collection of ChipmunkBaseObject objects to the space. - The objects must implement the ChipmunkBaseObject protocol. These include ChipmunkBody, ChipmunkShape and ChipmunkConstraint objects. - @warning This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. -*/ -- (void)addBaseObjects:(id )objects; - -/** - Remove an object from the space. - This can be any object that implements the ChipmunkObject protocol. - This includes all the basic types such as ChipmunkBody, ChipmunkShape and ChipmunkConstraint as well as any composite game objects you may define that implement the protocol. - @warning This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. -*/ -- (id)remove:(NSObject *)obj; - -/** - Remove a collection of ChipmunkBaseObject objects from the space. - The objects must implement the ChipmunkBaseObject protocol. These include ChipmunkBody, ChipmunkShape and ChipmunkConstraint objects. - @warning This method may not be called from a collision handler callback. See ChipmunkSpace.addPostStepCallback:selector:context: for information on how to do that. -*/ -- (void)removeBaseObjects:(id )objects; - -// Deprecated due to a bug in the implementation that cannot be fixed without breaking backwards compatibility. -// Use [ChipmunkSpace addPostStepCallback:selector:key:] instead. -- (void)addPostStepCallback:(id)target selector:(SEL)selector context:(id)object __attribute__((deprecated)); - -/** - Define a callback to be run just before [ChipmunkSpace step:] finishes. - The main reason you want to define post-step callbacks is to get around the restriction that you cannot call the add/remove methods from a collision handler callback. - Post-step callbacks run right before the next (or current) call to ChipmunkSpace.step: returns when it is safe to add and remove objects. - You can only schedule one post-step callback per context value, this prevents you from accidentally removing an object twice. Registering a second callback for the same object will replace the first. - - The method signature of the method should be: - @code -- (void)postStepCallback:(id)key - @endcode - - This makes it easy to call a removal method on your game controller to remove a game object that died or was destroyed as the result of a collision: - @code -[space addPostStepCallback:gameController selector:@selector(remove:) key:gameObject]; - @endcode - - @attention Not to be confused with post-solve collision handler callbacks. - @warning @c target and @c object cannot be retained by the ChipmunkSpace. If you need to release either after registering the callback, use autorelease to ensure that they won't be deallocated until after [ChipmunkSpace step:] returns. - @see ChipmunkSpace.addPostStepRemoval: -*/ -- (void)addPostStepCallback:(id)target selector:(SEL)selector key:(id)key; - -/// Remove the Chipmunk Object from the space at the end of the step: -- (void)addPostStepRemoval:(id )obj; - -/// Returns a NSArray of all shapes that overlap the given point. The point is treated as having the given group and layers. -- (NSArray *)pointQueryAll:(cpVect)point layers:(cpLayers)layers group:(id)group; - -// TODO? -//- (void)pointQuery:(cpVect)point layers:(cpLayers)layers group:(id)group target:(id)target selector:(SEL)selector; - -/// Returns the first shape that overlaps the given point. The point is treated as having the given group and layers. -- (ChipmunkShape *)pointQueryFirst:(cpVect)point layers:(cpLayers)layers group:(id)group; - -/// Return a NSArray of ChipmunkSegmentQueryInfo objects for all the shapes that overlap the segment. The objects are unsorted. -- (NSArray *)segmentQueryAllFrom:(cpVect)start to:(cpVect)end layers:(cpLayers)layers group:(id)group; - -// TODO? -//- (void)segmentQueryFrom:(cpVect)start to:(cpVect)end layers:(cpLayers)layers group:(id)group target:(id)target selector:(SEL)selector; - -/// Returns the first shape that overlaps the given segment. The segment is treated as having the given group and layers. -- (ChipmunkSegmentQueryInfo *)segmentQueryFirstFrom:(cpVect)start to:(cpVect)end layers:(cpLayers)layers group:(id)group; - -/// Returns a NSArray of all shapes whose bounding boxes overlap the given bounding box. The box is treated as having the given group and layers. -- (NSArray *)bbQueryAll:(cpBB)bb layers:(cpLayers)layers group:(id)group; - -// TODO? -//- (void)bbQuery:(cpBB)bb layers:(cpLayers)layers group:(id)group target:(id)target selector:(SEL)selector; - -/// Returns a NSArray of ChipmunkShapeQueryInfo objects for all the shapes that overlap @c shape. -- (NSArray *)shapeQueryAll:(ChipmunkShape *)shape; - -/// Returns true if the shape overlaps anything in the space. -- (BOOL)shapeTest:shape; - - -/// Perform a shape query for shape and call cpBodyActivate() for everythnig it touches. -- (void)activateShapesTouchingShape:(ChipmunkShape *)shape; - -/// Retune the performance of the static shapes hash. See the C API documentation for a detailed description. -- (void)resizeStaticHashWithDim:(cpFloat)dim andCount:(int)count; - -/// Retune the performance of the active shapes hash. See the C API documentation for a detailed description. -- (void)resizeActiveHashWithDim:(cpFloat)dim andCount:(int)count; - -/// Update all the static shapes. -- (void)rehashStatic; - -/// Update the collision info for a single shape. -/// Can be used to update individual static shapes that were moved or active shapes that were moved that you want to query against. -- (void)rehashShape:(ChipmunkShape *)shape; - -/// Step time forward. While variable timesteps may be used, a constant timestep will allow you to reduce CPU usage by using fewer iterations. -- (void)step:(cpFloat)dt; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ObjectiveChipmunk.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ObjectiveChipmunk.h deleted file mode 100644 index d1fd407f92..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/ObjectiveChipmunk.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - @mainpage Objective-Chipmunk API reference. - -

What is Chipmunk?

- - First of all, Chipmunk is a 2D rigid body physics library distributed under the MIT license. - It is intended to be fast, portable, numerically stable, and easy to use. - For this reason it’s been used in hundreds of games on every system you can name. - This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! - I’ve put thousands of hours of work over many years to make Chipmunk what it is today. - - Objective-Chipmunk is an Objective-C wrapper for Chipmunk that makes developing physics based iPhone games a snap. - It integrates with the Objective-C memory model and provides a number of higher level APIs that ease development and save you time. - While we do charge for Objective-Chipmunk, it will almost certainly save you more time than the small cost to license it. - As a bonus, you’ll be helping to ensure that we can afford to continue to work on Chipmunk improvements. - - You can find out more about Objective-Chipmunk on our webpage. Objective-Chipmunk - -

Where do I start?

- - Probably the best place to start is to by going over the Simple Objective-Chipmunk tutorial. - This tutorial is included with the base Chipmunk source distribution. So you probably already have it. Check in the Objective-Chipmunk/ directory. - - From there, you probably want to skim over the latest documentation. - While geared towards C developers, it introduces all the important building blocks. The Objective-C API simply takes things to the next logical step. -*/ - -#import -#import - -#if TARGET_OS_IPHONE - #import -#endif - -// Override the Chipmunk types for Objective-Chipmunk -#define CP_USE_CGPOINTS 1 -#define CP_DATA_POINTER_TYPE id -#define CP_GROUP_TYPE id -#define CP_COLLISION_TYPE_TYPE id - -#import "chipmunk/chipmunk.h" - -#import "ChipmunkObject.h" -#import "ChipmunkBody.h" -#import "ChipmunkShape.h" -#import "ChipmunkConstraint.h" -#import "ChipmunkSpace.h" -#import "ChipmunkExtras.h" diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk.h deleted file mode 100644 index 03581b0616..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef CHIPMUNK_HEADER -#define CHIPMUNK_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef CP_ALLOW_PRIVATE_ACCESS - #define CP_ALLOW_PRIVATE_ACCESS 1 -#endif - -#if CP_ALLOW_PRIVATE_ACCESS == 1 - #define CP_PRIVATE(symbol) symbol -#else - #define CP_PRIVATE(symbol) symbol##_private -#endif - -void cpMessage(const char *message, const char *condition, const char *file, int line, int isError); -#ifdef NDEBUG - #define cpAssertWarn(condition, message) -#else - #define cpAssertWarn(condition, message) if(!(condition)) cpMessage(message, #condition, __FILE__, __LINE__, 0) -#endif - -#ifdef NDEBUG - #define cpAssert(condition, message) -#else - #define cpAssert(condition, message) if(!(condition)) cpMessage(message, #condition, __FILE__, __LINE__, 1) -#endif - -#include "chipmunk_types.h" - -#ifndef INFINITY - #ifdef _MSC_VER - union MSVC_EVIL_FLOAT_HACK - { - unsigned __int8 Bytes[4]; - float Value; - }; - static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}}; - #define INFINITY (INFINITY_HACK.Value) - #endif - - #ifdef __GNUC__ - #define INFINITY (__builtin_inf()) - #endif - - #ifndef INFINITY - #define INFINITY (1e1000) - #endif -#endif - -// Maximum allocated size for various Chipmunk buffers -#define CP_BUFFER_BYTES (32*1024) - -#define cpmalloc malloc -#define cpcalloc calloc -#define cprealloc realloc -#define cpfree free - -#include "cpVect.h" -#include "cpBB.h" -#include "cpArray.h" -#include "cpHashSet.h" -#include "cpSpaceHash.h" - -#include "cpBody.h" -#include "cpShape.h" -#include "cpPolyShape.h" - -#include "cpArbiter.h" -#include "cpCollision.h" - -#include "constraints/cpConstraint.h" - -#include "cpSpace.h" - -#define CP_HASH_COEF (3344921057ul) -#define CP_HASH_PAIR(A, B) ((cpHashValue)(A)*CP_HASH_COEF ^ (cpHashValue)(B)*CP_HASH_COEF) - -extern const char *cpVersionString; -void cpInitChipmunk(void); - -/** - Calculate the moment of inertia for a circle. - r1 and r2 are the inner and outer diameters. A solid circle has an inner diameter of 0. -*/ -cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset); - -/** - Calculate area of a hollow circle. -*/ -cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2); - -/** - Calculate the moment of inertia for a line segment. - Beveling radius is not supported. -*/ -cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b); - -/** - Calculate the area of a fattened (capsule shaped) line segment. -*/ -cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r); - -/** - Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex. -*/ -cpFloat cpMomentForPoly(cpFloat m, int numVerts, const cpVect *verts, cpVect offset); - -/** - Calculate the signed area of a polygon. -*/ -cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts); - -/** - Calculate the natural centroid of a polygon. -*/ -cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts); - -/** - Center the polygon on the origin. (Subtracts the centroid of the polygon from each vertex) -*/ -void cpRecenterPoly(const int numVerts, cpVect *verts); - -/** - Calculate the moment of inertia for a solid box. -*/ -cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height); - -#ifdef __cplusplus -} - -static inline cpVect operator *(const cpVect v, const cpFloat s){return cpvmult(v, s);} -static inline cpVect operator +(const cpVect v1, const cpVect v2){return cpvadd(v1, v2);} -static inline cpVect operator -(const cpVect v1, const cpVect v2){return cpvsub(v1, v2);} -static inline cpBool operator ==(const cpVect v1, const cpVect v2){return cpveql(v1, v2);} -static inline cpVect operator -(const cpVect v){return cpvneg(v);} - -#endif - -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_ffi.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_ffi.h deleted file mode 100644 index 7fe0d8ec90..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_ffi.h +++ /dev/null @@ -1,59 +0,0 @@ -// Create non static inlined copies of Chipmunk functions, useful for working with dynamic FFIs -// This file should only be included in chipmunk.c - -#ifdef _MSC_VER - #if _MSC_VER >= 1600 - #define MAKE_REF(name) decltype(name) *_##name = name - #else - #define MAKE_REF(name) - #endif -#else - #define MAKE_REF(name) __typeof__(name) *_##name = name -#endif - -MAKE_REF(cpv); // makes a variable named _cpv that contains the function pointer for cpv() -MAKE_REF(cpveql); -MAKE_REF(cpvadd); -MAKE_REF(cpvneg); -MAKE_REF(cpvsub); -MAKE_REF(cpvmult); -MAKE_REF(cpvdot); -MAKE_REF(cpvcross); -MAKE_REF(cpvperp); -MAKE_REF(cpvrperp); -MAKE_REF(cpvproject); -MAKE_REF(cpvrotate); -MAKE_REF(cpvunrotate); -MAKE_REF(cpvlengthsq); -MAKE_REF(cpvlerp); -MAKE_REF(cpvnormalize); -MAKE_REF(cpvnormalize_safe); -MAKE_REF(cpvclamp); -MAKE_REF(cpvlerpconst); -MAKE_REF(cpvdist); -MAKE_REF(cpvdistsq); -MAKE_REF(cpvnear); - -MAKE_REF(cpBBNew); -MAKE_REF(cpBBintersects); -MAKE_REF(cpBBcontainsBB); -MAKE_REF(cpBBcontainsVect); -MAKE_REF(cpBBmerge); -MAKE_REF(cpBBexpand); - -MAKE_REF(cpBodyWorld2Local); -MAKE_REF(cpBodyLocal2World); -MAKE_REF(cpBodyApplyImpulse); -MAKE_REF(cpBodyIsSleeping); -MAKE_REF(cpBodyIsRogue); -MAKE_REF(cpBodyKineticEnergy); - -MAKE_REF(cpArbiterIsFirstContact); -MAKE_REF(cpArbiterGetShapes); -MAKE_REF(cpArbiterGetNormal); -MAKE_REF(cpArbiterGetPoint); - -MAKE_REF(cpConstraintGetImpulse); - -MAKE_REF(cpSegmentQueryHitPoint); -MAKE_REF(cpSegmentQueryHitDist); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_private.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_private.h deleted file mode 100644 index 1aa52ace49..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_private.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define CP_ALLOW_PRIVATE_ACCESS 1 -#include "chipmunk.h" - -void *cpSpaceGetPostStepData(cpSpace *space, void *obj); - -void cpSpaceActivateBody(cpSpace *space, cpBody *body); - -static inline void -cpSpaceLock(cpSpace *space) -{ - space->locked++; -} - -static inline void -cpSpaceUnlock(cpSpace *space) -{ - space->locked--; - cpAssert(space->locked >= 0, "Internal error:Space lock underflow."); - - if(!space->locked){ - cpArray *waking = space->rousedBodies; - for(int i=0, count=waking->num; iarr[i]); - } - - waking->num = 0; - } -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_types.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_types.h deleted file mode 100644 index a9d9a41723..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_types.h +++ /dev/null @@ -1,151 +0,0 @@ -#ifdef __APPLE__ - #import "TargetConditionals.h" -#endif - -#if (defined TARGET_OS_IPHONE) && (!defined CP_USE_CGPOINTS) - #define CP_USE_CGPOINTS -#endif - -#ifdef CP_USE_CGPOINTS - #if TARGET_OS_IPHONE - #import - #elif TARGET_OS_MAC - #import - #endif - - #if defined(__LP64__) && __LP64__ - #define CP_USE_DOUBLES 1 - #else - #define CP_USE_DOUBLES 0 - #endif -#endif - -#ifndef CP_USE_DOUBLES - // use doubles by default for higher precision - #define CP_USE_DOUBLES 1 -#endif - -#if CP_USE_DOUBLES - typedef double cpFloat; - #define cpfsqrt sqrt - #define cpfsin sin - #define cpfcos cos - #define cpfacos acos - #define cpfatan2 atan2 - #define cpfmod fmod - #define cpfexp exp - #define cpfpow pow - #define cpffloor floor - #define cpfceil ceil -#else - typedef float cpFloat; - #define cpfsqrt sqrtf - #define cpfsin sinf - #define cpfcos cosf - #define cpfacos acosf - #define cpfatan2 atan2f - #define cpfmod fmodf - #define cpfexp expf - #define cpfpow powf - #define cpffloor floorf - #define cpfceil ceilf -#endif - -static inline cpFloat -cpfmax(cpFloat a, cpFloat b) -{ - return (a > b) ? a : b; -} - -static inline cpFloat -cpfmin(cpFloat a, cpFloat b) -{ - return (a < b) ? a : b; -} - -static inline cpFloat -cpfabs(cpFloat n) -{ - return (n < 0) ? -n : n; -} - -static inline cpFloat -cpfclamp(cpFloat f, cpFloat min, cpFloat max) -{ - return cpfmin(cpfmax(f, min), max); -} - -static inline cpFloat -cpflerp(cpFloat f1, cpFloat f2, cpFloat t) -{ - return f1*(1.0f - t) + f2*t; -} - -static inline cpFloat -cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d) -{ - return f1 + cpfclamp(f2 - f1, -d, d); -} - -// CGPoints are structurally the same, and allow -// easy interoperability with other Cocoa libraries -#ifdef CP_USE_CGPOINTS - typedef CGPoint cpVect; -#else - typedef struct cpVect{cpFloat x,y;} cpVect; -#endif - -typedef unsigned int cpHashValue; - -// Oh C, how we love to define our own boolean types to get compiler compatibility -#ifdef CP_BOOL_TYPE - typedef CP_BOOL_TYPE cpBool; -#else - typedef int cpBool; -#endif - -#ifndef cpTrue - #define cpTrue 1 -#endif - -#ifndef cpFalse - #define cpFalse 0 -#endif - -#ifdef CP_DATA_POINTER_TYPE - typedef CP_DATA_POINTER_TYPE cpDataPointer; -#else - typedef void * cpDataPointer; -#endif - -#ifdef CP_COLLISION_TYPE_TYPE - typedef CP_COLLISION_TYPE_TYPE cpCollisionType; -#else - typedef unsigned int cpCollisionType; -#endif - -#ifdef CP_GROUP_TYPE - typedef CP_GROUP_TYPE cpGroup; -#else - typedef unsigned int cpGroup; -#endif - -#ifdef CP_LAYERS_TYPE - typedef CP_GROUP_TYPE cpLayers; -#else - typedef unsigned int cpLayers; -#endif - -#ifdef CP_TIMESTAMP_TYPE - typedef CP_TIMESTAMP_TYPE cpTimestamp; -#else - typedef unsigned int cpTimestamp; -#endif - -#ifndef CP_NO_GROUP - #define CP_NO_GROUP ((cpGroup)0) -#endif - -#ifndef CP_ALL_LAYERS - #define CP_ALL_LAYERS (~(cpLayers)0) -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_unsafe.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_unsafe.h deleted file mode 100644 index c5a3f5c857..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/chipmunk_unsafe.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - - -/* This header defines a number of "unsafe" operations on Chipmunk objects. - * In this case "unsafe" is referring to operations which may reduce the - * physical accuracy or numerical stability of the simulation, but will not - * cause crashes. - * - * The prime example is mutating collision shapes. Chipmunk does not support - * this directly. Mutating shapes using this API will caused objects in contact - * to be pushed apart using Chipmunk's overlap solver, but not using real - * persistent velocities. Probably not what you meant, but perhaps close enough. - */ - -#ifndef CHIPMUNK_UNSAFE_HEADER -#define CHIPMUNK_UNSAFE_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -void cpCircleShapeSetRadius(cpShape *shape, cpFloat radius); -void cpCircleShapeSetOffset(cpShape *shape, cpVect offset); - -void cpSegmentShapeSetEndpoints(cpShape *shape, cpVect a, cpVect b); -void cpSegmentShapeSetRadius(cpShape *shape, cpFloat radius); - -void cpPolyShapeSetVerts(cpShape *shape, int numVerts, cpVect *verts, cpVect offset); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpConstraint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpConstraint.h deleted file mode 100644 index fe11e65196..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpConstraint.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// TODO: Comment me! - -extern cpFloat cp_constraint_bias_coef; - -struct cpConstraintClass; -struct cpConstraint; - -typedef void (*cpConstraintPreStepFunction)(struct cpConstraint *constraint, cpFloat dt, cpFloat dt_inv); -typedef void (*cpConstraintApplyImpulseFunction)(struct cpConstraint *constraint); -typedef cpFloat (*cpConstraintGetImpulseFunction)(struct cpConstraint *constraint); - -typedef struct cpConstraintClass { - cpConstraintPreStepFunction preStep; - cpConstraintApplyImpulseFunction applyImpulse; - cpConstraintGetImpulseFunction getImpulse; -} cpConstraintClass; - - - -typedef struct cpConstraint { - CP_PRIVATE(const cpConstraintClass *klass); - - cpBody *a, *b; - cpFloat maxForce; - cpFloat biasCoef; - cpFloat maxBias; - - cpDataPointer data; -} cpConstraint; - -#ifdef CP_USE_DEPRECATED_API_4 -typedef cpConstraint cpJoint; -#endif - -void cpConstraintDestroy(cpConstraint *constraint); -void cpConstraintFree(cpConstraint *constraint); - -static inline void -cpConstraintActivateBodies(cpConstraint *constraint) -{ - cpBody *a = constraint->a; if(a) cpBodyActivate(a); - cpBody *b = constraint->b; if(b) cpBodyActivate(b); -} - -static inline cpFloat -cpConstraintGetImpulse(cpConstraint *constraint) -{ - return constraint->CP_PRIVATE(klass)->getImpulse(constraint); -} - -#define cpConstraintCheckCast(constraint, struct) \ - cpAssert(constraint->CP_PRIVATE(klass) == struct##GetClass(), "Constraint is not a "#struct); - - -#define CP_DefineConstraintGetter(struct, type, member, name) \ -static inline type \ -struct##Get##name(const cpConstraint *constraint){ \ - cpConstraintCheckCast(constraint, struct); \ - return ((struct *)constraint)->member; \ -} \ - -#define CP_DefineConstraintSetter(struct, type, member, name) \ -static inline void \ -struct##Set##name(cpConstraint *constraint, type value){ \ - cpConstraintCheckCast(constraint, struct); \ - cpConstraintActivateBodies(constraint); \ - ((struct *)constraint)->member = value; \ -} \ - -#define CP_DefineConstraintProperty(struct, type, member, name) \ -CP_DefineConstraintGetter(struct, type, member, name) \ -CP_DefineConstraintSetter(struct, type, member, name) - -// Built in Joint types -#include "cpPinJoint.h" -#include "cpSlideJoint.h" -#include "cpPivotJoint.h" -#include "cpGrooveJoint.h" -#include "cpDampedSpring.h" -#include "cpDampedRotarySpring.h" -#include "cpRotaryLimitJoint.h" -#include "cpRatchetJoint.h" -#include "cpGearJoint.h" -#include "cpSimpleMotor.h" diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedRotarySpring.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedRotarySpring.h deleted file mode 100644 index b446a3a513..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedRotarySpring.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef cpFloat (*cpDampedRotarySpringTorqueFunc)(struct cpConstraint *spring, cpFloat relativeAngle); - -const cpConstraintClass *cpDampedRotarySpringGetClass(); - -typedef struct cpDampedRotarySpring { - cpConstraint constraint; - cpFloat restAngle; - cpFloat stiffness; - cpFloat damping; - cpDampedRotarySpringTorqueFunc springTorqueFunc; - - cpFloat target_wrn; - cpFloat w_coef; - - cpFloat iSum; -} cpDampedRotarySpring; - -cpDampedRotarySpring *cpDampedRotarySpringAlloc(void); -cpDampedRotarySpring *cpDampedRotarySpringInit(cpDampedRotarySpring *joint, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); -cpConstraint *cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, restAngle, RestAngle); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, stiffness, Stiffness); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, damping, Damping); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpDampedRotarySpringTorqueFunc, springTorqueFunc, SpringTorqueFunc); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedSpring.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedSpring.h deleted file mode 100644 index 732812892c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpDampedSpring.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpDampedSpring; - -typedef cpFloat (*cpDampedSpringForceFunc)(struct cpConstraint *spring, cpFloat dist); - -const cpConstraintClass *cpDampedSpringGetClass(); - -typedef struct cpDampedSpring { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat restLength; - cpFloat stiffness; - cpFloat damping; - cpDampedSpringForceFunc springForceFunc; - - cpFloat target_vrn; - cpFloat v_coef; - - cpVect r1, r2; - cpFloat nMass; - cpVect n; -} cpDampedSpring; - -cpDampedSpring *cpDampedSpringAlloc(void); -cpDampedSpring *cpDampedSpringInit(cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); -cpConstraint *cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, restLength, RestLength); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, stiffness, Stiffness); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, damping, Damping); -CP_DefineConstraintProperty(cpDampedSpring, cpDampedSpringForceFunc, springForceFunc, SpringForceFunc); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGearJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGearJoint.h deleted file mode 100644 index f0317c1d49..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGearJoint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpGearJointGetClass(); - -typedef struct cpGearJoint { - cpConstraint constraint; - cpFloat phase, ratio; - cpFloat ratio_inv; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpGearJoint; - -cpGearJoint *cpGearJointAlloc(void); -cpGearJoint *cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); -cpConstraint *cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); - -CP_DefineConstraintProperty(cpGearJoint, cpFloat, phase, Phase); -CP_DefineConstraintGetter(cpGearJoint, cpFloat, ratio, Ratio); -void cpGearJointSetRatio(cpConstraint *constraint, cpFloat value); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGrooveJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGrooveJoint.h deleted file mode 100644 index 831e3b68c8..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpGrooveJoint.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpGrooveJointGetClass(); - -typedef struct cpGrooveJoint { - cpConstraint constraint; - cpVect grv_n, grv_a, grv_b; - cpVect anchr2; - - cpVect grv_tn; - cpFloat clamp; - cpVect r1, r2; - cpVect k1, k2; - - cpVect jAcc; - cpFloat jMaxLen; - cpVect bias; -} cpGrooveJoint; - -cpGrooveJoint *cpGrooveJointAlloc(void); -cpGrooveJoint *cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); -cpConstraint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); - - -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_a, GrooveA); -void cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value); -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_b, GrooveB); -void cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value); -CP_DefineConstraintProperty(cpGrooveJoint, cpVect, anchr2, Anchr2); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPinJoint b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPinJoint deleted file mode 100644 index 99d52ac12c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPinJoint +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpPinJointGetClass(); - -typedef struct cpPinJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat dist; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc, jnMax; - cpFloat bias; -} cpPinJoint; - -cpPinJoint *cpPinJointAlloc(void); -cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -cpConstraint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpPinJoint, cpFloat, dist, Dist); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPivotJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPivotJoint.h deleted file mode 100644 index e71c7a015a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpPivotJoint.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpPivotJointGetClass(); - -typedef struct cpPivotJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - - cpVect r1, r2; - cpVect k1, k2; - - cpVect jAcc; - cpFloat jMaxLen; - cpVect bias; -} cpPivotJoint; - -cpPivotJoint *cpPivotJointAlloc(void); -cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -cpConstraint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot); -cpConstraint *cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr2, Anchr2); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRatchetJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRatchetJoint.h deleted file mode 100644 index ecb026ce7f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRatchetJoint.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpRatchetJointGetClass(); - -typedef struct cpRatchetJoint { - cpConstraint constraint; - cpFloat angle, phase, ratchet; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpRatchetJoint; - -cpRatchetJoint *cpRatchetJointAlloc(void); -cpRatchetJoint *cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); -cpConstraint *cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); - -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, angle, Angle); -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, phase, Phase); -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, ratchet, Ratchet); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRotaryLimitJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRotaryLimitJoint.h deleted file mode 100644 index 9062f85f06..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpRotaryLimitJoint.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpRotaryLimitJointGetClass(); - -typedef struct cpRotaryLimitJoint { - cpConstraint constraint; - cpFloat min, max; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpRotaryLimitJoint; - -cpRotaryLimitJoint *cpRotaryLimitJointAlloc(void); -cpRotaryLimitJoint *cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max); -cpConstraint *cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, min, Min); -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, max, Max); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSimpleMotor.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSimpleMotor.h deleted file mode 100644 index 1611e640df..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSimpleMotor.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpSimpleMotorGetClass(); - -typedef struct cpSimpleMotor { - cpConstraint constraint; - cpFloat rate; - - cpFloat iSum; - - cpFloat jAcc, jMax; -} cpSimpleMotor; - -cpSimpleMotor *cpSimpleMotorAlloc(void); -cpSimpleMotor *cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate); -cpConstraint *cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate); - -CP_DefineConstraintProperty(cpSimpleMotor, cpFloat, rate, Rate); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSlideJoint.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSlideJoint.h deleted file mode 100644 index c5ffa4e3d0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/cpSlideJoint.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpSlideJointGetClass(); - -typedef struct cpSlideJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat min, max; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc, jnMax; - cpFloat bias; -} cpSlideJoint; - -cpSlideJoint *cpSlideJointAlloc(void); -cpSlideJoint *cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); -cpConstraint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, min, Min); -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, max, Max); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/util.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/util.h deleted file mode 100644 index e8c0e0b2a0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/constraints/util.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define CP_DefineClassGetter(t) const cpConstraintClass * t##GetClass(){return (cpConstraintClass *)&klass;} - -void cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b); - -#define J_MAX(constraint, dt) (((cpConstraint *)constraint)->maxForce*(dt)) - -// Get valid body pointers and exit early if the bodies are idle -#define CONSTRAINT_BEGIN(constraint, a_var, b_var) \ -cpBody *a_var, *b_var; { \ - a_var = ((cpConstraint *)constraint)->a; \ - b_var = ((cpConstraint *)constraint)->b; \ - if( \ - (cpBodyIsSleeping(a_var) || cpBodyIsStatic(a_var)) && \ - (cpBodyIsSleeping(b_var) || cpBodyIsStatic(b_var)) \ - ) return; \ -} - -static inline cpVect -relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2){ - cpVect v1_sum = cpvadd(a->v, cpvmult(cpvperp(r1), a->w)); - cpVect v2_sum = cpvadd(b->v, cpvmult(cpvperp(r2), b->w)); - - return cpvsub(v2_sum, v1_sum); -} - -static inline cpFloat -normal_relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n){ - return cpvdot(relative_velocity(a, b, r1, r2), n); -} - -static inline void -apply_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - cpBodyApplyImpulse(a, cpvneg(j), r1); - cpBodyApplyImpulse(b, j, r2); -} - -static inline void -apply_bias_impulse(cpBody *body, cpVect j, cpVect r) -{ - body->v_bias = cpvadd(body->v_bias, cpvmult(j, body->m_inv)); - body->w_bias += body->i_inv*cpvcross(r, j); -} - -static inline void -apply_bias_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - apply_bias_impulse(a, cpvneg(j), r1); - apply_bias_impulse(b, j, r2); -} - -static inline cpVect -clamp_vect(cpVect v, cpFloat len) -{ - return cpvclamp(v, len); -// return (cpvdot(v,v) > len*len) ? cpvmult(cpvnormalize(v), len) : v; -} - -static inline cpFloat -k_scalar(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n) -{ - cpFloat mass_sum = a->m_inv + b->m_inv; - cpFloat r1cn = cpvcross(r1, n); - cpFloat r2cn = cpvcross(r2, n); - - cpFloat value = mass_sum + a->i_inv*r1cn*r1cn + b->i_inv*r2cn*r2cn; - cpAssert(value != 0.0, "Unsolvable collision or constraint."); - - return value; -} - -static inline void -k_tensor(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect *k1, cpVect *k2) -{ - // calculate mass matrix - // If I wasn't lazy and wrote a proper matrix class, this wouldn't be so gross... - cpFloat k11, k12, k21, k22; - cpFloat m_sum = a->m_inv + b->m_inv; - - // start with I*m_sum - k11 = m_sum; k12 = 0.0f; - k21 = 0.0f; k22 = m_sum; - - // add the influence from r1 - cpFloat a_i_inv = a->i_inv; - cpFloat r1xsq = r1.x * r1.x * a_i_inv; - cpFloat r1ysq = r1.y * r1.y * a_i_inv; - cpFloat r1nxy = -r1.x * r1.y * a_i_inv; - k11 += r1ysq; k12 += r1nxy; - k21 += r1nxy; k22 += r1xsq; - - // add the influnce from r2 - cpFloat b_i_inv = b->i_inv; - cpFloat r2xsq = r2.x * r2.x * b_i_inv; - cpFloat r2ysq = r2.y * r2.y * b_i_inv; - cpFloat r2nxy = -r2.x * r2.y * b_i_inv; - k11 += r2ysq; k12 += r2nxy; - k21 += r2nxy; k22 += r2xsq; - - // invert - cpFloat determinant = k11*k22 - k12*k21; - cpAssert(determinant != 0.0, "Unsolvable constraint."); - - cpFloat det_inv = 1.0f/determinant; - *k1 = cpv( k22*det_inv, -k12*det_inv); - *k2 = cpv(-k21*det_inv, k11*det_inv); -} - -static inline cpVect -mult_k(cpVect vr, cpVect k1, cpVect k2) -{ - return cpv(cpvdot(vr, k1), cpvdot(vr, k2)); -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArbiter.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArbiter.h deleted file mode 100644 index 31bb929ff3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArbiter.h +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - struct cpArbiter; - struct cpSpace; - struct cpCollisionHandler; - -// Determines how fast penetrations resolve themselves. -extern cpFloat cp_bias_coef; -// Amount of allowed penetration. Used to reduce vibrating contacts. -extern cpFloat cp_collision_slop; - -// Data structure for contact points. -typedef struct cpContact { - // Contact point and normal. - cpVect CP_PRIVATE(p), CP_PRIVATE(n); - // Penetration distance. - CP_PRIVATE(cpFloat dist); - - // Calculated by cpArbiterPreStep(). - cpVect CP_PRIVATE(r1), CP_PRIVATE(r2); - cpFloat CP_PRIVATE(nMass), CP_PRIVATE(tMass), CP_PRIVATE(bounce); - - // Persistant contact information. - cpFloat CP_PRIVATE(jnAcc), CP_PRIVATE(jtAcc), CP_PRIVATE(jBias); - CP_PRIVATE(cpFloat bias); - - // Hash value used to (mostly) uniquely identify a contact. - CP_PRIVATE(cpHashValue hash); -} cpContact; - -// Contacts are always allocated in groups. -cpContact* cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash); - -// Sum the contact impulses. (Can be used after cpSpaceStep() returns) -cpVect CP_PRIVATE(cpContactsSumImpulses)(cpContact *contacts, int numContacts); -cpVect CP_PRIVATE(cpContactsSumImpulsesWithFriction)(cpContact *contacts, int numContacts); - -#define CP_MAX_CONTACTS_PER_ARBITER 6 - -typedef enum cpArbiterState { - cpArbiterStateNormal, - cpArbiterStateFirstColl, - cpArbiterStateIgnore, - cpArbiterStateSleep, - cpArbiterStateCached, -} cpArbiterState; - -// Data structure for tracking collisions between shapes. -typedef struct cpArbiter { - // Information on the contact points between the objects. - CP_PRIVATE(int numContacts); - CP_PRIVATE(cpContact *contacts); - - // The two shapes and bodies involved in the collision. - // These variables are NOT in the order defined by the collision handler. - // Using CP_ARBITER_GET_SHAPES and CP_ARBITER_GET_BODIES will save you from - // many headaches - cpShape CP_PRIVATE(*a), CP_PRIVATE(*b); - - // Calculated before calling the pre-solve collision handler - // Override them with custom values if you want specialized behavior - CP_PRIVATE(cpFloat e); - CP_PRIVATE(cpFloat u); - // Used for surface_v calculations, implementation may change - CP_PRIVATE(cpVect surface_vr); - - // Time stamp of the arbiter. (from cpSpace) - CP_PRIVATE(cpTimestamp stamp); - - CP_PRIVATE(struct cpCollisionHandler *handler); - - // Are the shapes swapped in relation to the collision handler? - CP_PRIVATE(cpBool swappedColl); - CP_PRIVATE(cpArbiterState state); -} cpArbiter; - -// Arbiters are allocated in large buffers by the space and don't require a destroy function -cpArbiter* CP_PRIVATE(cpArbiterInit)(cpArbiter *arb, cpShape *a, cpShape *b); - -// These functions are all intended to be used internally. -// Inject new contact points into the arbiter while preserving contact history. -void CP_PRIVATE(cpArbiterUpdate)(cpArbiter *arb, cpContact *contacts, int numContacts, struct cpCollisionHandler *handler, cpShape *a, cpShape *b); -// Precalculate values used by the solver. -void CP_PRIVATE(cpArbiterPreStep)(cpArbiter *arb, cpFloat dt_inv); -void CP_PRIVATE(cpArbiterApplyCachedImpulse)(cpArbiter *arb); -// Run an iteration of the solver on the arbiter. -void CP_PRIVATE(cpArbiterApplyImpulse)(cpArbiter *arb, cpFloat eCoef); - -// Arbiter Helper Functions -cpVect cpArbiterTotalImpulse(cpArbiter *arb); -cpVect cpArbiterTotalImpulseWithFriction(cpArbiter *arb); -void cpArbiterIgnore(cpArbiter *arb); - - -static inline void -cpArbiterGetShapes(const cpArbiter *arb, cpShape **a, cpShape **b) -{ - if(arb->CP_PRIVATE(swappedColl)){ - (*a) = arb->CP_PRIVATE(b), (*b) = arb->CP_PRIVATE(a); - } else { - (*a) = arb->CP_PRIVATE(a), (*b) = arb->CP_PRIVATE(b); - } -} -#define CP_ARBITER_GET_SHAPES(arb, a, b) cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b); - -static inline void -cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b) -{ - CP_ARBITER_GET_SHAPES(arb, shape_a, shape_b); - (*a) = shape_a->body; - (*b) = shape_b->body; -} -#define CP_ARBITER_GET_BODIES(arb, a, b) cpBody *a, *b; cpArbiterGetBodies(arb, &a, &b); - -static inline cpBool -cpArbiterIsFirstContact(const cpArbiter *arb) -{ - return arb->CP_PRIVATE(state) == cpArbiterStateFirstColl; -} - -static inline int -cpArbiterGetCount(const cpArbiter *arb) -{ - return arb->CP_PRIVATE(numContacts); -} - -static inline cpVect -cpArbiterGetNormal(const cpArbiter *arb, int i) -{ - cpVect n = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n); - return arb->CP_PRIVATE(swappedColl) ? cpvneg(n) : n; -} - -static inline cpVect -cpArbiterGetPoint(const cpArbiter *arb, int i) -{ - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(p); -} - -static inline cpFloat -cpArbiteGetDepth(const cpArbiter *arb, int i) -{ - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); -} - -typedef struct cpContactPointSet { - int count; - - struct { - cpVect point, normal; - cpFloat dist; - } points[CP_MAX_CONTACTS_PER_ARBITER]; -} cpContactPointSet; - -static inline cpContactPointSet -cpArbiterGetContactPointSet(const cpArbiter *arb) -{ - cpContactPointSet set; - set.count = cpArbiterGetCount(arb); - - int i; - for(i=0; iCP_PRIVATE(contacts)[i].CP_PRIVATE(p); - set.points[i].normal = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n); - set.points[i].dist = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); - } - - return set; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArray.h000644 b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArray.h000644 deleted file mode 100644 index e4df01b143..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpArray.h000644 +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// NOTE: cpArray is rarely used and will probably go away. - -typedef struct cpArray{ - CP_PRIVATE(int num); - CP_PRIVATE(int max); - CP_PRIVATE(void **arr); -} cpArray; - -typedef void (*cpArrayIter)(void *ptr, void *data); - -cpArray *cpArrayAlloc(void); -cpArray *cpArrayInit(cpArray *arr, int size); -cpArray *cpArrayNew(int size); - -void cpArrayDestroy(cpArray *arr); -void cpArrayFree(cpArray *arr); - -void cpArrayClear(cpArray *arr); - -void cpArrayPush(cpArray *arr, void *object); -void *cpArrayPop(cpArray *arr); -void cpArrayDeleteIndex(cpArray *arr, int idx); -void cpArrayDeleteObj(cpArray *arr, void *obj); - -void cpArrayAppend(cpArray *arr, cpArray *other); - -void cpArrayEach(cpArray *arr, cpArrayIter iterFunc, void *data); -cpBool cpArrayContains(cpArray *arr, void *ptr); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBB.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBB.h deleted file mode 100644 index e2563590ca..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBB.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef struct cpBB{ - cpFloat l, b, r ,t; -} cpBB; - -static inline cpBB -cpBBNew(const cpFloat l, const cpFloat b, - const cpFloat r, const cpFloat t) -{ - cpBB bb = {l, b, r, t}; - return bb; -} - -static inline cpBool -cpBBintersects(const cpBB a, const cpBB b) -{ - return (a.l<=b.r && b.l<=a.r && a.b<=b.t && b.b<=a.t); -} - -static inline cpBool -cpBBcontainsBB(const cpBB bb, const cpBB other) -{ - return (bb.l < other.l && bb.r > other.r && bb.b < other.b && bb.t > other.t); -} - -static inline cpBool -cpBBcontainsVect(const cpBB bb, const cpVect v) -{ - return (bb.l < v.x && bb.r > v.x && bb.b < v.y && bb.t > v.y); -} - -static inline cpBB -cpBBmerge(const cpBB a, const cpBB b){ - return cpBBNew( - cpfmin(a.l, b.l), - cpfmin(a.b, b.b), - cpfmax(a.r, b.r), - cpfmax(a.t, b.t) - ); -} - -static inline cpBB -cpBBexpand(const cpBB bb, const cpVect v){ - return cpBBNew( - cpfmin(bb.l, v.x), - cpfmin(bb.b, v.y), - cpfmax(bb.r, v.x), - cpfmax(bb.t, v.y) - ); -} - -cpVect cpBBClampVect(const cpBB bb, const cpVect v); // clamps the vector to lie within the bbox -// TODO edge case issue -cpVect cpBBWrapVect(const cpBB bb, const cpVect v); // wrap a vector to a bbox diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBody.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBody.h deleted file mode 100644 index ba1a3372b5..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpBody.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpBody; -struct cpShape; -struct cpSpace; - -typedef void (*cpBodyVelocityFunc)(struct cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -typedef void (*cpBodyPositionFunc)(struct cpBody *body, cpFloat dt); - -extern cpBodyVelocityFunc cpBodyUpdateVelocityDefault; -extern cpBodyPositionFunc cpBodyUpdatePositionDefault; - -// Structure to hold information about the contact graph components -// when putting groups of objects to sleep. -// No interesting user accessible fields. -typedef struct cpComponentNode { - struct cpBody *parent; - struct cpBody *next; - int rank; - cpFloat idleTime; -} cpComponentNode; - -typedef struct cpBody{ - // *** Integration Functions. - - // Function that is called to integrate the body's velocity. (Defaults to cpBodyUpdateVelocity) - cpBodyVelocityFunc velocity_func; - - // Function that is called to integrate the body's position. (Defaults to cpBodyUpdatePosition) - cpBodyPositionFunc position_func; - - // *** Mass Properties - - // Mass and it's inverse. - // Always use cpBodySetMass() whenever changing the mass as these values must agree. - cpFloat m, m_inv; - - // Moment of inertia and it's inverse. - // Always use cpBodySetMoment() whenever changing the moment as these values must agree. - cpFloat i, i_inv; - - // *** Positional Properties - - // Linear components of motion (position, velocity, and force) - cpVect p, v, f; - - // Angular components of motion (angle, angular velocity, and torque) - // Always use cpBodySetAngle() to set the angle of the body as a and rot must agree. - cpFloat a, w, t; - - // Cached unit length vector representing the angle of the body. - // Used for fast vector rotation using cpvrotate(). - cpVect rot; - - // *** User Definable Fields - - // User defined data pointer. - cpDataPointer data; - - // *** Other Fields - - // Maximum velocities this body can move at after integrating velocity - cpFloat v_limit, w_limit; - - // *** Internally Used Fields - - // Velocity bias values used when solving penetrations and correcting constraints. - CP_PRIVATE(cpVect v_bias); - CP_PRIVATE(cpFloat w_bias); - - // Space this body has been added to - CP_PRIVATE(struct cpSpace *space); - - // Pointer to the shape list. - // Shapes form a linked list using cpShape.next when added to a space. - CP_PRIVATE(struct cpShape *shapesList); - - // Used by cpSpaceStep() to store contact graph information. - CP_PRIVATE(cpComponentNode node); -} cpBody; - -// Basic allocation/destruction functions -cpBody *cpBodyAlloc(void); -cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i); -cpBody *cpBodyNew(cpFloat m, cpFloat i); - -cpBody *cpBodyInitStatic(cpBody *body); -cpBody *cpBodyNewStatic(); - -void cpBodyDestroy(cpBody *body); -void cpBodyFree(cpBody *body); - -// Wake up a sleeping or idle body. (defined in cpSpace.c) -void cpBodyActivate(cpBody *body); - -// Force a body to sleep; -// defined in cpSpaceComponent.c -void cpBodySleep(cpBody *body); -void cpBodySleepWithGroup(cpBody *body, cpBody *group); - -static inline cpBool -cpBodyIsSleeping(const cpBody *body) -{ - return (CP_PRIVATE(body->node).next != ((cpBody*)0)); -} - -static inline cpBool -cpBodyIsStatic(const cpBody *body) -{ - return CP_PRIVATE(body->node).idleTime == INFINITY; -} - -static inline cpBool -cpBodyIsRogue(const cpBody *body) -{ - return (body->CP_PRIVATE(space) == ((struct cpSpace*)0)); -} - - -#define CP_DefineBodyGetter(type, member, name) \ -static inline type cpBodyGet##name(const cpBody *body){return body->member;} - -#define CP_DefineBodySetter(type, member, name) \ -static inline void \ -cpBodySet##name(cpBody *body, const type value){ \ - cpBodyActivate(body); \ - body->member = value; \ -} \ - -#define CP_DefineBodyProperty(type, member, name) \ -CP_DefineBodyGetter(type, member, name) \ -CP_DefineBodySetter(type, member, name) - - -// Accessors for cpBody struct members -CP_DefineBodyGetter(cpFloat, m, Mass); -void cpBodySetMass(cpBody *body, cpFloat m); - -CP_DefineBodyGetter(cpFloat, i, Moment); -void cpBodySetMoment(cpBody *body, cpFloat i); - - -CP_DefineBodyProperty(cpVect, p, Pos); -CP_DefineBodyProperty(cpVect, v, Vel); -CP_DefineBodyProperty(cpVect, f, Force); -CP_DefineBodyGetter(cpFloat, a, Angle); -void cpBodySetAngle(cpBody *body, cpFloat a); -CP_DefineBodyProperty(cpFloat, w, AngVel); -CP_DefineBodyProperty(cpFloat, t, Torque); -CP_DefineBodyGetter(cpVect, rot, Rot); -CP_DefineBodyProperty(cpFloat, v_limit, VelLimit); -CP_DefineBodyProperty(cpFloat, w_limit, AngVelLimit); - -// Modify the velocity of the body so that it will move to the specified absolute coordinates in the next timestep. -// Intended for objects that are moved manually with a custom velocity integration function. -void cpBodySlew(cpBody *body, cpVect pos, cpFloat dt); - -// Default Integration functions. -void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -void cpBodyUpdatePosition(cpBody *body, cpFloat dt); - -// Convert body local to world coordinates -static inline cpVect -cpBodyLocal2World(const cpBody *body, const cpVect v) -{ - return cpvadd(body->p, cpvrotate(v, body->rot)); -} - -// Convert world to body local coordinates -static inline cpVect -cpBodyWorld2Local(const cpBody *body, const cpVect v) -{ - return cpvunrotate(cpvsub(v, body->p), body->rot); -} - -// Apply an impulse (in world coordinates) to the body at a point relative to the center of gravity (also in world coordinates). -static inline void -cpBodyApplyImpulse(cpBody *body, const cpVect j, const cpVect r) -{ - body->v = cpvadd(body->v, cpvmult(j, body->m_inv)); - body->w += body->i_inv*cpvcross(r, j); -} - -// Zero the forces on a body. -void cpBodyResetForces(cpBody *body); -// Apply a force (in world coordinates) to a body at a point relative to the center of gravity (also in world coordinates). -void cpBodyApplyForce(cpBody *body, const cpVect f, const cpVect r); - -static inline cpFloat -cpBodyKineticEnergy(const cpBody *body) -{ - // Need to do some fudging to avoid NaNs - cpFloat vsq = cpvdot(body->v, body->v); - cpFloat wsq = body->w*body->w; - return (vsq ? vsq*body->m : 0.0f) + (wsq ? wsq*body->i : 0.0f); -} - -// Apply a damped spring force between two bodies. -// Warning: Large damping values can be unstable. Use a cpDampedSpring constraint for this instead. -void cpApplyDampedSpring(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat rlen, cpFloat k, cpFloat dmp, cpFloat dt); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpCollision.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpCollision.h deleted file mode 100644 index 1c886f713b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpCollision.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -//TODO delete this header? - -// Collides two cpShape structures. -// Returns the number of contact points added to arr -// which should be at least CP_MAX_CONTACTS_PER_ARBITER in length. -// This function is very lonely in this header :( -int cpCollideShapes(const cpShape *a, const cpShape *b, cpContact *arr); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpHashSet.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpHashSet.h deleted file mode 100644 index cafdbf5129..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpHashSet.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// cpHashSet uses a chained hashtable implementation. -// Other than the transformation functions, there is nothing fancy going on. - -// cpHashSetBin's form the linked lists in the chained hash table. -typedef struct cpHashSetBin { - // Pointer to the element. - CP_PRIVATE(void *elt); - // Hash value of the element. - CP_PRIVATE(cpHashValue hash); - // Next element in the chain. - CP_PRIVATE(struct cpHashSetBin *next); -} cpHashSetBin; - -// Equality function. Returns true if ptr is equal to elt. -typedef cpBool (*cpHashSetEqlFunc)(void *ptr, void *elt); -// Used by cpHashSetInsert(). Called to transform the ptr into an element. -typedef void *(*cpHashSetTransFunc)(void *ptr, void *data); - -typedef struct cpHashSet { - // Number of elements stored in the table. - CP_PRIVATE(int entries); - // Number of cells in the table. - CP_PRIVATE(int size); - - CP_PRIVATE(cpHashSetEqlFunc eql); - CP_PRIVATE(cpHashSetTransFunc trans); - - // Default value returned by cpHashSetFind() when no element is found. - // Defaults to NULL. - CP_PRIVATE(void *default_value); - - // The table and recycled bins - CP_PRIVATE(cpHashSetBin **table); - CP_PRIVATE(cpHashSetBin *pooledBins); - - CP_PRIVATE(cpArray *allocatedBuffers); -} cpHashSet; - -// Basic allocation/destruction functions. -void cpHashSetDestroy(cpHashSet *set); -void cpHashSetFree(cpHashSet *set); - -cpHashSet *cpHashSetAlloc(void); -cpHashSet *cpHashSetInit(cpHashSet *set, int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans); -cpHashSet *cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans); - -// Insert an element into the set, returns the element. -// If it doesn't already exist, the transformation function is applied. -void *cpHashSetInsert(cpHashSet *set, cpHashValue hash, void *ptr, void *data); -// Remove and return an element from the set. -void *cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr); -// Find an element in the set. Returns the default value if the element isn't found. -void *cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr); - -// Iterate over a hashset. -typedef void (*cpHashSetIterFunc)(void *elt, void *data); -void cpHashSetEach(cpHashSet *set, cpHashSetIterFunc func, void *data); - -// Iterate over a hashset, drop the element if the func returns false. -typedef cpBool (*cpHashSetFilterFunc)(void *elt, void *data); -void cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpPolyShape.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpPolyShape.h deleted file mode 100644 index 12816ce56b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpPolyShape.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// Axis structure used by cpPolyShape. -typedef struct cpPolyShapeAxis{ - // normal - cpVect n; - // distance from origin - cpFloat d; -} cpPolyShapeAxis; - -// Convex polygon shape structure. -typedef struct cpPolyShape{ - CP_PRIVATE(cpShape shape); - - // Vertex and axis lists. - CP_PRIVATE(int numVerts); - CP_PRIVATE(cpVect *verts); - CP_PRIVATE(cpPolyShapeAxis *axes); - - // Transformed vertex and axis lists. - CP_PRIVATE(cpVect *tVerts); - CP_PRIVATE(cpPolyShapeAxis *tAxes); -} cpPolyShape; - -// Basic allocation functions. -cpPolyShape *cpPolyShapeAlloc(void); -cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset); -cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset); - -cpPolyShape *cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height); -cpShape *cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height); - -// Check that a set of vertexes has a correct winding and that they are convex -cpBool cpPolyValidate(const cpVect *verts, const int numVerts); - -int cpPolyShapeGetNumVerts(cpShape *shape); -cpVect cpPolyShapeGetVert(cpShape *shape, int idx); - -// *** inlined utility functions - -// Returns the minimum distance of the polygon to the axis. -static inline cpFloat -cpPolyShapeValueOnAxis(const cpPolyShape *poly, const cpVect n, const cpFloat d) -{ - cpVect *verts = poly->CP_PRIVATE(tVerts); - cpFloat min = cpvdot(n, verts[0]); - - int i; - for(i=1; iCP_PRIVATE(numVerts); i++) - min = cpfmin(min, cpvdot(n, verts[i])); - - return min - d; -} - -// Returns true if the polygon contains the vertex. -static inline cpBool -cpPolyShapeContainsVert(const cpPolyShape *poly, const cpVect v) -{ - cpPolyShapeAxis *axes = poly->CP_PRIVATE(tAxes); - - int i; - for(i=0; iCP_PRIVATE(numVerts); i++){ - cpFloat dist = cpvdot(axes[i].n, v) - axes[i].d; - if(dist > 0.0f) return cpFalse; - } - - return cpTrue; -} - -// Same as cpPolyShapeContainsVert() but ignores faces pointing away from the normal. -static inline cpBool -cpPolyShapeContainsVertPartial(const cpPolyShape *poly, const cpVect v, const cpVect n) -{ - cpPolyShapeAxis *axes = poly->CP_PRIVATE(tAxes); - - int i; - for(i=0; iCP_PRIVATE(numVerts); i++){ - if(cpvdot(axes[i].n, n) < 0.0f) continue; - cpFloat dist = cpvdot(axes[i].n, v) - axes[i].d; - if(dist > 0.0f) return cpFalse; - } - - return cpTrue; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpShape.h000644 b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpShape.h000644 deleted file mode 100644 index 3534a42332..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpShape.h000644 +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// Forward declarations required for defining other structs. -struct cpShape; -struct cpShapeClass; - -typedef struct cpSegmentQueryInfo { - struct cpShape *shape; // shape that was hit, NULL if no collision - cpFloat t; // Distance along query segment, will always be in the range [0, 1]. - cpVect n; // normal of hit surface -} cpSegmentQueryInfo; - -// Enumeration of shape types. -typedef enum cpShapeType{ - CP_CIRCLE_SHAPE, - CP_SEGMENT_SHAPE, - CP_POLY_SHAPE, - CP_NUM_SHAPES -} cpShapeType; - -// Shape class. Holds function pointers and type data. -typedef struct cpShapeClass { - cpShapeType type; - - // Called by cpShapeCacheBB(). - cpBB (*cacheData)(struct cpShape *shape, cpVect p, cpVect rot); - // Called to by cpShapeDestroy(). - void (*destroy)(struct cpShape *shape); - - // called by cpShapePointQuery(). - cpBool (*pointQuery)(struct cpShape *shape, cpVect p); - - // called by cpShapeSegmentQuery() - void (*segmentQuery)(struct cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); -} cpShapeClass; - -// Basic shape struct that the others inherit from. -typedef struct cpShape{ - // The "class" of a shape as defined above - CP_PRIVATE(const cpShapeClass *klass); - - // cpBody that the shape is attached to. - cpBody *body; - - // Cached BBox for the shape. - cpBB bb; - - // Sensors invoke callbacks, but do not generate collisions - cpBool sensor; - - // *** Surface properties. - - // Coefficient of restitution. (elasticity) - cpFloat e; - // Coefficient of friction. - cpFloat u; - // Surface velocity used when solving for friction. - cpVect surface_v; - - // *** User Definable Fields - - // User defined data pointer for the shape. - cpDataPointer data; - - // User defined collision type for the shape. - cpCollisionType collision_type; - // User defined collision group for the shape. - cpGroup group; - // User defined layer bitmask for the shape. - cpLayers layers; - - // *** Internally Used Fields - - // Shapes form a linked list when added to space on a non-NULL body - CP_PRIVATE(struct cpShape *next); - - // Unique id used as the hash value. - CP_PRIVATE(cpHashValue hashid); -} cpShape; - -// Low level shape initialization func. -cpShape* cpShapeInit(cpShape *shape, const struct cpShapeClass *klass, cpBody *body); - -// Basic destructor functions. (allocation functions are not shared) -void cpShapeDestroy(cpShape *shape); -void cpShapeFree(cpShape *shape); - -// Cache the BBox of the shape. -cpBB cpShapeCacheBB(cpShape *shape); - -// Test if a point lies within a shape. -cpBool cpShapePointQuery(cpShape *shape, cpVect p); - -#define CP_DeclareShapeGetter(struct, type, name) type struct##Get##name(cpShape *shape) - -// Circle shape structure. -typedef struct cpCircleShape{ - CP_PRIVATE(cpShape shape); - - // Center in body space coordinates - CP_PRIVATE(cpVect c); - // Radius. - CP_PRIVATE(cpFloat r); - - // Transformed center. (world space coordinates) - CP_PRIVATE(cpVect tc); -} cpCircleShape; - -// Basic allocation functions for cpCircleShape. -cpCircleShape *cpCircleShapeAlloc(void); -cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset); -cpShape *cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset); - -CP_DeclareShapeGetter(cpCircleShape, cpVect, Offset); -CP_DeclareShapeGetter(cpCircleShape, cpFloat, Radius); - -// Segment shape structure. -typedef struct cpSegmentShape{ - CP_PRIVATE(cpShape shape); - - // Endpoints and normal of the segment. (body space coordinates) - cpVect CP_PRIVATE(a), CP_PRIVATE(b), CP_PRIVATE(n); - // Radius of the segment. (Thickness) - cpFloat CP_PRIVATE(r); - - // Transformed endpoints and normal. (world space coordinates) - cpVect CP_PRIVATE(ta), CP_PRIVATE(tb), CP_PRIVATE(tn); -} cpSegmentShape; - -// Basic allocation functions for cpSegmentShape. -cpSegmentShape* cpSegmentShapeAlloc(void); -cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius); -cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius); - -CP_DeclareShapeGetter(cpSegmentShape, cpVect, A); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, B); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, Normal); -CP_DeclareShapeGetter(cpSegmentShape, cpFloat, Radius); - -// For determinism, you can reset the shape id counter. -void cpResetShapeIdCounter(void); - -// Directed segment queries against individual shapes. -void cpSegmentQueryInfoPrint(cpSegmentQueryInfo *info); - -cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); - -static inline cpVect -cpSegmentQueryHitPoint(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvlerp(start, end, info.t); -} - -static inline cpFloat -cpSegmentQueryHitDist(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvdist(start, end)*info.t; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpace.h000644 b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpace.h000644 deleted file mode 100644 index 4bdf9febc4..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpace.h000644 +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpSpace; - -// Number of frames that contact information should persist. -extern cpTimestamp cp_contact_persistence; - -// User collision handler function types. -typedef cpBool (*cpCollisionBeginFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef cpBool (*cpCollisionPreSolveFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, struct cpSpace *space, void *data); - -// Structure for holding collision pair function information. -// Used internally. -typedef struct cpCollisionHandler { - cpCollisionType a; - cpCollisionType b; - cpCollisionBeginFunc begin; - cpCollisionPreSolveFunc preSolve; - cpCollisionPostSolveFunc postSolve; - cpCollisionSeparateFunc separate; - void *data; -} cpCollisionHandler; - -typedef struct cpContactBufferHeader { - cpTimestamp stamp; - struct cpContactBufferHeader *next; - unsigned int numContacts; -} cpContactBufferHeader; - -typedef struct cpSpace{ - // *** User definable fields - - // Number of iterations to use in the impulse solver to solve contacts. - int iterations; - - // Number of iterations to use in the impulse solver to solve elastic collisions. - int elasticIterations; - - // Default gravity to supply when integrating rigid body motions. - cpVect gravity; - - // Default damping to supply when integrating rigid body motions. - cpFloat damping; - - // Speed threshold for a body to be considered idle. - // The default value of 0 means to let the space guess a good threshold based on gravity. - cpFloat idleSpeedThreshold; - - // Time a group of bodies must remain idle in order to fall asleep - // The default value of INFINITY disables the sleeping algorithm. - cpFloat sleepTimeThreshold; - - // *** Internally Used Fields - - // When the space lock count is non zero you cannot add or remove objects - CP_PRIVATE(int locked); - - // Time stamp. Is incremented on every call to cpSpaceStep(). - CP_PRIVATE(cpTimestamp stamp); - - // The static and active shape spatial hashes. - CP_PRIVATE(cpSpaceHash *staticShapes); - CP_PRIVATE(cpSpaceHash *activeShapes); - - // List of bodies in the system. - CP_PRIVATE(cpArray *bodies); - - // List of groups of sleeping bodies. - CP_PRIVATE(cpArray *sleepingComponents); - - // List of bodies that have been flagged to be awoken. - CP_PRIVATE(cpArray *rousedBodies); - - // List of active arbiters for the impulse solver. - CP_PRIVATE(cpArray *arbiters); - CP_PRIVATE(cpArray *pooledArbiters); - - // Linked list ring of contact buffers. - // Head is the newest buffer, and each buffer points to a newer buffer. - // Head wraps around and points to the oldest (tail) buffer. - CP_PRIVATE(cpContactBufferHeader *contactBuffersHead); - CP_PRIVATE(cpContactBufferHeader *_contactBuffersTail_Deprecated); - - // List of buffers to be free()ed when destroying the space. - CP_PRIVATE(cpArray *allocatedBuffers); - - // Persistant contact set. - CP_PRIVATE(cpHashSet *contactSet); - - // List of constraints in the system. - CP_PRIVATE(cpArray *constraints); - - // Set of collisionpair functions. - CP_PRIVATE(cpHashSet *collFuncSet); - // Default collision handler. - CP_PRIVATE(cpCollisionHandler defaultHandler); - - CP_PRIVATE(cpHashSet *postStepCallbacks); - - cpBody staticBody; -} cpSpace; - -// Basic allocation/destruction functions. -cpSpace* cpSpaceAlloc(void); -cpSpace* cpSpaceInit(cpSpace *space); -cpSpace* cpSpaceNew(void); - -void cpSpaceDestroy(cpSpace *space); -void cpSpaceFree(cpSpace *space); - -// Convenience function. Frees all referenced entities. (bodies, shapes and constraints) -void cpSpaceFreeChildren(cpSpace *space); - -// Collision handler management functions. -void cpSpaceSetDefaultCollisionHandler( - cpSpace *space, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); -void cpSpaceAddCollisionHandler( - cpSpace *space, - cpCollisionType a, cpCollisionType b, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); -void cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b); - -// Add and remove entities from the system. -cpShape *cpSpaceAddShape(cpSpace *space, cpShape *shape); -cpShape *cpSpaceAddStaticShape(cpSpace *space, cpShape *shape); -cpBody *cpSpaceAddBody(cpSpace *space, cpBody *body); -cpConstraint *cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint); - -void cpSpaceRemoveShape(cpSpace *space, cpShape *shape); -void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape); -void cpSpaceRemoveBody(cpSpace *space, cpBody *body); -void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint); - -// Post Step function definition -typedef void (*cpPostStepFunc)(cpSpace *space, void *obj, void *data); -// Register a post step function to be called after cpSpaceStep() has finished. -// obj is used a key, you can only register one callback per unique value for obj -void cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *obj, void *data); - -// Point query callback function -typedef void (*cpSpacePointQueryFunc)(cpShape *shape, void *data); -void cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data); -cpShape *cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group); - -// Segment query callback function -typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data); -void cpSpaceSegmentQuery(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryFunc func, void *data); -cpShape *cpSpaceSegmentQueryFirst(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSegmentQueryInfo *out); - -// BB query callback function -typedef void (*cpSpaceBBQueryFunc)(cpShape *shape, void *data); -void cpSpaceBBQuery(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryFunc func, void *data); - -// Shape query callback function -typedef void (*cpSpaceShapeQueryFunc)(cpShape *shape, cpContactPointSet *points, void *data); -cpBool cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data); - - -void cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape); - - -// Iterator function for iterating the bodies in a space. -typedef void (*cpSpaceBodyIterator)(cpBody *body, void *data); -void cpSpaceEachBody(cpSpace *space, cpSpaceBodyIterator func, void *data); - -// Spatial hash management functions. -void cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count); -void cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count); -void cpSpaceRehashStatic(cpSpace *space); - -void cpSpaceRehashShape(cpSpace *space, cpShape *shape); - -// Update the space. -void cpSpaceStep(cpSpace *space, cpFloat dt); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpaceHash.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpaceHash.h deleted file mode 100644 index dac38a371f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpSpaceHash.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// The spatial hash is Chipmunk's default (and currently only) spatial index type. -// Based on a chained hash table. - -// Used internally to track objects added to the hash -typedef struct cpHandle{ - // Pointer to the object - void *obj; - // Retain count - int retain; - // Query stamp. Used to make sure two objects - // aren't identified twice in the same query. - cpTimestamp stamp; -} cpHandle; - -// Linked list element for in the chains. -typedef struct cpSpaceHashBin{ - cpHandle *handle; - struct cpSpaceHashBin *next; -} cpSpaceHashBin; - -// BBox callback. Called whenever the hash needs a bounding box from an object. -typedef cpBB (*cpSpaceHashBBFunc)(void *obj); - -typedef struct cpSpaceHash{ - // Number of cells in the table. - CP_PRIVATE(int numcells); - // Dimentions of the cells. - CP_PRIVATE(cpFloat celldim); - - // BBox callback. - CP_PRIVATE(cpSpaceHashBBFunc bbfunc); - - // Hashset of the handles and the recycled ones. - CP_PRIVATE(cpHashSet *handleSet); - CP_PRIVATE(cpArray *pooledHandles); - - // The table and the recycled bins. - CP_PRIVATE(cpSpaceHashBin **table); - CP_PRIVATE(cpSpaceHashBin *pooledBins); - - // list of buffers to free on destruction. - CP_PRIVATE(cpArray *allocatedBuffers); - - // Incremented on each query. See cpHandle.stamp. - CP_PRIVATE(cpTimestamp stamp); -} cpSpaceHash; - -//Basic allocation/destruction functions. -cpSpaceHash *cpSpaceHashAlloc(void); -cpSpaceHash *cpSpaceHashInit(cpSpaceHash *hash, cpFloat celldim, int cells, cpSpaceHashBBFunc bbfunc); -cpSpaceHash *cpSpaceHashNew(cpFloat celldim, int cells, cpSpaceHashBBFunc bbfunc); - -void cpSpaceHashDestroy(cpSpaceHash *hash); -void cpSpaceHashFree(cpSpaceHash *hash); - -// Resize the hashtable. (Does not rehash! You must call cpSpaceHashRehash() if needed.) -void cpSpaceHashResize(cpSpaceHash *hash, cpFloat celldim, int numcells); - -// Add an object to the hash. -void cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue id, cpBB _deprecated_ignored); -// Remove an object from the hash. -void cpSpaceHashRemove(cpSpaceHash *hash, void *obj, cpHashValue id); - -// Iterator function -typedef void (*cpSpaceHashIterator)(void *obj, void *data); -// Iterate over the objects in the hash. -void cpSpaceHashEach(cpSpaceHash *hash, cpSpaceHashIterator func, void *data); - -// Rehash the contents of the hash. -void cpSpaceHashRehash(cpSpaceHash *hash); -// Rehash only a specific object. -void cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, cpHashValue id); - -// Query callback. -typedef void (*cpSpaceHashQueryFunc)(void *obj1, void *obj2, void *data); -// Point query the hash. A reference to the query point is passed as obj1 to the query callback. -void cpSpaceHashPointQuery(cpSpaceHash *hash, cpVect point, cpSpaceHashQueryFunc func, void *data); -// Query the hash for a given BBox. -void cpSpaceHashQuery(cpSpaceHash *hash, void *obj, cpBB bb, cpSpaceHashQueryFunc func, void *data); -// Run a query for the object, then insert it. (Optimized case) -void cpSpaceHashQueryInsert(cpSpaceHash *hash, void *obj, cpBB bb, cpSpaceHashQueryFunc func, void *data); -// Rehashes while querying for each object. (Optimized case) -void cpSpaceHashQueryRehash(cpSpaceHash *hash, cpSpaceHashQueryFunc func, void *data); - -// Segment Query callback. -// Return value is uesd for early exits of the query. -// If while traversing the grid, the raytrace function detects that an entire grid cell is beyond the hit point, it will stop the trace. -typedef cpFloat (*cpSpaceHashSegmentQueryFunc)(void *obj1, void *obj2, void *data); -void cpSpaceHashSegmentQuery(cpSpaceHash *hash, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpaceHashSegmentQueryFunc func, void *data); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpVect.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpVect.h deleted file mode 100644 index 261cec522c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/chipmunk/cpVect.h +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/// Constant for the zero vector. -static const cpVect cpvzero = {0.0f,0.0f}; - -/// Convenience constructor for cpVect structs. -static inline cpVect -cpv(const cpFloat x, const cpFloat y) -{ - cpVect v = {x, y}; - return v; -} - -// non-inlined functions - -/// Returns the length of v. -cpFloat cpvlength(const cpVect v); - -/// Spherical linearly interpolate between v1 and v2. -cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t); - -/// Spherical linearly interpolate between v1 towards v2 by no more than angle a radians -cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a); - -/// Returns the unit length vector for the given angle (in radians). -cpVect cpvforangle(const cpFloat a); - -/// Returns the angular direction v is pointing in (in radians). -cpFloat cpvtoangle(const cpVect v); - -/** - Returns a string representation of v. Intended mostly for debugging purposes and not production use. - - @attention The string points to a static local and is reset every time the function is called. - If you want to print more than one vector you will have to split up your printing onto separate lines. -*/ -char *cpvstr(const cpVect v); - -/// Check if two vectors are equal. (Be careful when comparing floating point numbers!) -static inline cpBool -cpveql(const cpVect v1, const cpVect v2) -{ - return (v1.x == v2.x && v1.y == v2.y); -} - -/// Add two vectors -static inline cpVect -cpvadd(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x + v2.x, v1.y + v2.y); -} - -/// Negate a vector. -static inline cpVect -cpvneg(const cpVect v) -{ - return cpv(-v.x, -v.y); -} - -/// Subtract two vectors. -static inline cpVect -cpvsub(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x - v2.x, v1.y - v2.y); -} - -/// Scalar multiplication. -static inline cpVect -cpvmult(const cpVect v, const cpFloat s) -{ - return cpv(v.x*s, v.y*s); -} - -/// Vector dot product. -static inline cpFloat -cpvdot(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.x + v1.y*v2.y; -} - -/** - 2D vector cross product analog. - The cross product of 2D vectors results in a 3D vector with only a z component. - This function returns the magnitude of the z value. -*/ -static inline cpFloat -cpvcross(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.y - v1.y*v2.x; -} - -/// Returns a perpendicular vector. (90 degree rotation) -static inline cpVect -cpvperp(const cpVect v) -{ - return cpv(-v.y, v.x); -} - -/// Returns a perpendicular vector. (-90 degree rotation) -static inline cpVect -cpvrperp(const cpVect v) -{ - return cpv(v.y, -v.x); -} - -/// Returns the vector projection of v1 onto v2. -static inline cpVect -cpvproject(const cpVect v1, const cpVect v2) -{ - return cpvmult(v2, cpvdot(v1, v2)/cpvdot(v2, v2)); -} - -/// Uses complex number multiplication to rotate v1 by v2. Scaling will occur if v1 is not a unit vector. -static inline cpVect -cpvrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x - v1.y*v2.y, v1.x*v2.y + v1.y*v2.x); -} - -/// Inverse of cpvrotate(). -static inline cpVect -cpvunrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x + v1.y*v2.y, v1.y*v2.x - v1.x*v2.y); -} - -/// Returns the squared length of v. Faster than cpvlength() when you only need to compare lengths. -static inline cpFloat -cpvlengthsq(const cpVect v) -{ - return cpvdot(v, v); -} - -/// Linearly interpolate between v1 and v2. -static inline cpVect -cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t) -{ - return cpvadd(cpvmult(v1, 1.0f - t), cpvmult(v2, t)); -} - -/// Returns a normalized copy of v. -static inline cpVect -cpvnormalize(const cpVect v) -{ - return cpvmult(v, 1.0f/cpvlength(v)); -} - -/// Returns a normalized copy of v or cpvzero if v was already cpvzero. Protects against divide by zero errors. -static inline cpVect -cpvnormalize_safe(const cpVect v) -{ - return (v.x == 0.0f && v.y == 0.0f ? cpvzero : cpvnormalize(v)); -} - -/// Clamp v to length len. -static inline cpVect -cpvclamp(const cpVect v, const cpFloat len) -{ - return (cpvdot(v,v) > len*len) ? cpvmult(cpvnormalize(v), len) : v; -} - -/// Linearly interpolate between v1 towards v2 by distance d. -static inline cpVect -cpvlerpconst(cpVect v1, cpVect v2, cpFloat d) -{ - return cpvadd(v1, cpvclamp(cpvsub(v2, v1), d)); -} - -/// Returns the distance between v1 and v2. -static inline cpFloat -cpvdist(const cpVect v1, const cpVect v2) -{ - return cpvlength(cpvsub(v1, v2)); -} - -/// Returns the squared distance between v1 and v2. Faster than cpvdist() when you only need to compare distances. -static inline cpFloat -cpvdistsq(const cpVect v1, const cpVect v2) -{ - return cpvlengthsq(cpvsub(v1, v2)); -} - -/// Returns true if the distance between v1 and v2 is less than dist. -static inline cpBool -cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist) -{ - return cpvdistsq(v1, v2) < dist*dist; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/libObjectiveChipmunk-iPhone.a b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/libObjectiveChipmunk-iPhone.a deleted file mode 100644 index 0e477732a6..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Objective-Chipmunk-simulator/libObjectiveChipmunk-iPhone.a and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Readme.rtf b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Readme.rtf deleted file mode 100644 index d61521151f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/Objective-Chipmunk/Readme.rtf +++ /dev/null @@ -1,27 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww10800\viewh9260\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 Objective-Chipmunk is an Objective-C wrapper for the Chipmunk Physics Library. While Chipmunk's C API is pretty easy to use, the Objective-C API is even better. The primary advantages of a native Objective-C API include integrating with the Cocoa memory management model and the Chipmunk Object protocol. The Chipmunk Object protocol unifies the basic Chipmunk types as well as making it easy to create custom composite collections of the basic types. Additionally, the wrapper adds many convenience methods for doing common setup tasks as well as helper methods that integrate it with the rest of the Cocoa Touch API. The wrapper tries to do things the Objective-C way, adding useful method variations where it makes sense to do so.\ -\ -Chipmunk comes bundled with a trial version of Objective-Chipmunk that you can use to try out Objective-Chipmunk to see if it's right for you. Just copy the Objective-Chipmunk-simulator directory into your project or try one of the other examples in the Objective-Chipmunk parent directory.\ -\ -The Objective-Chipmunk wrapper is free to use on Mac OS X as well as the iPhone simulator. Access to the iPhone optimized build of the library costs $200 to license. Please contact us at {\field{\*\fldinst{HYPERLINK "mailto:admin@howlingmoonsoftware.com"}}{\fldrslt admin@howlingmoonsoftware.com}} for further information. Unlicensed copies show a message when starting up your application, but is otherwise fully functional.\ -\ -Objective-Chipmunk is a more or less straightforward wrapper of the C API in that there shouldn't be any nasty surprises. The only real change is that the -\i cpGroup -\i0 and -\i cpCollisionType -\i0 types are redefined to be a weak reference to -\i id -\i0 . This allows you to use any object as a unique identifier. Static -\i NSString -\i0 instances work particularly well in place of C enumerations. Chipmunk C structs that had a -\i data -\i0 pointer have it initialized to point to the Objective-C object for it, and the accompanying Objective-C object has a weakly referenced -\i data -\i0 property of type -\i id -\i0 for you to use.} \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.h deleted file mode 100644 index 597619d368..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -@class ViewController; - -@interface AppDelegate : NSObject { - UIWindow *window; - ViewController *viewController; -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) IBOutlet ViewController *viewController; - -@end - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.m deleted file mode 100644 index db5b1d1eb2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/AppDelegate.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "AppDelegate.h" -#import "ViewController.h" - -#import -#import - -@implementation AppDelegate - -@synthesize window; -@synthesize viewController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Some quick sound code for this demonstration. - ALCdevice *device = alcOpenDevice(NULL); - ALCcontext *context = alcCreateContext(device, NULL); - alcMakeContextCurrent(context); - - AudioSessionInitialize(NULL, NULL, NULL, NULL); - UInt32 sessionCategory = kAudioSessionCategory_SoloAmbientSound; - AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory); - AudioSessionSetActive(TRUE); - - [window addSubview:viewController.view]; - [window makeKeyAndVisible]; - - return YES; -} - -- (void)dealloc { - [viewController release]; - [window release]; - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.h deleted file mode 100644 index 39b8f422fc..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.h +++ /dev/null @@ -1,20 +0,0 @@ -#import - -#import "ObjectiveChipmunk.h" - -@interface FallingButton : NSObject { - UIButton *button; - - ChipmunkBody *body; - NSSet *chipmunkObjects; - - int touchShapes; -} - -@property (readonly) UIButton *button; -@property (readonly) NSSet *chipmunkObjects; -@property int touchedShapes; - -- (void)updatePosition; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.m deleted file mode 100644 index c72da2a622..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/FallingButton.m +++ /dev/null @@ -1,112 +0,0 @@ -// This class is a game object controller of sorts. -// It basically ties the physics and graphics objects together, and gives you a -// place to put your controlling logic. - -#import "FallingButton.h" - -#define SIZE 100.0f - -@implementation FallingButton - -@synthesize button; -@synthesize touchedShapes; - -// This property fulfills the ChipmunkObject protocol. -// It is perhaps the most important thing this class does. -// By maintaining this list of objects, a ChipmunkSpace can easily add and remove complicated game objects. -// Using the C API, you would have to keep references to each Chipmunk object and add them one by one -// based on their type to the Chipmunk space. -@synthesize chipmunkObjects; - -static cpFloat frand_unit(){return 2.0f*((cpFloat)rand()/(cpFloat)RAND_MAX) - 1.0f;} - -- (void)buttonClicked { - // Apply a random velcity change to the body when the button is clicked. - cpVect v = cpvmult(cpv(frand_unit(), frand_unit()), 300.0f); - body.vel = cpvadd(body.vel, v); - - body.angVel += 5.0f*frand_unit(); -} - -- (void)updatePosition { - // ChipmunkBodies have a handy affineTransform property that makes working with Cocoa or Cocos2D a snap. - // This is all you have to do to move a button along with the physics! - button.transform = body.affineTransform; - - // Alternatively, you could build a transform yourself from the body's position and rotation: - // cpVect pos = body.pos; - // button.transform = CGAffineTransformRotate(CGAffineTransformMakeTranslation(pos.x, pos.y), body.angle); -} - -- (id)init { - if(self = [super init]){ - // Set up the UIButton. - button = [UIButton buttonWithType:UIButtonTypeCustom]; - [button setTitle:@"Click Me!" forState:UIControlStateNormal]; - [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; - [button setBackgroundImage:[UIImage imageNamed:@"logo.png"] forState:UIControlStateNormal]; - button.bounds = CGRectMake(0, 0, SIZE, SIZE); - - [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchDown]; - - // Set up Chipmunk objects. - cpFloat mass = 1.0f; - - // The moment of inertia is like the rotational mass of an object. - // Chipmunk provides a number of helper functions to help you estimate the moment of inertia. - cpFloat moment = cpMomentForBox(mass, SIZE, SIZE); - - // A rigid body is the basic skeleton you attach joints and collision shapes too. - // Rigid bodies hold the physical properties of an object such as the postion, rotation, and mass of an object. - // You attach collision shapes to rigid bodies to define their shape and allow them to collide with other objects, - // and you can attach joints between rigid bodies to connect them together. - body = [[ChipmunkBody alloc] initWithMass:mass andMoment:moment]; - body.pos = cpv(200.0f, 200.0f); - - // Chipmunk supports a number of collision shape types. See the documentation for more information. - // Because we are storing this into a local variable instead of an instance variable, we can use the autorelease constructor. - // We'll let the chipmunkObjects NSSet hold onto the reference for us. - ChipmunkShape *shape = [ChipmunkPolyShape boxWithBody:body width:SIZE height:SIZE]; - - // The elasticity of a shape controls how bouncy it is. - shape.elasticity = 0.3f; - // The friction propertry should be self explanatory. Friction values go from 0 and up- they can be higher than 1f. - shape.friction = 0.3f; - - // Set the collision type to a unique value (the class object works well) - // This type is used as a key later when setting up callbacks. - shape.collisionType = [FallingButton class]; - - // Set data to point back to this object. - // That way you can get a reference to this object from the shape when you are in a callback. - shape.data = self; - - // Keep in mind that you can attach multiple collision shapes to each rigid body, and that each shape can have - // unique properties. You can make the player's head have a different collision type for instance. This is useful - // for brain damage. - - // Now we just need to initialize the instance variable for the chipmunkObjects property. - // ChipmunkObjectFlatten() is an easy way to build this set. You can pass any object to it that - // implements the ChipmunkObject protocol and not just primitive types like bodies and shapes. - - // Notice that we didn't even have to keep a reference to 'shape'. It was created using the autorelease convenience function. - // This means that the chipmunkObjects NSSet will manage the memory for us. No need to worry about forgetting to call - // release later when you're using Objective-Chipmunk! - - // Note the nil terminator at the end! (this is how it knows you are done listing objects) - chipmunkObjects = [ChipmunkObjectFlatten(body, shape, nil) retain]; - } - - return self; -} - -- (void) dealloc -{ - [button release]; - [body release]; - [chipmunkObjects release]; - - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.h deleted file mode 100644 index 611fbd6386..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.h +++ /dev/null @@ -1,5 +0,0 @@ -@interface SimpleSound - -+ (void)playSoundWithVolume:(float)volume; - -@end \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.m deleted file mode 100644 index c58133466e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/SimpleSound.m +++ /dev/null @@ -1,42 +0,0 @@ -#import "SimpleSound.h" - -#import -#import - -static char hitSoundSamples[] = "/-+\037\327\331\332\351!\037\036\016\345\346\346\366\031\031\031\006\346\346\346\374\030\030\030\377\347\347\347\003\030\030\030\371\347\347\347\t\030\030\030\363\347\350\350\016\027\027\027\356\350\350\350\024\027\027\027\350\350\350\353\027\027\027\021\350\351\351\361\026\026\026\v\351\351\351\367\026\026\026\005\351\351\351\375\026\026\026\377\352\352\352\002\025\025\025\372\352\352\352\b\025\025\025\365\352\352\352\r\025\024\024\360\353\353\353\022\024\024\024\353\353\353\356\024\024\024\017\353\353\353\363\024\023\023\t\354\354\354\370\023\023\023\004\354\354\354\375\023\023\023\000\354\354\354\002\022\022\022\373\355\355\355\006\022\022\022\366\355\355\355\v\022\022\022\362\355\355\356\017\021\021\021\356\356\356\360\021\021\021\r\356\356\356\365\021\021\021\b\356\357\357\371\020\020\020\004\357\357\357\375\020\020\020\000\357\357\357\002\020\020\020\373\360\360\360\005\017\017\017\370\360\360\360\t\017\017\017\364\360\360\360\r\017\017\016\361\361\361\363\016\016\016\n\361\361\361\366\016\016\016\a\361\361\361\372\016\r\r\003\362\362\362\376\r\r\r\000\362\362\362\001\r\r\r\374\362\362\362\004\f\f\f\371\363\363\363\a\f\f\f\366\363\363\363\n\f\f\f\363\363\363\365\v\v\v\b\364\364\364\370\v\v\v\005\364\364\364\373\v\v\v\002\364\364\365\376\n\n\n\000\365\365\365\001\n\n\n\375\365\365\365\003\n\n\n\372\366\366\366\006\t\t\t\370\366\366\366\b\t\t\t\366\366\366\367\t\t\t\006\367\367\367\372\b\b\b\004\367\367\367\374\b\b\b\002\367\367\367\376\b\b\a\000\370\370\370\000\a\a\a\376\370\370\370\002\a\a\a\374\370\370\370\004\006\006\006\372\371\371\371\005\006\006\006\371\371\371\372\006\006\006\004\371\371\371\374\005\005\005\002\372\372\372\375\005\005\005\001\372\372\372\377\005\005\005\000\372\372\373\000\004\004\004\376\373\373\373\001\004\004\004\375\373\373\373\002\004\004\004\374\373\374\374\003\003\003\003\374\374\374\374\003\003\003\002\374\374\374\375\003\003\003\001\375\375\375\376\002\002\002\000\375\375\375\377\002\002\002\000\375\375\375\000\002\002\001\377\376\376\376\000\001\001\001\377\376\376\376\000\001\001\001\377\376\376\376\000\001\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000"; - -static ALuint hitSoundBuffer, hitSoundSource; - -@implementation SimpleSound - -static void -LogErrors(void){ - ALenum alerr; - while(alerr = alGetError()) - NSLog(@"OpenAL error 0x%X\n", alerr); -} - -+ (void)initialize -{ - static BOOL done = FALSE; - if(done) return; - - alGenBuffers(1, &hitSoundBuffer); - alBufferData(hitSoundBuffer, AL_FORMAT_MONO16, hitSoundSamples, sizeof(hitSoundSamples)/sizeof(char), 11025); - - alGenSources(1, &hitSoundSource); - alSourcei(hitSoundSource, AL_BUFFER, hitSoundBuffer); - - LogErrors(); - - done = TRUE; -} - -+ (void)playSoundWithVolume:(float)volume { - alSourcef(hitSoundSource, AL_GAIN, volume); - alSourcePlay(hitSoundSource); - - LogErrors(); -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.h deleted file mode 100644 index 7fe0009c70..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -#import - -#import - -#import "FallingButton.h" - - -@interface ViewController : UIViewController { - CADisplayLink *displayLink; - ChipmunkSpace *space; - FallingButton *fallingButton; -} - -@end - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.m deleted file mode 100644 index d5fde14041..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/Classes/ViewController.m +++ /dev/null @@ -1,166 +0,0 @@ -#import "ViewController.h" - -#import "SimpleSound.h" - -// An object to use as a collision type for the screen border. -// Class objects and strings are easy and convenient to use as collision types. -static NSString *borderType = @"borderType"; - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - // Create and initialize the Chipmunk space. - // Chipmunk spaces are containers for simulating physics. - // You add a bunch of objects and joints to the space and the space runs the physics simulation on them all together. - space = [[ChipmunkSpace alloc] init]; - - // This method adds four static line segment shapes to the space. - // Most 2D physics games end up putting all the gameplay in a box. This method just makes that easy. - // We'll tag these segment shapes with the borderType object. You'll see what this is for next. - [space addBounds:self.view.bounds thickness:10.0f elasticity:1.0f friction:1.0f layers:CP_ALL_LAYERS group:CP_NO_GROUP collisionType:borderType]; - - // This adds a callback that happens whenever a shape tagged with the - // [FallingButton class] object and borderType objects collide. - // You can use any object you want as a collision type identifier. - // I often find it convenient to use class objects to define collision types. - // There are 4 different collision events that you can catch: begin, pre-solve, post-solve and separate. - // See the documentation for a description of what they are all for. - [space addCollisionHandler:self - typeA:[FallingButton class] typeB:borderType - begin:@selector(beginCollision:space:) - preSolve:nil - postSolve:@selector(postSolveCollision:space:) - separate:@selector(separateCollision:space:) - ]; - - - // You have to actually put things in a Chipmunk space for it to do anything interesting. - // I've created a game object controller class called FallingButton that makes a UIButton that is influenced by physics. - fallingButton = [[FallingButton alloc] init]; - // Add the UIButton to the view hierarchy. - [self.view addSubview:fallingButton.button]; - - // Adding physics objects in Objective-Chipmunk is a snap thanks to the ChipmunkObject protocol. - // No matter how many physics objects (collision shapes, joints, etc) the fallingButton has, it can be added in a single line! - // See FallingButton.m to see how easy it is to implement the protocol. - [space add:fallingButton]; -} - - - -- (bool)beginCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space { - // This macro gets the colliding shapes from the arbiter and defines variables for them. - CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border); - - // It expands to look something like this: - // ChipmunkShape *buttonShape = GetShapeWithFirstCollisionType(); - // ChipmunkShape *border = GetShapeWithSecondCollisionType(); - - // Lets log the data pointers just to make sure we are getting what we think we are. - NSLog(@"First object in the collision is %@ second object is %@.", buttonShape.data, border.data); - - // When we created the collision shape for the FallingButton, - // we set the data pointer to point at the FallingButton it was associated with. - FallingButton *fb = buttonShape.data; - - // Increment the touchedShapes counter on the FallingButton object. - // We'll decrement this in the separate callback. - // If the counter is 0, then you know you aren't touching anything. - // You can use this technique in platformer games to track if the player is in the air on not. - fb.touchedShapes++; - - // Change the background color to gray so we know when the button is touching something. - self.view.backgroundColor = [UIColor grayColor]; - - // begin and pre-solve callbacks MUST return a boolean. - // Returning false from a begin callback ignores a collision permanently. - // Returning false from a pre-solve callback ignores the collision for just one frame. - // See the documentation on collision handlers for more information. - return TRUE; // We return true, so the collision is handled normally. -} - -// The post-solve collision callback is called right after Chipmunk has finished calculating all of the -// collision responses. You can use it to find out how hard objects hit each other. -// There is also a pre-solve callback that allows you to reject collisions conditionally. -- (void)postSolveCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space { - // We only care about the first frame of the collision. - // If the shapes have been colliding for more than one frame, return early. - if(!cpArbiterIsFirstContact(arbiter)) return; - - // This method gets the impulse that was applied between the two objects to resolve - // the collision. We'll use the length of the impulse vector to approximate the sound - // volume to play for the collision. - cpFloat impulse = cpvlength(cpArbiterTotalImpulse(arbiter)); - - float volume = MIN(impulse/500.0f, 1.0f); - if(volume > 0.05f){ - [SimpleSound playSoundWithVolume:volume]; - } -} - -static CGFloat frand(){return (CGFloat)rand()/(CGFloat)RAND_MAX;} - -// The separate callback is called whenever shapes stop touching. -- (void)separateCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space { - CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border); - - // Decrement the counter on the FallingButton. - FallingButton *fb = buttonShape.data; - fb.touchedShapes--; - - // If touchedShapes is 0, then we know the falling button isn't touching anything anymore. - if(fb.touchedShapes == 0){ - // Let's set the background color to a random color so you can see each time the shape touches something new. - self.view.backgroundColor = [UIColor colorWithRed:frand() green:frand() blue:frand() alpha:1.0f]; - } -} - -// When the view appears on the screen, start the animation timer and tilt callbacks. -- (void)viewDidAppear:(BOOL)animated { - // Set up the display link to control the timing of the animation. - displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)]; - displayLink.frameInterval = 1; - [displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; - - // Set up an accelerometer delegate. - UIAccelerometer *accel = [UIAccelerometer sharedAccelerometer]; - accel.updateInterval = 1.0f/30.0f; - accel.delegate = self; -} - -// This method is called each frame to update the scene. -// It is called from the display link every time the screen wants to redraw itself. -- (void)update { - // Step (simulate) the space based on the time since the last update. - cpFloat dt = displayLink.duration*displayLink.frameInterval; - [space step:dt]; - - // Update the button. - // This sets the position and rotation of the button to match the rigid body. - [fallingButton updatePosition]; -} - -- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)accel { - // Setting the gravity based on the tilt of the device is easy. - space.gravity = cpvmult(cpv(accel.x, -accel.y), 100.0f); -} - -// The view disappeared. Stop the animation timers and tilt callbacks. -- (void)viewDidDisappear:(BOOL)animated { - // Remove the timer. - [displayLink invalidate]; - displayLink = nil; - - // Remove the accelerometer delegate. - [UIAccelerometer sharedAccelerometer].delegate = nil; -} - -- (void)dealloc { - [fallingButton release]; - - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/MainWindow.xib b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/MainWindow.xib deleted file mode 100644 index 782ef500d9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/MainWindow.xib +++ /dev/null @@ -1,498 +0,0 @@ - - - - 1024 - 10F569 - 788 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - - 274 - {320, 460} - - - - 3 - MQA - - 2 - - - IBCocoaTouchFramework - - - - 1 - - IBCocoaTouchFramework - NO - - - - 292 - {320, 480} - - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - YES - - - delegate - - - - 4 - - - - viewController - - - - 11 - - - - window - - - - 14 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - 3 - - - App Delegate - - - -2 - - - - - 10 - - - YES - - - - - - 12 - - - YES - - - - - 16 - - - YES - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 10.CustomClassName - 10.IBEditorWindowLastContentRect - 10.IBPluginDependency - 12.IBEditorWindowLastContentRect - 12.IBPluginDependency - 16.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - - - YES - UIApplication - UIResponder - ViewController - {{726, 411}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{525, 346}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - AppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 18 - - - - YES - - AppDelegate - NSObject - - YES - - YES - viewController - window - - - YES - ViewController - UIWindow - - - - YES - - YES - viewController - window - - - YES - - viewController - ViewController - - - window - UIWindow - - - - - IBProjectSource - Classes/AppDelegate.h - - - - AppDelegate - NSObject - - IBUserSource - - - - - UIWindow - UIView - - IBUserSource - - - - - ViewController - UIViewController - - IBProjectSource - Classes/ViewController.h - - - - ViewController - UIViewController - - IBUserSource - - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIApplication - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIApplication.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWindow - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWindow.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - SimpleObjectiveChipmunk.xcodeproj - 3 - 117 - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk-Info.plist b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk-Info.plist deleted file mode 100644 index e732959fbf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk-Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk.xcodeproj/project.pbxproj b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk.xcodeproj/project.pbxproj deleted file mode 100644 index e53cdcdd9b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk.xcodeproj/project.pbxproj +++ /dev/null @@ -1,304 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; - 28D7ACF80DDB3853001CB0EB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ViewController.m */; }; - D364564F12130B5800023C7E /* FallingButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D364564E12130B5800023C7E /* FallingButton.m */; }; - D364569D121314C500023C7E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D364569C121314C500023C7E /* QuartzCore.framework */; }; - D36457881213327700023C7E /* SimpleSound.m in Sources */ = {isa = PBXBuildFile; fileRef = D36457871213327700023C7E /* SimpleSound.m */; }; - D3645799121334F000023C7E /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3645798121334F000023C7E /* OpenAL.framework */; }; - D36457DC121338B500023C7E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36457DB121338B500023C7E /* AudioToolbox.framework */; }; - D36458991213420C00023C7E /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = D36458981213420C00023C7E /* logo.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* SimpleObjectiveChipmunk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleObjectiveChipmunk.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 28D7ACF60DDB3853001CB0EB /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 28D7ACF70DDB3853001CB0EB /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* SimpleObjectiveChipmunk_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleObjectiveChipmunk_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* SimpleObjectiveChipmunk-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SimpleObjectiveChipmunk-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - D364564D12130B5800023C7E /* FallingButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FallingButton.h; sourceTree = ""; }; - D364564E12130B5800023C7E /* FallingButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FallingButton.m; sourceTree = ""; }; - D364569C121314C500023C7E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - D36457861213326700023C7E /* SimpleSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleSound.h; sourceTree = ""; }; - D36457871213327700023C7E /* SimpleSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleSound.m; sourceTree = ""; }; - D3645798121334F000023C7E /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; - D36457DB121338B500023C7E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - D36458981213420C00023C7E /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - D364569D121314C500023C7E /* QuartzCore.framework in Frameworks */, - D3645799121334F000023C7E /* OpenAL.framework in Frameworks */, - D36457DC121338B500023C7E /* AudioToolbox.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - 28D7ACF60DDB3853001CB0EB /* ViewController.h */, - 28D7ACF70DDB3853001CB0EB /* ViewController.m */, - D364564D12130B5800023C7E /* FallingButton.h */, - D364564E12130B5800023C7E /* FallingButton.m */, - D36457861213326700023C7E /* SimpleSound.h */, - D36457871213327700023C7E /* SimpleSound.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* SimpleObjectiveChipmunk.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* SimpleObjectiveChipmunk_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - D36458981213420C00023C7E /* logo.png */, - 28AD733E0D9D9553002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* SimpleObjectiveChipmunk-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - D36457DB121338B500023C7E /* AudioToolbox.framework */, - D3645798121334F000023C7E /* OpenAL.framework */, - D364569C121314C500023C7E /* QuartzCore.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* SimpleObjectiveChipmunk */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SimpleObjectiveChipmunk" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SimpleObjectiveChipmunk; - productName = SimpleObjectiveChipmunk; - productReference = 1D6058910D05DD3D006BFB54 /* SimpleObjectiveChipmunk.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleObjectiveChipmunk" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* SimpleObjectiveChipmunk */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, - D36458991213420C00023C7E /* logo.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 28D7ACF80DDB3853001CB0EB /* ViewController.m in Sources */, - D364564F12130B5800023C7E /* FallingButton.m in Sources */, - D36457881213327700023C7E /* SimpleSound.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SimpleObjectiveChipmunk_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - INFOPLIST_FILE = "SimpleObjectiveChipmunk-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iphone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - PRODUCT_NAME = SimpleObjectiveChipmunk; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SimpleObjectiveChipmunk_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - INFOPLIST_FILE = "SimpleObjectiveChipmunk-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iphone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - PRODUCT_NAME = SimpleObjectiveChipmunk; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - OTHER_LDFLAGS = "-lObjectiveChipmunk-iphone"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - OTHER_LDFLAGS = "-lObjectiveChipmunk-iphone"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SimpleObjectiveChipmunk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleObjectiveChipmunk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk_Prefix.pch b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk_Prefix.pch deleted file mode 100644 index d12231221c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/SimpleObjectiveChipmunk_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'SimpleObjectiveChipmunk' target in the 'SimpleObjectiveChipmunk' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/ViewController.xib b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/ViewController.xib deleted file mode 100644 index a2527e2934..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/ViewController.xib +++ /dev/null @@ -1,153 +0,0 @@ - - - - 1024 - 10F569 - 788 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 - - - YES - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 460} - - 3 - MC43NQA - - 2 - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 7 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 6.IBEditorWindowLastContentRect - 6.IBPluginDependency - - - YES - ViewController - UIResponder - {{239, 654}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 7 - - - - YES - - ViewController - UIViewController - - IBUserSource - - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - SimpleObjectiveChipmunk.xcodeproj - 3 - 117 - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/logo.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/logo.png deleted file mode 100644 index 986b859000..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/logo.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/main.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/main.m deleted file mode 100644 index 2e25d80339..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// SimpleObjectiveChipmunk -// -// Created by Scott Lembcke on 8/11/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/final.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/final.png deleted file mode 100644 index 287d3cefac..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/final.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/hms_logo.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/hms_logo.png deleted file mode 100644 index c0b338d282..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/hms_logo.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/logo1_med.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/logo1_med.png deleted file mode 100644 index 01634a01f4..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/images/logo1_med.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/index.html b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/index.html deleted file mode 100644 index fa8abdb215..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - Chipmunk Game Dynamics Documentation - - - - - - -

Simple Objective-Chipmunk Tutorial:

- - - -

This tutorial aims to be a bare-bones introduction to using Objective-Chipmunk in an iPhone game. It is very heavily commented and should be easy to follow. Despite containing only 100 or so actual lines of code, it squeezes in an overview of a number of topics:

- -
    -
  • Creating a Chipmunk space to simulate objects in it -
  • Creating a bouncing box with friction -
  • Controlling gravity using the device's tilt -
  • Using collision callbacks to make impact sounds based on how hard objects collide -
  • Using collision callbacks to track if an object is sitting on the ground or in the air -
  • Using the ChipmunkObject protocol to easily add complex objects to a space -
  • Using a CADisplayLink for smooth animation -
  • Integrating Chipmunk into a Cocoa Touch UI -
- -

Even if you are just going to use the vanilla C API, this tutorial serves as a nice introduction to Chipmunk on the iPhone.

- -

Download the project files and everything you need here: Chipmunk Latest. The project for this tutorial is located in the Objective-Chipmunk/SimpleObjectiveChipmunk/ directory.

- -

What Do I Need to Know First?

- -

This tutorial assumes you have some prior experience with iPhone development. It does not try to explain Objective-C memory management or the Cocoa Touch APIs. You'll have to know at least a little about that to follow along.

- -

What is Chipmunk?

- -

Chipmunk is a 2D rigid body physics library distributed under the MIT license. It is intended to be fast, portable, numerically stable, and easy to use. For this reason it's been used in hundreds of games on just about every system you could name. This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! I've put thousands of hours of work over many years to make Chipmunk what it is today. Check out Chipmunk's Google Code project page for more information.

- -

What is Objective-Chipmunk:

- -

Objective-Chipmunk is an Objective-C wrapper for the Chipmunk Physics Library. While Chipmunk's C API is pretty easy to use, the Objective-C API is even better. The primary advantages of a native Objective-C API include integrating with the Cocoa memory management model and the Chipmunk Object protocol. The Chipmunk Object protocol unifies the basic Chipmunk types as well as making it easy to create custom composite collections of the basic types. Additionally, the wrapper adds many convenience methods for doing common setup tasks as well as helper methods that integrate it with the rest of the Cocoa Touch API. The wrapper tries to do things the Objective-C way, adding useful method variations where it makes sense to do so.

- -

You can find out more information on Objective-Chipmunk's webpage. While Objective-Chipmunk is not free like Chipmunk is, the enhanced API will almost certainly save you time and money. You'll also be helping to support further Chipmunk development!

- -

Why are you using Cocoa Touch classes for a game tutorial?

- -

Cocoa Touch actually works great for prototyping an iPhone game quickly. It's reasonably fast because it's hardware accelerated, and doesn't seem to slow down too much until you have a few dozen objects on the screen. Interface Builder makes a decent bare bones level editor as well. We've written several contract mini-games this way and it saved a lot of headaches dealing with libraries and dependencies. Given the simplicity of the games, using anything fancier would have been a waste of time.

- -

That said, we will be working on a simple Cocos2D tutorial for Objective-Chipmunk next. Cocos2D is much more applicable to a wider range of game types and is much more efficient.

- -

Let's get started!

- -

A very valid question of many Chipmunk beginners is how to structure their game to take advantage of Chipmunk. A lot of people try to build their game around Chipmunk, but this isn't a very good idea. Chipmunk is not meant to be a game engine. It doesn't render any graphics, and you can't get a list of all the bullets or monsters currently in the scene.

- -

To use Chipmunk, you should treat it as a component. When you add a game object to your game scene, add it's physics objects to the Chipmunk space you created for that scene. As you will see in this tutorial, the ChipmunkObject protocol is easy to implement, but makes it trivial to add and remove entire game objects from a Chipmunk space with a single method call. When you want to render a sprite, you can get read it's position and rotation from the Chipmunk object it is linked to. This is sort of an MVC approach applied to games, and it works quite well.

- -

A lot of people do this the other way around. They loop over all the collision shapes in Chipmunk and update the sprite that it is associated with. While this works, it's not very flexible. It means that each collision shape has exactly one sprite associated with it and vice versa. Furthermore, the API to iterate the shapes in a Chipmunk space is not part of the public documented API so I wouldn't recommend using it.

- -

The goal is to make a box that we can move around the screen by tilting the iPhone or tapping on the box. Going a bit further, we'll also use collision callbacks to change the screen color and play impact sounds. There are basically 2 classes: ViewContoller which we are using like a game controller, and FallingButton which we are using like a game object controller.

- -

ViewController.m - A Bare Bones Game Controller

- -

A game controller is responsible for for a couple of things. A game controller's main responsibility is to control the game's logic, to decide when the player wins or loses, that sort of thing. Our simple example doesn't really have any rules, so we'll skip straight to it's other responsibilities: managing the game loop and handling adding and removing game objects.

- -

Initialization and Setup:

- -

We're building our game controller as a UIViewController, so let's take a look at the viewDidLoad method where the initialization happens. We'll go through it line by line.

- -

First we need to initialize the graphics and the physics. Because we are writing this as a view controller, we can just use the view for graphics. All we need to do to set that up is call the viewDidLoad method in the super class:

- -
  [super viewDidLoad];
-
- -

Now we can add subviews to self.view and they will simply show up on the screen. That was easy.

- -

Initializing the physics is just as easy:

- -
  space = [[ChipmunkSpace alloc] init];
-
- -

The space is completely empty at this point. Anything other physics objects we add can simply fly off the screen if they wanted to. The first thing that a lot of 2D physics games do is to create a box around the screen. Objective-Chipmunk actually has a nice convenience method for that.

- -
  [space addBounds:self.view.bounds
-    thickness:10.0f
-    elasticity:1.0f friction:1.0f
-    layers:CP_ALL_LAYERS group:CP_NO_GROUP
-    collisionType:borderType
-  ];
-
- -

thickness controls how thick the border is, layers and group control filtering of collisions. See the documentation on collision shapes for more information. Lastly, borderType is an object that we use as a key when defining collision callbacks. This lets you create a collision callback that is only called when a bullet hits a monster for example. The collision type can be any object. Class objects and global NSString objects work well as collision types as they are easy to get to. In this case, borderType was simply a global NSString that I defined at the top of the file.

- -

Next we'll set up a collision callback to respond to collision events when the box touches the screen border.

- -
  [space addCollisionHandler:self
-    typeA:[FallingButton class] typeB:borderType
-    begin:@selector(beginCollision:space:)
-    preSolve:nil
-    postSolve:@selector(postSolveCollision:space:)
-    separate:@selector(separateCollision:space:)
-  ];
-
- -

There are 4 collision events that are sent to a collision handler. You only have to implement the ones that you are interested in. In this case, we want to know when shapes shapes start touching, when Chipmunk has resolved the collision, and when they stop touching. You can find out more from thecallback documentation. Also, the methods are only called when two shapes tagged with [FallingButton class] and borderType collide.

- -

Lastly, we'll create the falling button game object and add it's view to the scene and add it's physics objects to the Chipmunk space.

- -
  fallingButton = [[FallingButton alloc] init];
-  [self.view addSubview:fallingButton.button];
-  [space add:fallingButton];
-
- -

Because FallingButton implements the ChipmunkObject protocol, we can add (or remove) all of it's rigid bodies, collision shapes and joints to the space in a single method call no matter how complex it's physics are.

- -

That's it for the game controller initialization. Let's look at all the code together.

- -
static NSString *borderType = @"borderType";
-
-- (void)viewDidLoad {
-  [super viewDidLoad];
-  
-  space = [[ChipmunkSpace alloc] init];
-  [space addBounds:self.view.bounds
-    thickness:10.0f
-    elasticity:1.0f friction:1.0f
-    layers:CP_ALL_LAYERS group:CP_NO_GROUP
-    collisionType:borderType
-  ];
-  
-  [space addCollisionHandler:self
-    typeA:[FallingButton class] typeB:borderType
-    begin:@selector(beginCollision:space:)
-    preSolve:nil
-    postSolve:@selector(postSolveCollision:space:)
-    separate:@selector(separateCollision:space:)
-  ];
-  
-  fallingButton = [[FallingButton alloc] init];
-  [self.view addSubview:fallingButton.button];
-  [space add:fallingButton];
-}
-
- -

The Game Loop: Updating the Physics and Graphics

- -

So now we get to the meat of what the game controller does. Controlling the game's update loop. This tutorial uses a CADisplayLink to receive events from the iPhone OS when the screen wants to redraw itself. This is the easiest way to get smooth animation that I know of. Let's create a display link callback and an accelerometer callback quick:

- -
- (void)viewDidAppear:(BOOL)animated {
-  displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
-  displayLink.frameInterval = 1;
-  [displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
-  
-  UIAccelerometer *accel = [UIAccelerometer sharedAccelerometer];
-  accel.updateInterval = 1.0f/30.0f;
-  accel.delegate = self;
-}
-
- -

These are Apple's classes, so I won't go into too much detail here.

- -

Next we'll create the update method for the display link to call.

- -
- (void)update {
-  cpFloat dt = displayLink.duration*displayLink.frameInterval;
-  [space step:dt];
-  
-  [fallingButton updatePosition];
-}
-
- -

This simply uses the timing information from the display link to figure out the amount of time passed since the last time the method was called (dt). We can then step (update) the physics simulation using that time. After the simulation has been updated, we update the falling button object so it's view lines up with the physics.

- -

One thing to note here is that Chipmunk prefers it when you use the same dt each time you step the simulation. It's not required, but it will allow you to reduce the CPU usage significantly as well as making your game deterministic.

- -

Next we'll define the accelerometer callback so that we can update gravity to respect the tilt of the iPhone.

- -
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)accel {
-  space.gravity = cpvmult(cpv(accel.x, -accel.y), 100.0f);
-}
-
- -

Pretty easy. One thing to note is that all of the cpv*() functions are operators for Chipmunk vectors. cpv() creates a new vector from an x and y value, and cpvmult() multiplies a vector by a length. Seeing vector math done this way might take some getting used to. See the cpVect C docs for more information. If you are using Objective-C++ you can easily define overloaded operators for Chipmunk.

- -

Collision Callbacks: begin

- -

Different collision callback types have slightly different method signatures. The begin callback method should look something like this:

- -
- (bool)beginCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space
- -

The first argument is a pointer to a C cpArbiter struct. The word arbiter means a judge that resolves a dispute. Because collision callbacks are trigger so often, I chose not to create a temporary Objective-C object to wrap the arbiter. Fortunately, there are only a few things you need to interact with cpArbiter structs for. For more information on arbiters, see the cpArbiter C docs.

- - -

The second argument is the ChipmunkSpace object that the callback was registered on. That way you can do things like register post-step (different than a post-solve callback) callbacks that add or remove objects from the space.

- -

The first thing you probably want to do in a collision callback is probably to find out which two shapes collided. If you remember from earlier, we define our collision handler to be called when shapes with two specific collision types collided. So how do you figure out which object is which? Objective-Chipmunk provides a handy macro to define the ChipmunkShape variables as well as initialize them for you.

- -
  CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border);
-
- -

That macro is equivalent to doing something like this:

- -
  ChipmunkShape *buttonShape = GetShapeWithTypeA(arbiter);
-  ChipmunkShape *border = GetShapeWithTypeB(arbiter);
-
- -

Where type A and type B are the same as the types you gave to the space when you defined the collision handler.

- -

A common thing that games need to know is when an object is touching the ground. Using Chipmunk's collision events, we can easily track this using a counter. Increment the counter in your begin callbacks, and decrement it in the separate callbacks. If the counter is 0, then you know the shape isn't touching anything. Let's do that here.

- -

We have a problem though. The collision callback only gave us the colliding shape and not the game object it's for! Fortunately, Chipmunk provides data pointers on it's objects so that you can always get a reference to your game object from a rigid body, shape or joint. The data pointer is set by the FallingButton class when we create it. You'll see more about this later.

- -
  FallingButton *fb = buttonShape.data;
-
- -

So now we can use that to increment the counter on our falling button.

- -
  fb.touchedShapes++;
-
- -

Lastly, lets set the background color to gray when the falling button is touching anything so we can see it.

- -
  self.view.backgroundColor = [UIColor grayColor];
-
- -

Lastly, the begin callback must return a boolean. If it returns TRUE, then Chipmunk processes the collision normally. If it returns FALSE then Chipmunk ignores the collision as if it never happened. This is a powerful way to implement all sorts of conditional collision filtering such as one way platforms or breakable objects. We just want to process the collision normally, so we'll just return TRUE. Putting this all together, we have our finished begin callback method:

- -
- (bool)beginCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space {
-  CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border);
-
-  FallingButton *fb = buttonShape.data;
-  fb.touchedShapes++;
-  
-  self.view.backgroundColor = [UIColor grayColor];
-  
-  return TRUE;
-}
-
- -

Collision Callbacks: separate

- -

The separate callback has a slightly different method signature from the begin callback. Because the collision is already done by the time the separate callback is called, it doesn't return a boolean that controls whether to ignore the collision.

- -
- (void)separateCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space
-
- -

First we'll decrement the counter. This should all look familiar.

- -
  CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border);
-  
-  FallingButton *fb = buttonShape.data;
-  fb.touchedShapes--;
-
- -

Now let's set the background color to a random color so you can see each time the box collides with the border. We only want to do this when the box is no longer touching any of the 4 border edges, so we check if the counter is 0 first.

- -
  if(fb.touchedShapes == 0){
-    self.view.backgroundColor = [UIColor colorWithRed:frand() green:frand() blue:frand() alpha:1.0f];
-  }
-
- -

Putting this all together we have the finished separate callback:

- -
- (void)separateCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space {
-  CHIPMUNK_ARBITER_GET_SHAPES(arbiter, buttonShape, border);
-  
-  FallingButton *fb = buttonShape.data;
-  fb.touchedShapes--;
-  
-  if(fb.touchedShapes == 0){
-    self.view.backgroundColor = [UIColor colorWithRed:frand() green:frand() blue:frand() alpha:1.0f];
-  }
-}
-
- -

Collision Callbacks: post-solve

- -

Another pretty common thing to do with callbacks is to play impact sounds. To make it sound good, we want to set the volume of the sound based on how hard the objects hit. This is exactly the sort of thing that the post-solve callback is for. Chipmunk has finished resolving a collision, and it gives you chance to read back the impulse it applied to do it.

- -

The post-solve callback method signature looks like the separate one:

- -
- (void)postSolveCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space
-
- -

Unlike the begin and separate callbacks which just happen on the first and last frames of a collision, the pre-solve and post-solve callbacks are called every frame that the two shapes are touching. For playing a collision sound, we really only care about the first frame. Chipmunk provides a C function that you can use on the arbiter to test if this is the first frame that to shapes have been colliding. We'll use that to exit early from the function if it's not the first frame.

- -
  if(!cpArbiterIsFirstContact(arbiter)) return;
-
- -

With that out of the way, now we just need to find out how hard the objects hit and play a sound based off of that.

- -
  cpFloat impulse = cpvlength(cpArbiterTotalImpulse(arbiter));
-  
-  float volume = MIN(impulse/500.0f, 1.0f);
-  if(volume > 0.05f){
-    [SimpleSound playSoundWithVolume:volume];
-  }
-
- -

cpArbiterTotalImpulse() returns a vector. We only really care about the size of the force, so we use cpvlength() to get the length of the vector. From that we calculate a volume, clamp it so that it's no bigger than 1.0 and play the sound if it's loud enough! Easy!

- -

Putting that all together, we have our completed post-solve callback:

- -
- (void)postSolveCollision:(cpArbiter*)arbiter space:(ChipmunkSpace*)space {
-  if(!cpArbiterIsFirstContact(arbiter)) return;
-  
-  cpFloat impulse = cpvlength(cpArbiterTotalImpulse(arbiter));
-  
-  float volume = MIN(impulse/500.0f, 1.0f);
-  if(volume > 0.05f){
-    [SimpleSound playSoundWithVolume:volume];
-  }
-}
-
- -

That's pretty much it for the game controller.

- -

Falling Button: A Simple Game Object Controller

- -

Like a game controller, the game object controller's main responsibility is to manage the logic updates for a game object and bind the graphics and physics together. In this tutorial, the logic of the falling button is simple. All we want it to do is to move in a random direction when you click on it.

- -

Initialization and Setup:

- -

Lets start with the initialization again to get a feel for what the game object is made of. It starts off with initializing a UIButton instance. Pretty standard Cocoa programming here:

- -
    button = [UIButton buttonWithType:UIButtonTypeCustom];
-    [button setTitle:@"Click Me!" forState:UIControlStateNormal];
-    [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
-    [button setBackgroundImage:[UIImage imageNamed:@"logo.png"] forState:UIControlStateNormal];
-    button.bounds = CGRectMake(0, 0, SIZE, SIZE);
-    
-    [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchDown];
-
- -

Pretty easy. Now we set up the physics for it. Lets start by defining the mass and moment of inertia of the button. Wait! What is this moment of inertia that I'm talking about you ask? It sounds completely made up you say! If you think of the mass of an object as being how hard it is to move an object around, the moment of inertia is how hard it is to spin an object.

- -
    cpFloat mass = 1.0f;
-    cpFloat moment = cpMomentForBox(mass, SIZE, SIZE);
-
- -

You can easily just make up numbers for the mass as you don't need to use any particular units. Just make sure that they make sense in relation to each other. If a car has a mass of 1, then a dog should have a mass of 0.01 or something like that. With the button being the only thing on the screen, it doesn't really matter what mass we give it. It would react exactly the same. On the other hand, guessing or making up numbers for the moment of inertia is a really bad idea. Assuming that SIZE is 100, then the moment of inertia calculated above will be 850!

- -

Just for the fun of it, you should try seeing what other values for the moment of inertia does, and why it's important to use the moment estimation functions that Chipmunk provides. You can find more of these estimation functions in the cpBody C docs.

- -

Next, we'll use the calculated mass and moment of inertia to make a rigid body:

- -
    body = [[ChipmunkBody alloc] initWithMass:mass andMoment:moment];
-
- -

Rigid bodies hold the physical properties of a physics object. Things like it's mass, position, velocity and rotation. Once you've created a rigid body, you can attach any number of collision shapes and joints to it. Bodies have a number of properties that you can read and write such as pos, vel, mass and so on. When first created, most of these properties other than the mass and moment of inertia will be zero. Let's set the position of the shape to be somewhere in the middle of the screen.

- -
    body.pos = cpv(200.0f, 200.0f);
-
- -

Now we can get to the interesting part and create a collision shape for it so it will collide with the screen boundary shapes. Chipmunk supports 3 collision shapes at the moment. Circrles, line segments, and polygons. It also has a convenience constructor for creating box shaped polygons. We'll use that. Because we aren't storing the object in an instance variable, we'll use the autorelease constructor. (More on this later.)

- -
    ChipmunkShape *shape = [ChipmunkPolyShape boxWithBody:body width:SIZE height:SIZE];
-
- -

This creates a square of SIZE and attaches it to our rigid body. The box convenience constructor simply centers the box on the center of gravity of the rigid body which is always at body.pos. The center of gravity is also the point that the rigid body rotates around.

- -

Like ChipmunkBody objects, ChipmunkShape objects have a number of properties that you might want to set:

- -
    shape.elasticity = 0.3f;
-    shape.friction = 0.3f;
-
- -

Elasticity controls how bouncy a body is. When two shapes collide, their elasticity values are multiplied together to get the elasticity of the collision. 0 means no bounce, and 1 would make something bounce perfectly. While you can go above 1.0, it means that the object will speed up every time it hits something and will probably fly out of control. Friction works the same way, by multiplying the friction values of the two shapes to determine the final friction to apply. You can think of the friction value as being in terms of surface slopes. If the friction value is 1 then the objects will be able to stop on a 45 degree slope. If the friction value was 0.5, then the objects would be able to stop on a slope of Atan(0.5) = 26.6 degrees

- -

Next we'll set up the properties used in collision callbacks:

- -
    shape.collisionType = [FallingButton class];
-    shape.data = self;
-
- -

If you remember from earlier, collisionType is used as a key value when setting up collision handler callbacks and the data property was how we got a reference back to our falling button object.

- -

Lastly, we need to implement the ChipmunkObject protocol so that we don't have to add the collision shape and rigid body to the space by hand. To do that, all we need to do is implement a single method chipmunkObjects which returns an NSSet that contains all the basic Chipmunk objects this game object uses. The easiest way to do that is to use a synthesized property. Then all you have to do is create an instance variable named chipmunkObjects and use the ChipmunkObjectFlatten() function to initialize it. You can pass anything that implements the ChipmunkObject protocol to ChipmunkObjectFlatten(). Just don't forget about the nil terminator and don't forget to retain the set it returns!

- -
    chipmunkObjects = [ChipmunkObjectFlatten(body, shape, nil) retain];
-
- -

- -

Putting this all together, our initialization method looks like this:

- -
- (id)init {
-  if(self = [super init]){
-    button = [UIButton buttonWithType:UIButtonTypeCustom];
-    [button setTitle:@"Click Me!" forState:UIControlStateNormal];
-    [button setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
-    [button setBackgroundImage:[UIImage imageNamed:@"logo.png"] forState:UIControlStateNormal];
-    button.bounds = CGRectMake(0, 0, SIZE, SIZE);
-    
-    [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchDown];
-    
-    cpFloat mass = 1.0f;
-    cpFloat moment = cpMomentForBox(mass, SIZE, SIZE);
-    
-    body = [[ChipmunkBody alloc] initWithMass:mass andMoment:moment];
-    body.pos = cpv(200.0f, 200.0f);
-    
-    ChipmunkShape *shape = [ChipmunkPolyShape boxWithBody:body width:SIZE height:SIZE];
-    shape.elasticity = 0.3f;
-    shape.friction = 0.3f;
-    shape.collisionType = [FallingButton class];
-    shape.data = self;
-    
-    chipmunkObjects = [ChipmunkObjectFlatten(body, shape, nil) retain];
-  }
-  
-  return self;
-}
-
- -

Button Action:

- -The only thing remaining is to make the method that gets called when the button is clicked. - -
static cpFloat frand_unit(){return 2.0f*((cpFloat)rand()/(cpFloat)RAND_MAX) - 1.0f;}
-
-- (void)buttonClicked {
-  cpVect v = cpvmult(cpv(frand_unit(), frand_unit()), 300.0f);
-  body.vel = cpvadd(body.vel, v);
-  
-  body.angVel += 5.0f*frand_unit();
-}
-
- -

Nothing too complicated there. We just add a random change to the body's velocity and another random change to it's angular velocity.

- -

Closing Thoughts:

- -

Now that you've seen how easy and powerful Objective-Chipmunk can be, why not integrate it into your iPhone game? The Objective-C API will save you time (and money) by providing you a high level API that works well with popular iPhone libraries such as Cocos2D. You'll also spend less time worrying about memory management as it allows you to manage your Chipmunk memory just like the rest of your iPhone app.

- -

Happy Chipmunking!

- - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/stylesheet.css b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/stylesheet.css deleted file mode 100644 index 54ffe494b2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/SimpleObjectiveChipmunk/tutorial/stylesheet.css +++ /dev/null @@ -1,23 +0,0 @@ -h1, h2 { padding: 3px; } -h1 { background-color: #DB944D;} -h2 { background-color: lightGrey;} -p { margin-left: 1em; } -p.expl { margin-left: 2em; } -code { color: #191970 } - -pre { - background-color: #F0F0F0; - padding: 3px; - margin-left: 1em; -} - -table { - border: 2px solid black; - border-collapse: collapse; - margin-left: 1em; -} - -table td, th { - border: 1px black solid; - padding: 5px; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.h deleted file mode 100644 index db8a67bce2..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "ObjectiveChipmunk.h" - -@interface Accelerometer : NSObject - -+ (void)installWithInterval:(NSTimeInterval)interval andAlpha:(float)alpha; -+ (cpVect)getAcceleration; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.m deleted file mode 100644 index eebe755d6c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/Accelerometer.m +++ /dev/null @@ -1,44 +0,0 @@ -#import "Accelerometer.h" - -@implementation Accelerometer - -static Accelerometer *shared_instance = nil; -static float alpha = 1.0f; -static float x = 0.0f; -static float y = 0.0f; -static float z = 0.0f; - -+ (void)initialize { - static bool done = FALSE; - if(done) return; - - NSLog(@"Creating shared accelerometer"); - shared_instance = [[self alloc] init]; - - done = TRUE; -} - -+ (void)installWithInterval:(NSTimeInterval)interval andAlpha:(float)alphaValue { - NSLog(@"Installing accelerometer delegate"); - alpha = alphaValue; - - UIAccelerometer *meter = [UIAccelerometer sharedAccelerometer]; - meter.delegate = shared_instance; - meter.updateInterval = interval; -} - -+ (cpVect)getAcceleration { - cpVect v = cpv(x, y); - if(v.x == 0.0f && v.y == 0.0f) - v = cpv(-1, 0); - - return cpv(-v.y, v.x); -} - --(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)accel { - x = x*(1.0f - alpha) + accel.x*alpha; - y = y*(1.0f - alpha) + accel.y*alpha; - z = z*(1.0f - alpha) + accel.z*alpha; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.h deleted file mode 100644 index d25f89f1a0..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.h +++ /dev/null @@ -1,71 +0,0 @@ -#import -#import -#import -#import - -#import "ObjectiveChipmunk.h" - -#define GRABABLE_MASK_BIT (1<<31) -#define NOT_GRABABLE_MASK (~GRABABLE_MASK_BIT) - -@class CADisplayLink; - -@interface ChipmunkDemo : UIView { -@private - cpVect mousePoint; - cpVect mousePoint_last; - ChipmunkBody *mouseBody; - ChipmunkConstraint *mouseJoint; - - EAGLContext *context; - GLuint viewRenderbuffer, viewFramebuffer; - CADisplayLink *timer; - - int refTicks; - double refTime; - -@protected - double timeStep; - ChipmunkSpace *space; -} - -@property BOOL paused; - -- (void)setupSpace; -- (void)update; - -@end - -@interface Sensors : ChipmunkDemo { - id emitter; -} -@end - -@interface Planet : ChipmunkDemo; @end - -@interface PyramidStack : ChipmunkDemo; @end - -@interface Plink : ChipmunkDemo { - NSMutableArray *pentagons; -} -@end - -@interface Bounce : ChipmunkDemo; @end - -@interface Joints : ChipmunkDemo; @end - -@interface PyramidTopple : ChipmunkDemo; @end - -@interface Springies : ChipmunkDemo; @end - -@interface TheoJansen : ChipmunkDemo; @end - -@interface Tumble : ChipmunkDemo { - ChipmunkBody *box; -} -@end - -@interface OneWay : ChipmunkDemo { - id platform; -} -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.m deleted file mode 100644 index 737a9270d3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/ChipmunkDemo.m +++ /dev/null @@ -1,217 +0,0 @@ -#import -#import - -#import "ChipmunkDemo.h" -#import "drawSpace.h" - -#import -double getDoubleTime(void) -{ - mach_timebase_info_data_t base; - mach_timebase_info(&base); - - return (double)mach_absolute_time()*((double)base.numer/(double)base.denom*1.0e-9); -} - -@implementation ChipmunkDemo - -+ (Class)layerClass -{ - return [CAEAGLLayer class]; -} - -- (id)initWithFrame:(CGRect)frame -{ - if(self = [super initWithFrame:frame]){ - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - eaglLayer.contentsScale = [[UIScreen mainScreen] scale]; - - eaglLayer.opaque = YES; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, - kEAGLColorFormatRGB565, kEAGLDrawablePropertyColorFormat, nil - ]; - - context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; - - if(!context || ![EAGLContext setCurrentContext:context]){ - [self release]; - return nil; - } - - mouseBody = [[ChipmunkBody alloc] initStaticBody]; - } - - return self; -} - -- (BOOL)createFramebuffer { - glGenFramebuffersOES(1, &viewFramebuffer); - glGenRenderbuffersOES(1, &viewRenderbuffer); - - glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); - [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer]; - glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer); - - if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { - NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - return NO; - } - - return YES; -} - -- (void)destroyFramebuffer -{ - glDeleteFramebuffersOES(1, &viewFramebuffer); - viewFramebuffer = 0; - - glDeleteRenderbuffersOES(1, &viewRenderbuffer); - viewRenderbuffer = 0; -} - -- (void)setupSpace; {} - -- (void)layoutSubviews { - [self setupSpace]; - - [EAGLContext setCurrentContext:context]; - [self destroyFramebuffer]; - [self createFramebuffer]; - - timer = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)]; - [timer addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; - - refTime = getDoubleTime(); - refTicks = 0; - timeStep = 1.0/60.0; -} - -- (void)update -{ - cpVect newPoint = cpvlerp(mousePoint_last, mousePoint, 0.25); - mouseBody.pos = newPoint; - mouseBody.vel = cpvmult(cpvsub(newPoint, mousePoint_last), 1.0/timeStep); - mousePoint_last = newPoint; - - [space step:timeStep]; -} - -static float hw = 639.0/2.0, hh = 479.0/2.0; - -- (void)draw -{ - GLint width, height; - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &width); - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &height); - glViewport(0, 0, width, height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrthof(-hh, hh, -hw, hw, -1.0f, 1.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glRotatef(-90.0f, 0.0f, 0.0f, 1.0f); - - glClearColor(1.0f, 1.0f, 1.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glEnableClientState(GL_VERTEX_ARRAY); - drawSpace(space.space); -} - -- (void)render:(CADisplayLink *)sender -{ - [EAGLContext setCurrentContext:context]; - glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); - - double curTime = getDoubleTime(); - double overtime = (curTime - refTime) - (refTicks + 10)*timeStep; - if(overtime > 0.0f) - refTime += overtime; - - while((curTime - refTime) > refTicks*timeStep){ - refTicks += 1; - [self update]; - } - - [self draw]; - - [context presentRenderbuffer:GL_RENDERBUFFER_OES]; -} - -static cpVect -mouseToSpace(cpVect pos, CGSize size) -{ - cpVect v = cpvsub(cpvmult(cpv(pos.y/size.height, pos.x/size.width), 2.0f), cpv(1.0f, 1.0f)); - v = cpv(v.x*hw, v.y*hh); -// printf("%s\n", cpvstr(v)); - return v; -} - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -{ - UITouch *touch = [[event touchesForView:self] anyObject]; - cpVect point = mouseToSpace([touch locationInView:self], self.bounds.size); -// NSLog(@"down %s", cpvstr(point)); - - mousePoint = point; - - ChipmunkShape *shape = [space pointQueryFirst:point layers:GRABABLE_MASK_BIT group:nil]; - if(shape){ - ChipmunkBody *body = shape.body; - - mousePoint_last = mousePoint; - mouseBody.pos = mousePoint; - - mouseJoint = [space add:[ChipmunkPivotJoint pivotJointWithBodyA:mouseBody bodyB:body anchr1:cpvzero anchr2:[body world2local:point]]]; - mouseJoint.maxForce = 50000.0f; - mouseJoint.biasCoef = 0.15f; - } -} - -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event -{ - UITouch *touch = [[event touchesForView:self] anyObject]; - mousePoint = mouseToSpace([touch locationInView:self], self.bounds.size); -// NSLog(@"moved %s", cpvstr(mousePoint)); -} - -- (void)removeFromSuperview -{ - [timer invalidate]; - [super removeFromSuperview]; -} - -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event -{ -// UITouch *touch = [[event touchesForView:self] anyObject]; -// CGPoint point = [touch locationInView:self]; -// NSLog(@"up"); - -// [gamestateDelegate touchUp]; - [space remove:mouseJoint]; - mouseJoint = nil; -} - -- (void)dealloc -{ - if([EAGLContext currentContext] == context){ - [EAGLContext setCurrentContext:nil]; - } - - [space release]; - [mouseBody release]; - [mouseJoint release]; - - [context release]; - - [super dealloc]; -} - -- (BOOL)paused {return timer.paused;} -- (void)setPaused:(BOOL)value {timer.paused = value;} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.h deleted file mode 100644 index b26fa0f386..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.h +++ /dev/null @@ -1,30 +0,0 @@ -#import - -@class ChipmunkDemo; - -@interface iPhoneChipmunkDelegate : NSObject { - IBOutlet UIView *view; - IBOutlet UIViewController *viewController; - IBOutlet UIViewController *flipController; - - IBOutlet UIButton *flipButton; - IBOutlet UIButton *nextButton; - IBOutlet UIButton *prevButton; - IBOutlet UILabel *label; - - ChipmunkDemo *demo; - - int demoIndex; - - BOOL flip; -} - -- (IBAction)nextDemo:(id)sender; -- (IBAction)prevDemo:(id)sender; -- (IBAction)resetDemo:(id)sender; - -- (IBAction)flip:(id)sender; -- (IBAction)showInfoPage:(id)sender; - -@end - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.m deleted file mode 100644 index 203175ad5f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Classes/iPhoneChipmunk.m +++ /dev/null @@ -1,108 +0,0 @@ -#import "iPhoneChipmunk.h" - -#import "Accelerometer.h" -#import "ChipmunkDemo.h" - -@implementation iPhoneChipmunkDelegate - -static NSArray *demos; - -+ (void)initialize -{ - static BOOL done = FALSE; - if(done) return; - - demos = [[NSArray alloc] initWithObjects: - [OneWay class], - [Tumble class], - [TheoJansen class], - [Springies class], -// [PyramidTopple class], - [Joints class], - [Bounce class], - [PyramidStack class], - [Plink class], - [Planet class], - [Sensors class], - nil - ]; - - done = TRUE; -} - -- (void)setDemo -{ - [demo removeFromSuperview]; - [demo release]; - - Class klass = [demos objectAtIndex:demoIndex]; - label.text = [klass description]; - demo = [[klass alloc] initWithFrame:view.bounds]; - [view addSubview:demo]; -} - -static int -modulo(int n, int m) -{ - int mod = n%m; - return (mod < 0 ? mod + m : mod); -} - -- (IBAction)nextDemo:(id)sender; -{ - if(flip) return; - demoIndex = modulo(demoIndex + 1, [demos count]); - [self setDemo]; -} - -- (IBAction)prevDemo:(id)sender; -{ - if(flip) return; - demoIndex = modulo(demoIndex - 1, [demos count]); - [self setDemo]; -} - -- (IBAction)resetDemo:(id)sender; -{ - [self setDemo]; -} - -- (IBAction)flip:(id)sender; -{ - if(flip){ - demo.paused = TRUE; - [flipController dismissModalViewControllerAnimated:YES]; - viewController.view.frame = flipController.view.frame; - } else { - flipController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; - [viewController presentModalViewController:flipController animated:YES]; - flipController.view.frame = view.frame; - [self setDemo]; - } - - flip = !flip; -} - -- (IBAction)showInfoPage:(id)sender; -{ - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://code.google.com/p/chipmunk-physics/"]]; -} - -- (void)applicationDidFinishLaunching:(UIApplication *)application { - [Accelerometer installWithInterval:1.0f/60.0f andAlpha:0.1f]; - - flipButton.transform = CGAffineTransformMakeRotation(M_PI_2); - nextButton.transform = CGAffineTransformMake(0.0, 1.0, -1.0, 0.0, 0.0, 0.0); - prevButton.transform = CGAffineTransformMake(0.0, -1.0, -1.0, 0.0, 0.0, 0.0); - label.transform = CGAffineTransformMakeRotation(M_PI_2); - - [self setDemo]; -} - -- (void)dealloc { - [view release]; - - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Default.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Default.png deleted file mode 100644 index cdb12529c5..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Default.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Bounce.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Bounce.m deleted file mode 100644 index cc1b691e90..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Bounce.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation Bounce - -static cpFloat frand(void){return (cpFloat)rand()/(cpFloat)RAND_MAX;} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - - [space addBounds:CGRectMake(-320.0, -240.0, 640.0, 480.0) thickness:10.0 elasticity:1.0 friction:0.0 layers:NOT_GRABABLE_MASK group:nil collisionType:nil]; - - for(int i=0; i<50; i++){ - const cpFloat size = 20.0f; - const cpFloat mass = 1.0f; - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForBox(mass, size, size)]]; - body.pos = cpv(frand()*(640 - 2*size) - (320 - size), frand()*(480 - 2*size) - (240 - size)); - body.vel = cpvmult(cpv(2*frand() - 1, 2*frand() - 1), 200); - - ChipmunkShape *shape = [space add:[ChipmunkPolyShape boxWithBody:body width:size height:size]]; - shape.elasticity = 1.0f; shape.friction = 0.0f; - } - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:100.0 andMoment:10000.0]]; - - ChipmunkShape *shape = [space add:[ChipmunkSegmentShape segmentWithBody:body from:cpv(-75.0, 0.0) to:cpv(75.0, 0.0) radius:5.0]]; - shape.elasticity = 1.0; shape.friction = 0.0; - - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body bodyB:[ChipmunkBody staticBody] pivot:cpvzero]]; -} - -@end \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Joints.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Joints.m deleted file mode 100644 index 945cfb4f7e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Joints.m +++ /dev/null @@ -1,240 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -static const NSString *car = @"car"; - -@implementation Joints - -static cpFloat frand(void){return (cpFloat)rand()/(cpFloat)RAND_MAX;} - -- (ChipmunkBody *)addBall:(cpVect)pos offset:(cpVect)boxOffset -{ - cpFloat radius = 15.0f; - cpFloat mass = 1.0f; - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForCircle(mass, 0.0, radius, cpvzero)]]; - body.pos = cpvadd(pos, boxOffset); - - ChipmunkShape *shape = [space add:[ChipmunkCircleShape circleWithBody:body radius:radius offset:cpvzero]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; - - return body; -} - -- (ChipmunkBody *)addLever:(cpVect)pos offset:(cpVect)boxOffset -{ - cpFloat mass = 1.0f; - cpVect a = cpv(0, 15); - cpVect b = cpv(0, -15); - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForSegment(mass, a, b)]]; - body.pos = cpvadd(pos, cpvadd(boxOffset, cpv(0, -15))); - - ChipmunkShape *shape = [space add:[ChipmunkSegmentShape segmentWithBody:body from:a to:b radius:10.0]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; - - return body; -} - -- (ChipmunkBody *)addBar:(cpVect)pos offset:(cpVect)boxOffset -{ - cpFloat mass = 2.0f; - cpVect a = cpv(0, 30); - cpVect b = cpv(0, -30); - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForSegment(mass, a, b)]]; - body.pos = cpvadd(pos, boxOffset); - - ChipmunkShape *shape = [space add:[ChipmunkSegmentShape segmentWithBody:body from:a to:b radius:10.0]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; - - return body; -} - -- (ChipmunkBody *)addWheel:(cpVect)pos offset:(cpVect)boxOffset -{ - cpFloat radius = 15.0f; - cpFloat mass = 1.0f; - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForCircle(mass, 0.0, radius, cpvzero)]]; - body.pos = cpvadd(pos, boxOffset); - - ChipmunkShape *shape = [space add:[ChipmunkCircleShape circleWithBody:body radius:radius offset:cpvzero]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; - shape.group = car; // use a group to keep the car parts from colliding - - return body; -} - -- (ChipmunkBody *)addChassis:(cpVect)pos offset:(cpVect)boxOffset -{ - const cpFloat width = 80.0; - const cpFloat height = 30.0; - - cpFloat mass = 5.0f; - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForBox(mass, width, height)]]; - body.pos = cpvadd(pos, boxOffset); - - ChipmunkShape *shape = [space add:[ChipmunkPolyShape boxWithBody:body width:width height:height]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; - shape.group = car; // use a group to keep the car parts from colliding - - return body; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - space.iterations = 10; - space.gravity = cpv(0, -100); - - ChipmunkBody *staticBody = space.staticBody; - ChipmunkShape *shape; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,240) to:cpv(320,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,120) to:cpv(320,120) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,0) to:cpv(320,0) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,-120) to:cpv(320,-120) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,-240) to:cpv(320,-240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-320,-240) to:cpv(-320,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(-160,-240) to:cpv(-160,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(0,-240) to:cpv(0,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(160,-240) to:cpv(160,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - shape = [space add:[ChipmunkStaticSegmentShape segmentWithBody:staticBody from:cpv(320,-240) to:cpv(320,240) radius:0.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - - - cpVect boxOffset; - ChipmunkBody *body1, *body2; - - cpVect posA = cpv( 50, 60); - cpVect posB = cpv(110, 60); - - #define POS_A cpvadd(boxOffset, posA) - #define POS_B cpvadd(boxOffset, posB) - - // Pin Joints - Link shapes with a solid bar or pin. - // Keeps the anchor points the same distance apart from when the joint was created. - boxOffset = cpv(-320, -240); - body1 = [self addBall:posA offset:boxOffset]; - body2 = [self addBall:posB offset:boxOffset]; - [space add:[ChipmunkPinJoint pinJointWithBodyA:body1 bodyB:body2 anchr1:cpv(15.0, 0.0) anchr2:cpv(-15.0, 0.0)]]; - -// // Slide Joints - Like pin joints but with a min/max distance. -// // Can be used for a cheap approximation of a rope. - boxOffset = cpv(-160, -240); - body1 = [self addBall:posA offset:boxOffset]; - body2 = [self addBall:posB offset:boxOffset]; - [space add:[ChipmunkSlideJoint slideJointWithBodyA:body1 bodyB:body2 anchr1:cpv(15,0) anchr2:cpv(-15,0) min:20.0 max:40.0]]; - - // Pivot Joints - Holds the two anchor points together. Like a swivel. - boxOffset = cpv(0, -240); - body1 = [self addBall:posA offset:boxOffset]; - body2 = [self addBall:posB offset:boxOffset]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:body2 pivot:cpvadd(boxOffset, cpv(80,60))]]; - // cpPivotJointNew() takes it's anchor parameter in world coordinates. The anchors are calculated from that - // cpPivotJointNew2() lets you specify the two anchor points explicitly - - // Groove Joints - Like a pivot joint, but one of the anchors is a line segment that the pivot can slide in - boxOffset = cpv(160, -240); - body1 = [self addBall:posA offset:boxOffset]; - body2 = [self addBall:posB offset:boxOffset]; - [space add:[ChipmunkGrooveJoint grooveJointWithBodyA:body1 bodyB:body2 groove_a:cpv(30,30) groove_b:cpv(30,-30) anchr2:cpv(-30,0)]]; - - // Damped Springs - boxOffset = cpv(-320, -120); - body1 = [self addBall:posA offset:boxOffset]; - body2 = [self addBall:posB offset:boxOffset]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:body1 bodyB:body2 anchr1:cpv(15,0) anchr2:cpv(-15,0) restLength:20.0 stiffness:5.0 damping:0.3]]; - - // Damped Rotary Springs - boxOffset = cpv(-160, -120); - body1 = [self addBar:posA offset:boxOffset]; - body2 = [self addBar:posB offset:boxOffset]; - // Add some pin joints to hold the circles in place. - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:staticBody pivot:POS_A]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body2 bodyB:staticBody pivot:POS_B]]; - [space add:[ChipmunkDampedRotarySpring dampedRotarySpringWithBodyA:body1 bodyB:body2 restAngle:0.0 stiffness:3000.0 damping:60.0]]; - - // Rotary Limit Joint - boxOffset = cpv(0, -120); - body1 = [self addLever:posA offset:boxOffset]; - body2 = [self addLever:posB offset:boxOffset]; - // Add some pin joints to hold the circles in place. - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:staticBody pivot:POS_A]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body2 bodyB:staticBody pivot:POS_B]]; - // Hold their rotation within 90 degrees of each other. - [space add:[ChipmunkRotaryLimitJoint rotaryLimitJointWithBodyA:body1 bodyB:body2 min:-M_PI_2 max:M_PI_2]]; - - // Ratchet Joint - A rotary ratchet, like a socket wrench - boxOffset = cpv(160, -120); - body1 = [self addLever:posA offset:boxOffset]; - body2 = [self addLever:posB offset:boxOffset]; - // Add some pin joints to hold the circles in place. - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:staticBody pivot:POS_A]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body2 bodyB:staticBody pivot:POS_B]]; - // Ratchet every 90 degrees - [space add:[ChipmunkRatchetJoint ratchetJointWithBodyA:body1 bodyB:body2 phase:0.0 ratchet:M_PI_2]]; - - // Gear Joint - Maintain a specific angular velocity ratio - boxOffset = cpv(-320, 0); - body1 = [self addBar:posA offset:boxOffset]; - body2 = [self addBar:posB offset:boxOffset]; - // Add some pin joints to hold the circles in place. - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:staticBody pivot:POS_A]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body2 bodyB:staticBody pivot:POS_B]]; - // Force one to sping 2x as fast as the other - [space add:[ChipmunkGearJoint gearJointWithBodyA:body1 bodyB:body2 phase:0.0 ratio:2.0]]; - - // Simple Motor - Maintain a specific angular relative velocity - boxOffset = cpv(-160, 0); - body1 = [self addBar:posA offset:boxOffset]; - body2 = [self addBar:posB offset:boxOffset]; - // Add some pin joints to hold the circles in place. - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body1 bodyB:staticBody pivot:POS_A]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body2 bodyB:staticBody pivot:POS_B]]; - // Make them spin at 1/2 revolution per second in relation to each other. - [space add:[ChipmunkSimpleMotor simpleMotorWithBodyA:body1 bodyB:body2 rate:M_PI]]; - - // Make a car with some nice soft suspension - boxOffset = cpv(0, 0); - ChipmunkBody *wheel1 = [self addWheel:posA offset:boxOffset]; - ChipmunkBody *wheel2 = [self addWheel:posB offset:boxOffset]; - ChipmunkBody *chassis = [self addChassis:cpv(80, 100) offset:boxOffset]; - - [space add:[ChipmunkGrooveJoint grooveJointWithBodyA:chassis bodyB:wheel1 groove_a:cpv(-30, -10) groove_b:cpv(-30, -40) anchr2:cpvzero]]; - [space add:[ChipmunkGrooveJoint grooveJointWithBodyA:chassis bodyB:wheel2 groove_a:cpv( 30, -10) groove_b:cpv( 30, -40) anchr2:cpvzero]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:chassis bodyB:wheel1 anchr1:cpv(-30, 0) anchr2:cpvzero restLength:50.0 stiffness:20.0 damping:1.5]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:chassis bodyB:wheel2 anchr1:cpv( 30, 0) anchr2:cpvzero restLength:50.0 stiffness:20.0 damping:1.5]]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/OneWay.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/OneWay.m deleted file mode 100644 index 7eb2ac6c12..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/OneWay.m +++ /dev/null @@ -1,84 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@interface OneWayPlatform : NSObject { - cpVect n; -} -@end - -@implementation OneWayPlatform - -- (id)initWithNormal:(cpVect)normal -{ - if(self = [super init]){ - n = normal; - } - - return self; -} - -- (BOOL)preSolve:(cpArbiter *)arb space:(ChipmunkSpace *)space -{ - if(cpvdot(cpArbiterGetNormal(arb, 0), n) < 0){ - cpArbiterIgnore(arb); - return 0; - } - - return 1; -} - -@end - - -@implementation OneWay - -- (void)update -{ - space.gravity = cpvmult([Accelerometer getAcceleration], 100); - [super update]; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - - [space addBounds:CGRectMake(-320.0, -240.0, 640.0, 480.0) thickness:10.0 elasticity:1.0 friction:0.0 layers:NOT_GRABABLE_MASK group:nil collisionType:nil]; - - ChipmunkBody *body; - ChipmunkShape *shape; - - cpFloat radius = 15.0f; - body = [space add:[ChipmunkBody bodyWithMass:10.0 andMoment:cpMomentForCircle(10.0, 0.0, radius, cpvzero)]]; - body.pos = cpv(0, -200); - body.vel = cpv(0, 170); - - shape = [space add:[ChipmunkCircleShape circleWithBody:body radius:radius offset:cpvzero]]; - shape.elasticity = 0.0f; shape.friction = 0.9f; - - - platform = [[OneWayPlatform alloc] initWithNormal:cpv(0.0, 1.0)]; - - shape = [space add:[ChipmunkSegmentShape segmentWithBody:space.staticBody from:cpv(-160,-100) to:cpv(160,-100) radius:10.0]]; - shape.elasticity = 1.0f; shape.friction = 1.0f; - shape.layers = NOT_GRABABLE_MASK; - shape.collisionType = [OneWayPlatform class]; // Class objects work great as collision type objects - shape.data = platform; // handler methods will be called on this object - - // Call the handler methods on the platform object connected to the first shape - [space addShapeAHandler:[OneWayPlatform class] - typeA:[OneWayPlatform class] typeB:nil - begin:nil - preSolve:@selector(preSolve:space:) - postSolve:nil - separate:nil - ]; -} - -- (void) dealloc -{ - [platform release]; - [super dealloc]; -} - - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Planet.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Planet.m deleted file mode 100644 index 7f3d0230b5..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Planet.m +++ /dev/null @@ -1,59 +0,0 @@ -#import "ChipmunkDemo.h" - -@implementation Planet - -static cpFloat frand_unit(){return 2.0f*((cpFloat)rand()/(cpFloat)RAND_MAX) - 1.0f;} -static cpFloat frand(void){return (cpFloat)rand()/(cpFloat)RAND_MAX;} - -static void -planetGravityVelocityFunc(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - cpVect p = body->p; - cpVect g = cpvmult(p, -50000.0f/cpvdot(p, p)); - - cpBodyUpdateVelocity(body, g, damping, dt); -} - -static cpVect -rand_pos(cpFloat radius) -{ - cpVect v; - do { - v = cpv(frand()*(640 - 2*radius) - (320 - radius), frand()*(480 - 2*radius) - (240 - radius)); - } while(cpvlength(v) < 100.0f); - - return v; -} - -- (void)addBox -{ - const cpFloat size = 20.0f; - const cpFloat mass = 1.0f; - - cpFloat radius = cpvlength(cpv(size, size)); - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:cpMomentForBox(mass, size, size)]]; - body.body->velocity_func = planetGravityVelocityFunc; - body.pos = rand_pos(radius); - body.vel = cpvmult(cpv(2*frand() - 1, 2*frand() - 1), 200); - - ChipmunkShape *shape = [space add:[ChipmunkPolyShape boxWithBody:body width:size height:size]]; - shape.elasticity = 0.0f; shape.friction = 0.7f; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - - ChipmunkBody *planetBody = [space add:space.staticBody]; - planetBody.angVel = 0.2f; - - for(int i=0; i<30; i++) - [self addBox]; - - ChipmunkShape *shape = [space add:[ChipmunkCircleShape circleWithBody:planetBody radius:70.0 offset:cpvzero]]; - shape.elasticity = 1.0; shape.friction = 1.0; - shape.layers = NOT_GRABABLE_MASK; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Plink.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Plink.m deleted file mode 100644 index e2cdbcae62..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Plink.m +++ /dev/null @@ -1,84 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation Plink - -cpVect pentagon[5]; - -+ (void)initialize -{ - static BOOL done = FALSE; - if(done) return; - - for(int i=0; i<5; i++){ - cpFloat angle = -2*M_PI*i/5.0; - pentagon[i] = cpv(10*cos(angle), 10*sin(angle)); - } - - done = TRUE; -} - -- (void)update -{ - space.gravity = cpvmult([Accelerometer getAcceleration], 100); - - if([pentagons count] < 150){ - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:1.0 andMoment:cpMomentForPoly(1.0, 5, pentagon, cpvzero)]]; - cpFloat x = rand()/(cpFloat)RAND_MAX*640 - 320; - cpFloat y = rand()/(cpFloat)RAND_MAX*300 + 350; - body.pos = cpv(x, y); - [pentagons addObject:body]; - - ChipmunkShape *shape = [space add:[ChipmunkPolyShape polyWithBody:body count:5 verts:pentagon offset:cpvzero]]; - shape.elasticity = 0.0; shape.friction = 0.4; - } - - for(ChipmunkBody *body in pentagons){ - cpVect pos = body.pos; - if(pos.y < -260 || fabsf(pos.x) > 340){ - body.pos = cpv(((cpFloat)rand()/(cpFloat)RAND_MAX)*640.0 - 320.0, 260); - } - } - - [super update]; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - space.iterations = 5; - - [space resizeStaticHashWithDim:40.0 andCount:1000]; - [space resizeStaticHashWithDim:30.0 andCount:3000]; - - ChipmunkBody *staticBody = space.staticBody; - - // Vertexes for a triangle shape. - cpVect verts[] = { - cpv(-15,-15), - cpv( 0, 10), - cpv( 15,-15), - }; - - // Create the static triangles. - for(int i=0; i<9; i++){ - for(int j=0; j<6; j++){ - cpFloat stagger = (j%2)*40; - cpVect offset = cpv(i*80 - 320 + stagger, j*70 - 240); - ChipmunkShape *shape = [space add:[ChipmunkPolyShape polyWithBody:staticBody count:3 verts:verts offset:offset]]; - shape.elasticity = 1.0; shape.friction = 1.0; - shape.layers = NOT_GRABABLE_MASK; - } - } - - pentagons = [[NSMutableArray alloc] init]; -} - -- (void) dealloc -{ - [pentagons release]; - [super dealloc]; -} - - -@end \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidStack.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidStack.m deleted file mode 100644 index f189ccff7b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidStack.m +++ /dev/null @@ -1,45 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation PyramidStack - -- (void)update -{ - space.gravity = cpvmult([Accelerometer getAcceleration], 200); - [super update]; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - [space resizeStaticHashWithDim:40.0 andCount:1000]; - [space resizeActiveHashWithDim:40.0 andCount:1000]; - space.gravity = cpv(0, -100); - - ChipmunkBody *body; - ChipmunkShape *shape; - - [space addBounds:CGRectMake(-320.0, -240.0, 640.0, 1000.0) thickness:20.0 elasticity:1.0 friction:1.0 layers:NOT_GRABABLE_MASK group:nil collisionType:nil]; - - cpFloat boxSize = 40.0; - - // Add lots of boxes. - for(int i=0; i<10; i++){ - for(int j=0; j<=i; j++){ - body = [space add:[ChipmunkBody bodyWithMass:1.0 andMoment:cpMomentForBox(1.0, boxSize, boxSize)]]; - body.pos = cpv(j*42 - i*21, 300 - i*42); - shape = [space add:[ChipmunkPolyShape boxWithBody:body width:boxSize height:boxSize]]; - shape.elasticity = 0.0; shape.friction = 0.8; - } - } - - // Add a ball to make things more interesting - cpFloat radius = 20.0; - body = [space add:[ChipmunkBody bodyWithMass:10.0 andMoment:cpMomentForCircle(10.0, 0.0, radius, cpvzero)]]; - body.pos = cpv(0, -240 + radius); - - shape = [space add:[ChipmunkCircleShape circleWithBody:body radius:radius offset:cpvzero]]; - shape.elasticity = 0.0; shape.friction = 0.9; -} - -@end \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidTopple.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidTopple.m deleted file mode 100644 index 865f2fe80a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/PyramidTopple.m +++ /dev/null @@ -1,46 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation PyramidTopple - -- (void)addDomino:(cpVect)pos angle:(cpFloat)angle -{ - const cpFloat u = 0.8; - const cpFloat width = 6.0; - const cpFloat height = 40.0; - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:1.0 andMoment:cpMomentForBox(1.0, width, height)]]; - body.pos = pos; body.angle = angle; - - ChipmunkShape *shape = [space add:[ChipmunkPolyShape boxWithBody:body width:width height:height]]; - shape.elasticity = 0.0; shape.friction = u; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - space.iterations = 30; - [space resizeActiveHashWithDim:40.0 andCount:3000]; - [space resizeStaticHashWithDim:40.0 andCount:1000]; - space.gravity = cpv(0.0, -300.0); - - [space addBounds:CGRectMake(-320.0, -240.0, 640.0, 480.0) thickness:10.0 elasticity:1.0 friction:0.0 layers:NOT_GRABABLE_MASK group:nil collisionType:nil]; - - int n = 5; - for(int i=1; i<=n; i++){ - cpVect offset = cpv(-i*60/2.0f, (n - i)*52); - - for(int j=0; j 0;} -- (void)dequeue {queue--;} - -@end - - -@implementation Sensors - -static cpFloat frand_unit(){return 2.0f*((cpFloat)rand()/(cpFloat)RAND_MAX) - 1.0f;} - -- (void)update -{ - if([emitter ready]){ - [emitter dequeue]; - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:1.0 andMoment:cpMomentForCircle(1.0, 0.0, 15.0, cpvzero)]]; - body.pos = [emitter position]; - body.vel = cpvmult(cpv(frand_unit(), frand_unit()), 100.0f); - - ChipmunkShape *shape = [space add:[ChipmunkCircleShape circleWithBody:body radius:15.0 offset:cpvzero]]; - shape.collisionType = BALL_TYPE; - } - - [super update]; -} -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - space.iterations = 10; - space.gravity = cpv(0.0, -100.0); - - ChipmunkBody *staticBody = space.staticBody; - - emitter = [[Emitter alloc] initWithCount:5 andPos:cpv(0.0, 150.0)]; - - ChipmunkShape *shape; - - shape = [space add:[ChipmunkCircleShape circleWithBody:staticBody radius:15.0 offset:[emitter position]]]; - shape.sensor = TRUE; - shape.collisionType = BLOCKING_SENSOR_TYPE; - shape.layers = NOT_GRABABLE_MASK; - - // Create our catch sensor to requeue the balls when they reach the bottom of the screen - shape = [space add:[ChipmunkSegmentShape segmentWithBody:staticBody from:cpv(-2000, -200) to:cpv(2000, -200) radius:15.0]]; - shape.sensor = TRUE; - shape.collisionType = CATCH_SENSOR_TYPE; - shape.layers = NOT_GRABABLE_MASK; - - [space addCollisionHandler:emitter - typeA:BLOCKING_SENSOR_TYPE typeB:BALL_TYPE - begin:@selector(blockerBegin:space:) - preSolve:NULL - postSolve:NULL - separate:@selector(blockerSeparate:space:) - ]; - - [space addCollisionHandler:emitter - typeA:CATCH_SENSOR_TYPE typeB:BALL_TYPE - begin:@selector(catcherBarBegin:space:) - preSolve:NULL - postSolve:NULL - separate:NULL - ]; -} - -- (void) dealloc -{ - [emitter release]; - - [super dealloc]; -} - - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Springies.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Springies.m deleted file mode 100644 index afd021075c..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Springies.m +++ /dev/null @@ -1,109 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation Springies - -- (void)update -{ - space.gravity = cpvmult([Accelerometer getAcceleration], 20000.0); - [super update]; -} - -- (ChipmunkBody *)addBar:(cpVect)a to:(cpVect)b group:(int)group -{ - cpVect center = cpvmult(cpvadd(a, b), 1.0f/2.0f); - cpFloat length = cpvlength(cpvsub(b, a)); - cpFloat mass = length/160.0f; - - ChipmunkBody *body = [space add:[ChipmunkBody bodyWithMass:mass andMoment:mass*length*length/12.0]]; - body.pos = center; - - [space add:[ChipmunkSegmentShape segmentWithBody:body from:cpvsub(a, center) to:cpvsub(b, center) radius:10.0]]; - - return body; -} - -- (void)setupSpace -{ - space = [[ChipmunkSpace alloc] init]; - [space resizeActiveHashWithDim:30.0 andCount:1000]; - [space resizeActiveHashWithDim:200.0 andCount:100]; - - ChipmunkBody *staticBody = space.staticBody; - - ChipmunkBody *body1 = [self addBar:cpv(-240, 160) to:cpv(-160, 80) group:1]; - ChipmunkBody *body2 = [self addBar:cpv(-160, 80) to:cpv( -80, 160) group:1]; - ChipmunkBody *body3 = [self addBar:cpv( 0, 160) to:cpv( 80, 0) group:0]; - ChipmunkBody *body4 = [self addBar:cpv( 160, 160) to:cpv( 240, 160) group:0]; - ChipmunkBody *body5 = [self addBar:cpv(-240, 0) to:cpv(-160, -80) group:2]; - ChipmunkBody *body6 = [self addBar:cpv(-160, -80) to:cpv( -80, 0) group:2]; - ChipmunkBody *body7 = [self addBar:cpv( -80, 0) to:cpv( 0, 0) group:2]; - ChipmunkBody *body8 = [self addBar:cpv( 0, -80) to:cpv( 80, -80) group:0]; - ChipmunkBody *body9 = [self addBar:cpv( 240, 80) to:cpv( 160, 0) group:3]; - ChipmunkBody *body10 = [self addBar:cpv( 160, 0) to:cpv( 240, -80) group:3]; - ChipmunkBody *body11 = [self addBar:cpv(-240, -80) to:cpv(-160, -160) group:4]; - ChipmunkBody *body12 = [self addBar:cpv(-160, -160) to:cpv( -80, -160) group:0]; - ChipmunkBody *body13 = [self addBar:cpv( 0, -160) to:cpv( 80, -160) group:0]; - ChipmunkBody *body14 = [self addBar:cpv( 160, -160) to:cpv( 240, -160) group:0]; - - [space add:[ChipmunkPivotJoint pivotJointWithBodyA: body1 bodyB: body2 anchr1:cpv( 40,-40) anchr2:cpv(-40,-40)]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA: body5 bodyB: body6 anchr1:cpv( 40,-40) anchr2:cpv(-40,-40)]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA: body6 bodyB: body7 anchr1:cpv( 40, 40) anchr2:cpv(-40, 0)]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA: body9 bodyB:body10 anchr1:cpv(-40,-40) anchr2:cpv(-40, 40)]]; - [space add:[ChipmunkPivotJoint pivotJointWithBodyA:body11 bodyB:body12 anchr1:cpv( 40,-40) anchr2:cpv(-40, 0)]]; - - cpFloat stiff = 100.0f; - cpFloat damp = 0.5f; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body1 anchr1:cpv(-320, 240) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body1 anchr1:cpv(-320, 80) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body1 anchr1:cpv(-160, 240) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body2 anchr1:cpv(-160, 240) anchr2:cpv( 40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body2 anchr1:cpv( 0, 240) anchr2:cpv( 40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body3 anchr1:cpv( 80, 240) anchr2:cpv(-40, 80) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body4 anchr1:cpv( 80, 240) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body4 anchr1:cpv( 320, 240) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body5 anchr1:cpv(-320, 80) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB: body9 anchr1:cpv( 320, 80) anchr2:cpv( 40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body10 anchr1:cpv( 320, 0) anchr2:cpv( 40,-40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body10 anchr1:cpv( 320,-160) anchr2:cpv( 40,-40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body11 anchr1:cpv(-320,-160) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body12 anchr1:cpv(-240,-240) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body12 anchr1:cpv( 0,-240) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body13 anchr1:cpv( 0,-240) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body13 anchr1:cpv( 80,-240) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body14 anchr1:cpv( 80,-240) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body14 anchr1:cpv( 240,-240) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:staticBody bodyB:body14 anchr1:cpv( 320,-160) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body1 bodyB: body5 anchr1:cpv( 40,-40) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body1 bodyB: body6 anchr1:cpv( 40,-40) anchr2:cpv( 40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body2 bodyB: body3 anchr1:cpv( 40, 40) anchr2:cpv(-40, 80) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body4 anchr1:cpv(-40, 80) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body4 anchr1:cpv( 40,-80) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body7 anchr1:cpv( 40,-80) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body7 anchr1:cpv(-40, 80) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body8 anchr1:cpv( 40,-80) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body3 bodyB: body9 anchr1:cpv( 40,-80) anchr2:cpv(-40,-40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body4 bodyB: body9 anchr1:cpv( 40, 0) anchr2:cpv( 40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body5 bodyB:body11 anchr1:cpv(-40, 40) anchr2:cpv(-40, 40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body5 bodyB:body11 anchr1:cpv( 40,-40) anchr2:cpv( 40,-40) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body7 bodyB: body8 anchr1:cpv( 40, 0) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body8 bodyB:body12 anchr1:cpv(-40, 0) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body8 bodyB:body13 anchr1:cpv(-40, 0) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body8 bodyB:body13 anchr1:cpv( 40, 0) anchr2:cpv( 40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA: body8 bodyB:body14 anchr1:cpv( 40, 0) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:body10 bodyB:body14 anchr1:cpv( 40,-40) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; - [space add:[ChipmunkDampedSpring dampedSpringWithBodyA:body10 bodyB:body14 anchr1:cpv( 40,-40) anchr2:cpv(-40, 0) restLength:0.0 stiffness:stiff damping:damp]]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Tank.c b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Tank.c deleted file mode 100644 index bcbb5cd185..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/Tank.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "chipmunk.h" -#include "drawSpace.h" -#include "ChipmunkDemo.h" - -extern cpVect mousePoint; - -cpSpace *space; -cpBody *staticBody; - -cpBody *tankBody, *tankControlBody; - -static void -update(int ticks) -{ - int steps = 1; - cpFloat dt = 1.0f/60.0f/(cpFloat)steps; - - for(int i=0; ip); - cpFloat turn = cpvtoangle(cpvunrotate(tankBody->rot, mouseDelta)); - cpBodySetAngle(tankControlBody, tankBody->a - turn); - - // drive the tank towards the mouse - if(cpvnear(mousePoint, tankBody->p, 30.0)){ - tankControlBody->v = cpvzero; // stop - } else { - cpFloat direction = (cpvdot(mouseDelta, tankBody->rot) > 0.0 ? 1.0 : -1.0); - tankControlBody->v = cpvrotate(tankBody->rot, cpv(30.0f*direction, 0.0f)); - } - - cpSpaceStep(space, dt); - } -} - -static cpBody * -add_box(cpFloat size, cpFloat mass) -{ - cpVect verts[] = { - cpv(-size,-size), - cpv(-size, size), - cpv( size, size), - cpv( size,-size), - }; - - cpFloat radius = cpvlength(cpv(size, size)); - - cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, 4, verts, cpvzero))); - body->p = cpv(frand()*(640 - 2*radius) - (320 - radius), frand()*(480 - 2*radius) - (240 - radius)); - - cpShape *shape = cpSpaceAddShape(space, cpPolyShapeNew(body, 4, verts, cpvzero)); - shape->e = 0.0f; shape->u = 0.7f; - - return body; -} - -static cpSpace * -init(void) -{ - staticBody = cpBodyNew(INFINITY, INFINITY); - - cpResetShapeIdCounter(); - - space = cpSpaceNew(); - cpSpaceResizeActiveHash(space, 30.0f, 1000); - space->iterations = 10; - - cpShape *shape; - - // Create segments around the edge of the screen. - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(-320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(320,-240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(-320,-240), cpv(320,-240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - shape = cpSpaceAddStaticShape(space, cpSegmentShapeNew(staticBody, cpv(-320,240), cpv(320,240), 0.0f)); - shape->e = 1.0f; shape->u = 1.0f; - shape->layers = NOT_GRABABLE_MASK; - - for(int i=0; i<50; i++){ - cpBody *body = add_box(10.0, 1.0); - - cpConstraint *pivot = cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, body, cpvzero, cpvzero)); - pivot->biasCoef = 0.0f; // disable joint correction - pivot->maxForce = 1000.0f; // emulate linear friction - - cpConstraint *gear = cpSpaceAddConstraint(space, cpGearJointNew(staticBody, body, 0.0f, 1.0f)); - gear->biasCoef = 0.0f; // disable joint correction - gear->maxForce = 5000.0f; // emulate angular friction - } - - // We joint the tank to the control body and control the tank indirectly by modifying the control body. - tankControlBody = cpBodyNew(INFINITY, INFINITY); - tankBody = add_box(15.0, 10.0); - - cpConstraint *pivot = cpSpaceAddConstraint(space, cpPivotJointNew2(tankControlBody, tankBody, cpvzero, cpvzero)); - pivot->biasCoef = 0.0f; // disable joint correction - pivot->maxForce = 10000.0f; // emulate linear friction - - cpConstraint *gear = cpSpaceAddConstraint(space, cpGearJointNew(tankControlBody, tankBody, 0.0f, 1.0f)); - gear->biasCoef = 1.0f; // limit angular correction rate - gear->maxBias = 1.0f; // limit angular correction rate - gear->maxForce = 500000.0f; // emulate angular friction - - return space; -} - -static void -destroy(void) -{ - cpBodyFree(staticBody); - cpBodyFree(tankControlBody); - cpSpaceFreeChildren(space); - cpSpaceFree(space); -} - -const chipmunkDemo Tank = { - "Tank", - NULL, - init, - update, - destroy, -}; diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/TheoJansen.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/TheoJansen.m deleted file mode 100644 index 9ccc43f5e1..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/Demos/TheoJansen.m +++ /dev/null @@ -1,98 +0,0 @@ -#import "ChipmunkDemo.h" -#import "Accelerometer.h" - -@implementation TheoJansen - -static const NSString *group = @"group"; - --(void)update -{ - space.gravity = cpvmult([Accelerometer getAcceleration], 500); - [super update]; -// cpFloat coef = (2.0f + arrowDirection.y)/3.0f; -// cpFloat rate = arrowDirection.x*10.0f*coef; -// cpSimpleMotorSetRate(motor, rate); -// motor->maxForce = (rate) ? 100000.0f : 0.0f; -// -// int steps = 3; -// cpFloat dt = 1.0/60.0/(cpFloat)steps; -// -// for(int i=0; i - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - Icon.png - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UIInterfaceOrientation - UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/MainWindow.xib b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/MainWindow.xib deleted file mode 100644 index b2bba49529..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/MainWindow.xib +++ /dev/null @@ -1,625 +0,0 @@ - - - - 528 - 9L31a - 680 - 949.54 - 353.00 - - YES - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - - - 1316 - - YES - - - 1316 - {320, 480} - - NO - NO - 4 - NO - - NSImage - Default.png - - - - - 1298 - {{32, 48}, {288, 384}} - - - 3 - MAA - - 2 - - - NO - - - - 1298 - {{32, 48}, {288, 384}} - - - 3 - MQA - - - NO - - - - 1316 - {{134, 0}, {55, 40}} - - NO - NO - 0 - 0 - - Helvetica-Bold - 1.500000e+01 - 16 - - - 3 - MQA - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - 3 - MC41AA - - - - - 1316 - {{134, 440}, {55, 40}} - - NO - NO - 0 - 0 - - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - - - 1316 - {{-40, 229}, {114, 22}} - - NO - YES - NO - Title - - 1 - MCAwIDAAA - - - - 3 - MSAwLjE3AA - - - {-1, -1} - 1 - 1.000000e+01 - 1 - - - - 1316 - {{0, 440}, {45, 40}} - - NO - NO - 0 - 0 - - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - - - {320, 480} - - 3 - MC43NQA - - - NO - YES - - - - 274 - - YES - - - 256 - {288, 384} - - NO - YES - 4 - YES - - NSImage - info.png - - - - - 292 - {{6, 229}, {35, 146}} - - NO - NO - 0 - 0 - - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - - {288, 384} - - 3 - MQA - - - NO - - - - 292 - {320, 480} - - 1 - MSAxIDEAA - - NO - NO - - - - - - YES - - - delegate - - - - 4 - - - - view - - - - 41 - - - - nextDemo: - - - 7 - - 44 - - - - nextButton - - - - 46 - - - - prevButton - - - - 47 - - - - label - - - - 49 - - - - prevDemo: - - - 7 - - 50 - - - - flip: - - - 7 - - 69 - - - - view - - - - 74 - - - - viewController - - - - 75 - - - - flipController - - - - 76 - - - - view - - - - 81 - - - - flipButton - - - - 86 - - - - showInfoPage: - - - 7 - - 89 - - - - - YES - - 0 - - YES - - - - - - 2 - - - YES - - - - - - - - - - - - -1 - - - RmlsZSdzIE93bmVyA - - - 3 - - - - - -2 - - - - - 39 - - - Prev - - - 43 - - - Next - - - 48 - - - - - 51 - - - - - 52 - - - YES - - - - - Flip View - - - 70 - - - View Controller - - - 72 - - - Flip Controller - - - 77 - - - - - 8 - - - YES - - - Demo View - - - 82 - - - Back View - - - 87 - - - - - 88 - - - - - 67 - - - Info - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 39.IBPluginDependency - 43.IBPluginDependency - 48.IBPluginDependency - 51.IBPluginDependency - 52.IBEditorWindowLastContentRect - 52.IBPluginDependency - 67.IBPluginDependency - 70.CustomClassName - 70.IBPluginDependency - 72.CustomClassName - 72.IBPluginDependency - 77.IBEditorWindowLastContentRect - 77.IBPluginDependency - 8.IBPluginDependency - 82.IBPluginDependency - 88.IBPluginDependency - - - YES - UIApplication - UIResponder - - YES - - YES - - - YES - - - {{594, 375}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - iPhoneChipmunkDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{601, 393}, {288, 384}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{520, 278}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 89 - - - - YES - - iPhoneChipmunkDelegate - NSObject - - YES - - YES - flip: - nextDemo: - prevDemo: - resetDemo: - showInfoPage: - - - YES - id - id - id - id - id - - - - YES - - YES - flipButton - flipController - label - nextButton - prevButton - view - viewController - - - YES - UIButton - UIViewController - UILabel - UIButton - UIButton - UIView - UIViewController - - - - IBProjectSource - Classes/iPhoneChipmunk.h - - - - - 0 - GLGame.xcodeproj - 3 - 3.1 - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.c b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.c deleted file mode 100644 index 4a20ef1877..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.c +++ /dev/null @@ -1,506 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#ifdef __APPLE__ - #include "OpenGLES/es1/gl.h" -#else -#ifdef WIN32 - #include -#endif - #include - #include - #include - #include -#endif - -#include "chipmunk/chipmunk.h" -#include "drawSpace.h" - -/* - IMPORTANT - READ ME! - - This file sets up a simple interface that the individual demos can use to get - a Chipmunk space running and draw what's in it. In order to keep the Chipmunk - examples clean and simple, they contain no graphics code. All drawing is done - by accessing the Chipmunk structures at a very low level. It is NOT - recommended to write a game or application this way as it does not scale - beyond simple shape drawing and is very dependent on implementation details - about Chipmunk which may change with little to no warning. -*/ - -#define LINE_COLOR 0.0f, 0.0f, 0.0f -#define COLLISION_COLOR 1.0f, 0.0f, 0.0f -#define BODY_COLOR 0.0f, 0.0f, 1.0f - -static void -glColor_from_pointer(void *ptr) -{ - unsigned long val = (long)ptr; - - // hash the pointer up nicely - val = (val+0x7ed55d16) + (val<<12); - val = (val^0xc761c23c) ^ (val>>19); - val = (val+0x165667b1) + (val<<5); - val = (val+0xd3a2646c) ^ (val<<9); - val = (val+0xfd7046c5) + (val<<3); - val = (val^0xb55a4f09) ^ (val>>16); - -// GLfloat v = (GLfloat)val/(GLfloat)ULONG_MAX; -// v = 0.95f - v*0.15f; -// -// glColor3f(v, v, v); - - GLubyte r = (val>>0) & 0xFF; - GLubyte g = (val>>8) & 0xFF; - GLubyte b = (val>>16) & 0xFF; - - GLubyte max = r>g ? (r>b ? r : b) : (g>b ? g : b); - - const int mult = 127; - const int add = 63; - r = (r*mult)/max + add; - g = (g*mult)/max + add; - b = (b*mult)/max + add; - - glColor4ub(r, g, b, ~((GLubyte)0)); -} - -static void -drawPoint(cpVect p) -{ - glVertexPointer(2, GL_FLOAT, 0, &p); - glDrawArrays(GL_POINTS, 0, 1); -} - -static void -drawLine(cpVect a, cpVect b) -{ - cpVect verts[] = {a, b}; - - glVertexPointer(2, GL_FLOAT, 0, &verts); - glDrawArrays(GL_LINES, 0, 2); -} - -static const GLfloat circleVAR[] = { - 0.0000f, 1.0000f, - 0.2588f, 0.9659f, - 0.5000f, 0.8660f, - 0.7071f, 0.7071f, - 0.8660f, 0.5000f, - 0.9659f, 0.2588f, - 1.0000f, 0.0000f, - 0.9659f, -0.2588f, - 0.8660f, -0.5000f, - 0.7071f, -0.7071f, - 0.5000f, -0.8660f, - 0.2588f, -0.9659f, - 0.0000f, -1.0000f, - -0.2588f, -0.9659f, - -0.5000f, -0.8660f, - -0.7071f, -0.7071f, - -0.8660f, -0.5000f, - -0.9659f, -0.2588f, - -1.0000f, -0.0000f, - -0.9659f, 0.2588f, - -0.8660f, 0.5000f, - -0.7071f, 0.7071f, - -0.5000f, 0.8660f, - -0.2588f, 0.9659f, - 0.0000f, 1.0000f, - 0.0f, 0.0f, // For an extra line to see the rotation. -}; -static const int circleVAR_count = sizeof(circleVAR)/sizeof(GLfloat)/2; - -static void -drawCircleShape(cpBody *body, cpCircleShape *circle) -{ - glVertexPointer(2, GL_FLOAT, 0, circleVAR); - - glPushMatrix(); { - cpVect center = circle->tc; - glTranslatef(center.x, center.y, 0.0f); - glRotatef(body->a*180.0f/M_PI, 0.0f, 0.0f, 1.0f); - glScalef(circle->r, circle->r, 1.0f); - - if(!circle->shape.sensor){ - glColor_from_pointer(circle); - glDrawArrays(GL_TRIANGLE_FAN, 0, circleVAR_count - 1); - } - - glColor4f(LINE_COLOR, 1.0f); - glDrawArrays(GL_LINE_STRIP, 0, circleVAR_count); - } glPopMatrix(); -} - -static const GLfloat pillVAR[] = { - 0.0000f, 1.0000f, 1.0f, - 0.2588f, 0.9659f, 1.0f, - 0.5000f, 0.8660f, 1.0f, - 0.7071f, 0.7071f, 1.0f, - 0.8660f, 0.5000f, 1.0f, - 0.9659f, 0.2588f, 1.0f, - 1.0000f, 0.0000f, 1.0f, - 0.9659f, -0.2588f, 1.0f, - 0.8660f, -0.5000f, 1.0f, - 0.7071f, -0.7071f, 1.0f, - 0.5000f, -0.8660f, 1.0f, - 0.2588f, -0.9659f, 1.0f, - 0.0000f, -1.0000f, 1.0f, - - 0.0000f, -1.0000f, 0.0f, - -0.2588f, -0.9659f, 0.0f, - -0.5000f, -0.8660f, 0.0f, - -0.7071f, -0.7071f, 0.0f, - -0.8660f, -0.5000f, 0.0f, - -0.9659f, -0.2588f, 0.0f, - -1.0000f, -0.0000f, 0.0f, - -0.9659f, 0.2588f, 0.0f, - -0.8660f, 0.5000f, 0.0f, - -0.7071f, 0.7071f, 0.0f, - -0.5000f, 0.8660f, 0.0f, - -0.2588f, 0.9659f, 0.0f, - 0.0000f, 1.0000f, 0.0f, -}; -static const int pillVAR_count = sizeof(pillVAR)/sizeof(GLfloat)/3; - -static void -drawSegmentShape(cpBody *body, cpSegmentShape *seg) -{ - cpVect a = seg->ta; - cpVect b = seg->tb; - - if(seg->r){ - glVertexPointer(3, GL_FLOAT, 0, pillVAR); - glPushMatrix(); { - cpVect d = cpvsub(b, a); - cpVect r = cpvmult(d, seg->r/cpvlength(d)); - - const GLfloat matrix[] = { - r.x, r.y, 0.0f, 0.0f, - -r.y, r.x, 0.0f, 0.0f, - d.x, d.y, 0.0f, 0.0f, - a.x, a.y, 0.0f, 1.0f, - }; - glMultMatrixf(matrix); - - if(!seg->shape.sensor){ - glColor_from_pointer(seg); - glDrawArrays(GL_TRIANGLE_FAN, 0, pillVAR_count); - } - - glColor4f(LINE_COLOR, 1.0f); - glDrawArrays(GL_LINE_LOOP, 0, pillVAR_count); - } glPopMatrix(); - } else { - glColor4f(LINE_COLOR, 1.0f); - drawLine(a, b); -// glBegin(GL_LINES); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - } -} - -static void -drawPolyShape(cpBody *body, cpPolyShape *poly) -{ - int count = count=poly->numVerts; - glVertexPointer(2, GL_FLOAT, 0, poly->tVerts); - - if(!poly->shape.sensor){ - glColor_from_pointer(poly); - glDrawArrays(GL_TRIANGLE_FAN, 0, count); - } - - glColor4f(LINE_COLOR, 1.0f); - glDrawArrays(GL_LINE_LOOP, 0, count); -} - -static void -drawObject(void *ptr, void *unused) -{ - cpShape *shape = (cpShape *)ptr; - cpBody *body = shape->body; - - switch(shape->klass->type){ - case CP_CIRCLE_SHAPE: - drawCircleShape(body, (cpCircleShape *)shape); - break; - case CP_SEGMENT_SHAPE: - drawSegmentShape(body, (cpSegmentShape *)shape); - break; - case CP_POLY_SHAPE: - drawPolyShape(body, (cpPolyShape *)shape); - break; - default: - printf("Bad enumeration in drawObject().\n"); - } -} - -static const GLfloat springVAR[] = { - 0.00f, 0.0f, - 0.20f, 0.0f, - 0.25f, 3.0f, - 0.30f,-6.0f, - 0.35f, 6.0f, - 0.40f,-6.0f, - 0.45f, 6.0f, - 0.50f,-6.0f, - 0.55f, 6.0f, - 0.60f,-6.0f, - 0.65f, 6.0f, - 0.70f,-3.0f, - 0.75f, 6.0f, - 0.80f, 0.0f, - 1.00f, 0.0f, -}; -static const int springVAR_count = sizeof(springVAR)/sizeof(GLfloat)/2; - -static void -drawSpring(cpDampedSpring *spring, cpBody *body_a, cpBody *body_b) -{ - cpVect a = cpvadd(body_a->p, cpvrotate(spring->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(spring->anchr2, body_b->rot)); - - glPointSize(3.0f); - drawPoint(a); - drawPoint(b); -// glBegin(GL_POINTS); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - - cpVect delta = cpvsub(b, a); - - glVertexPointer(2, GL_FLOAT, 0, springVAR); - glPushMatrix(); { - GLfloat x = a.x; - GLfloat y = a.y; - GLfloat cos = delta.x; - GLfloat sin = delta.y; - GLfloat s = 1.0f/cpvlength(delta); - - const GLfloat matrix[] = { - cos, sin, 0.0f, 0.0f, - -sin*s, cos*s, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - x, y, 0.0f, 1.0f, - }; - - glMultMatrixf(matrix); - glDrawArrays(GL_LINE_STRIP, 0, springVAR_count); - } glPopMatrix(); -} - -static void -drawConstraint(cpConstraint *constraint) -{ - cpBody *body_a = constraint->a; - cpBody *body_b = constraint->b; - - const cpConstraintClass *klass = constraint->klass; - if(klass == cpPinJointGetClass()){ - cpPinJoint *joint = (cpPinJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(3.0f); - drawPoint(a); - drawPoint(b); -// glBegin(GL_POINTS); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - - drawLine(a, b); -// glBegin(GL_LINES); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - } else if(klass == cpSlideJointGetClass()){ - cpSlideJoint *joint = (cpSlideJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(3.0f); - drawPoint(a); - drawPoint(b); -// glBegin(GL_POINTS); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - - drawLine(a, b); -// glBegin(GL_LINES); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - } else if(klass == cpPivotJointGetClass()){ - cpPivotJoint *joint = (cpPivotJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->anchr1, body_a->rot)); - cpVect b = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(3.0f); - drawPoint(a); - drawPoint(b); -// glBegin(GL_POINTS); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - } else if(klass == cpGrooveJointGetClass()){ - cpGrooveJoint *joint = (cpGrooveJoint *)constraint; - - cpVect a = cpvadd(body_a->p, cpvrotate(joint->grv_a, body_a->rot)); - cpVect b = cpvadd(body_a->p, cpvrotate(joint->grv_b, body_a->rot)); - cpVect c = cpvadd(body_b->p, cpvrotate(joint->anchr2, body_b->rot)); - - glPointSize(3.0f); - drawPoint(c); -// glBegin(GL_POINTS); { -// glVertex2f(c.x, c.y); -// } glEnd(); - - drawLine(a, b); -// glBegin(GL_LINES); { -// glVertex2f(a.x, a.y); -// glVertex2f(b.x, b.y); -// } glEnd(); - } else if(klass == cpDampedSpringGetClass()){ - drawSpring((cpDampedSpring *)constraint, body_a, body_b); - } else { -// printf("Cannot draw constraint\n"); - } -} - -static void -drawBB(void *ptr, void *unused) -{ -// cpShape *shape = (cpShape *)ptr; -// -// glBegin(GL_LINE_LOOP); { -// glVertex2f(shape->bb.l, shape->bb.b); -// glVertex2f(shape->bb.l, shape->bb.t); -// glVertex2f(shape->bb.r, shape->bb.t); -// glVertex2f(shape->bb.r, shape->bb.b); -// } glEnd(); -} - -//static void -//drawCollisions(void *ptr, void *data) -//{ -// cpArbiter *arb = (cpArbiter *)ptr; -// for(int i=0; inumContacts; i++){ -// cpVect v = arb->contacts[i].p; -// glVertex3f(v.x, v.y); -// } -//} - -// copied from cpSpaceHash.c -//static inline cpHashValue -//hash_func(cpHashValue x, cpHashValue y, cpHashValue n) -//{ -// return (x*1640531513ul ^ y*2654435789ul) % n; -//} -// -//static void -//drawSpatialHash(cpSpaceHash *hash) -//{ -// cpBB bb = cpBBNew(-320, -240, 320, 240); -// -// cpFloat dim = hash->celldim; -// int n = hash->numcells; -// -// int l = (int)floor(bb.l/dim); -// int r = (int)floor(bb.r/dim); -// int b = (int)floor(bb.b/dim); -// int t = (int)floor(bb.t/dim); -// -// for(int i=l; i<=r; i++){ -// for(int j=b; j<=t; j++){ -// int cell_count = 0; -// -// int index = hash_func(i,j,n); -// for(cpSpaceHashBin *bin = hash->table[index]; bin; bin = bin->next) -// cell_count++; -// -// GLfloat v = 1.0f - (GLfloat)cell_count/10.0f; -// glColor3f(v,v,v); -// glRectf(i*dim, j*dim, (i + 1)*dim, (j + 1)*dim); -// } -// } -//} - -void -drawSpace(cpSpace *space)//, drawSpaceOptions *options) -{ -// if(options->drawHash) -// drawSpatialHash(space->activeShapes); - -// glLineWidth(1.0f); -// if(options->drawBBs){ -// glColor4f(0.3f, 0.5f, 0.3f, 0.0f); -// cpSpaceHashEach(space->activeShapes, &drawBB, NULL); -// cpSpaceHashEach(space->staticShapes, &drawBB, NULL); -// } - - glLineWidth(1.0f);//options->lineThickness); - if(TRUE){//options->drawShapes){ - cpSpaceHashEach(space->activeShapes, &drawObject, NULL); - cpSpaceHashEach(space->staticShapes, &drawObject, NULL); - } - - cpArray *constraints = space->constraints; - - glColor4f(0.5f, 1.0f, 0.5f, 1.0f); - for(int i=0, count = constraints->num; iarr[i]); - } - -// if(options->bodyPointSize){ -// cpArray *bodies = space->bodies; -// -// glPointSize(options->bodyPointSize); -// glBegin(GL_POINTS); { -// glColor3f(LINE_COLOR); -// for(int i=0, count = bodies->num; iarr[i]; -// glVertex2f(body->p.x, body->p.y); -// } -// } glEnd(); -// } - -// if(options->collisionPointSize){ -// glPointSize(options->collisionPointSize); -// glBegin(GL_POINTS); { -// glColor3f(COLLISION_COLOR); -// cpArrayEach(space->arbiters, &drawCollisions, NULL); -// } glEnd(); -// } -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.h deleted file mode 100644 index 5972d0c12d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/drawSpace.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef struct drawSpaceOptions { - int drawHash; - int drawBBs; - int drawShapes; - float collisionPointSize; - float bodyPointSize; - float lineThickness; -} drawSpaceOptions; - -void drawSpace(cpSpace *space);//, drawSpaceOptions *options); diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk.xcodeproj/project.pbxproj b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk.xcodeproj/project.pbxproj deleted file mode 100644 index 46f54a5ebe..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk.xcodeproj/project.pbxproj +++ /dev/null @@ -1,371 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - D3288D2B112B0762007C6383 /* Planet.m in Sources */ = {isa = PBXBuildFile; fileRef = D3288D2A112B0762007C6383 /* Planet.m */; }; - D32892E8112C83D6007C6383 /* PyramidStack.m in Sources */ = {isa = PBXBuildFile; fileRef = D32892E7112C83D6007C6383 /* PyramidStack.m */; }; - D3289317112C86E3007C6383 /* Plink.m in Sources */ = {isa = PBXBuildFile; fileRef = D3289316112C86E3007C6383 /* Plink.m */; }; - D3289351112C8E33007C6383 /* Bounce.m in Sources */ = {isa = PBXBuildFile; fileRef = D3289350112C8E33007C6383 /* Bounce.m */; }; - D3289370112C925F007C6383 /* Joints.m in Sources */ = {isa = PBXBuildFile; fileRef = D328936F112C925F007C6383 /* Joints.m */; }; - D365865A112C9C1800D192F5 /* PyramidTopple.m in Sources */ = {isa = PBXBuildFile; fileRef = D3658659112C9C1800D192F5 /* PyramidTopple.m */; }; - D365869F112CA45E00D192F5 /* Springies.m in Sources */ = {isa = PBXBuildFile; fileRef = D365869E112CA45E00D192F5 /* Springies.m */; }; - D36586F7112CAB1000D192F5 /* TheoJansen.m in Sources */ = {isa = PBXBuildFile; fileRef = D36586F6112CAB1000D192F5 /* TheoJansen.m */; }; - D3658710112CAFD100D192F5 /* Tumble.m in Sources */ = {isa = PBXBuildFile; fileRef = D365870F112CAFD100D192F5 /* Tumble.m */; }; - D3658790112CBF9900D192F5 /* OneWay.m in Sources */ = {isa = PBXBuildFile; fileRef = D365878F112CBF9900D192F5 /* OneWay.m */; }; - D3658A30112F2FC900D192F5 /* info.png in Resources */ = {isa = PBXBuildFile; fileRef = D3658A2F112F2FC900D192F5 /* info.png */; }; - D3658B9F112F5D3F00D192F5 /* drawSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = D3658B9D112F5D3F00D192F5 /* drawSpace.c */; }; - D3766AA50F86B70E00E1FC09 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D3766AA40F86B70E00E1FC09 /* Icon.png */; }; - D3766AA70F86B76A00E1FC09 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3766AA60F86B76A00E1FC09 /* Default.png */; }; - D3A8C48511274AFD001BFC9F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - D3A8C48711274B05001BFC9F /* ChipmunkDemo.m in Sources */ = {isa = PBXBuildFile; fileRef = D3A8C437112748DF001BFC9F /* ChipmunkDemo.m */; }; - D3A8C48911274B17001BFC9F /* iPhoneChipmunk.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iPhoneChipmunk.m */; }; - D3A8C48A11274B17001BFC9F /* Accelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = D3766A7C0F86B28900E1FC09 /* Accelerometer.m */; }; - D3A8C54111275733001BFC9F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A8C54011275733001BFC9F /* CoreGraphics.framework */; }; - D3A8C5BE11275CDC001BFC9F /* Sensors.m in Sources */ = {isa = PBXBuildFile; fileRef = D3A8C5BD11275CDC001BFC9F /* Sensors.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* iPhoneChipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneChipmunk.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* iPhoneChipmunk.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iPhoneChipmunk.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* Chipmunk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chipmunk.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* iPhoneChipmunk_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneChipmunk_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D3288D2A112B0762007C6383 /* Planet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Planet.m; sourceTree = ""; }; - D32892E7112C83D6007C6383 /* PyramidStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyramidStack.m; sourceTree = ""; }; - D3289316112C86E3007C6383 /* Plink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Plink.m; sourceTree = ""; }; - D3289350112C8E33007C6383 /* Bounce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bounce.m; sourceTree = ""; }; - D328936F112C925F007C6383 /* Joints.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Joints.m; sourceTree = ""; }; - D3658659112C9C1800D192F5 /* PyramidTopple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyramidTopple.m; sourceTree = ""; }; - D365869E112CA45E00D192F5 /* Springies.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Springies.m; sourceTree = ""; }; - D36586F6112CAB1000D192F5 /* TheoJansen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TheoJansen.m; sourceTree = ""; }; - D365870F112CAFD100D192F5 /* Tumble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tumble.m; sourceTree = ""; }; - D365878F112CBF9900D192F5 /* OneWay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneWay.m; sourceTree = ""; }; - D3658A2F112F2FC900D192F5 /* info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info.png; sourceTree = ""; }; - D3658B9D112F5D3F00D192F5 /* drawSpace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = drawSpace.c; sourceTree = ""; }; - D3658B9E112F5D3F00D192F5 /* drawSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = drawSpace.h; sourceTree = ""; }; - D3766A7B0F86B28900E1FC09 /* Accelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Accelerometer.h; sourceTree = ""; }; - D3766A7C0F86B28900E1FC09 /* Accelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Accelerometer.m; sourceTree = ""; }; - D3766AA40F86B70E00E1FC09 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - D3766AA60F86B76A00E1FC09 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - D3A8C437112748DF001BFC9F /* ChipmunkDemo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChipmunkDemo.m; sourceTree = ""; }; - D3A8C438112748DF001BFC9F /* ChipmunkDemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChipmunkDemo.h; sourceTree = ""; }; - D3A8C54011275733001BFC9F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - D3A8C5BD11275CDC001BFC9F /* Sensors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sensors.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - D3A8C54111275733001BFC9F /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* iPhoneChipmunk.h */, - 1D3623250D0F684500981E51 /* iPhoneChipmunk.m */, - D3A8C438112748DF001BFC9F /* ChipmunkDemo.h */, - D3A8C437112748DF001BFC9F /* ChipmunkDemo.m */, - D3766A7B0F86B28900E1FC09 /* Accelerometer.h */, - D3766A7C0F86B28900E1FC09 /* Accelerometer.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* Chipmunk.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - D3A8C5BB11275CBE001BFC9F /* Demos */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* iPhoneChipmunk_Prefix.pch */, - D3658B9E112F5D3F00D192F5 /* drawSpace.h */, - D3658B9D112F5D3F00D192F5 /* drawSpace.c */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - D3658A2F112F2FC900D192F5 /* info.png */, - D3766AA60F86B76A00E1FC09 /* Default.png */, - D3766AA40F86B70E00E1FC09 /* Icon.png */, - 28AD733E0D9D9553002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - D3A8C54011275733001BFC9F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - D3A8C5BB11275CBE001BFC9F /* Demos */ = { - isa = PBXGroup; - children = ( - D365878F112CBF9900D192F5 /* OneWay.m */, - D365870F112CAFD100D192F5 /* Tumble.m */, - D36586F6112CAB1000D192F5 /* TheoJansen.m */, - D365869E112CA45E00D192F5 /* Springies.m */, - D3658659112C9C1800D192F5 /* PyramidTopple.m */, - D328936F112C925F007C6383 /* Joints.m */, - D3289350112C8E33007C6383 /* Bounce.m */, - D32892E7112C83D6007C6383 /* PyramidStack.m */, - D3289316112C86E3007C6383 /* Plink.m */, - D3A8C5BD11275CDC001BFC9F /* Sensors.m */, - D3288D2A112B0762007C6383 /* Planet.m */, - ); - path = Demos; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ChipmunkApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ChipmunkApp" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ChipmunkApp; - productName = GLGame; - productReference = 1D6058910D05DD3D006BFB54 /* Chipmunk.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneChipmunk" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ChipmunkApp */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, - D3766AA50F86B70E00E1FC09 /* Icon.png in Resources */, - D3766AA70F86B76A00E1FC09 /* Default.png in Resources */, - D3658A30112F2FC900D192F5 /* info.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D3A8C48511274AFD001BFC9F /* main.m in Sources */, - D3A8C48911274B17001BFC9F /* iPhoneChipmunk.m in Sources */, - D3A8C48A11274B17001BFC9F /* Accelerometer.m in Sources */, - D3A8C48711274B05001BFC9F /* ChipmunkDemo.m in Sources */, - D3A8C5BE11275CDC001BFC9F /* Sensors.m in Sources */, - D3288D2B112B0762007C6383 /* Planet.m in Sources */, - D32892E8112C83D6007C6383 /* PyramidStack.m in Sources */, - D3289317112C86E3007C6383 /* Plink.m in Sources */, - D3289351112C8E33007C6383 /* Bounce.m in Sources */, - D3289370112C925F007C6383 /* Joints.m in Sources */, - D365865A112C9C1800D192F5 /* PyramidTopple.m in Sources */, - D365869F112CA45E00D192F5 /* Springies.m in Sources */, - D36586F7112CAB1000D192F5 /* TheoJansen.m in Sources */, - D3658710112CAFD100D192F5 /* Tumble.m in Sources */, - D3658790112CBF9900D192F5 /* OneWay.m in Sources */, - D3658B9F112F5D3F00D192F5 /* drawSpace.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = iPhoneChipmunk_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - INFOPLIST_FILE = Info.plist; - LIBRARY_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - OTHER_LDFLAGS = "-lObjectiveChipmunk-iPhone"; - PRODUCT_NAME = Chipmunk; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = iPhoneChipmunk_Prefix.pch; - GCC_THUMB_SUPPORT = NO; - HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - INFOPLIST_FILE = Info.plist; - LIBRARY_SEARCH_PATHS = ( - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone\"", - "\"$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator\"", - ); - OTHER_LDFLAGS = "-lObjectiveChipmunk-iPhone"; - PRODUCT_NAME = Chipmunk; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = ( - "-x", - "objective-c", - "-ffast-math", - ); - PREBINDING = NO; - PROVISIONING_PROFILE = ""; - SDKROOT = iphoneos4.2; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - GCC_AUTO_VECTORIZATION = YES; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - OTHER_CFLAGS = ( - "-x", - "objective-c", - "-ffast-math", - ); - PREBINDING = NO; - PROVISIONING_PROFILE = ""; - SDKROOT = iphoneos4.2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ChipmunkApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneChipmunk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk_Prefix.pch b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk_Prefix.pch deleted file mode 100644 index 6394c3657b..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/iPhoneChipmunk_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'GLGame' target in the 'GLGame' project -// - -#ifdef __OBJC__ -#import -#import -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/info.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/info.png deleted file mode 100644 index 5f1f3dfa37..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/info.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/main.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/main.m deleted file mode 100644 index f9394d5716..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneChipmunk/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// GLGame -// -// Created by Scott Lembcke on 12/6/08. -// Copyright __MyCompanyName__ 2008. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/1.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/1.png deleted file mode 100644 index 7f8693cfb5..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/1.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/3.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/3.png deleted file mode 100644 index 1273baa840..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/3.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/5.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/5.png deleted file mode 100644 index decea648ce..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/5.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.h deleted file mode 100644 index 96c5395ab3..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.h +++ /dev/null @@ -1,40 +0,0 @@ -#import - -#import "ObjectiveChipmunk.h" - -@class CADisplayLink; -@class BoardView; - -@interface AppDelegate : NSObject { - IBOutlet UIWindow *window; - IBOutlet UIViewController *flipController; - IBOutlet UIViewController *infoController; - IBOutlet BoardView *board; - - IBOutlet UIActivityIndicatorView *busy; - IBOutlet UIProgressView *meter; - - IBOutlet UILabel *playerLabel; - IBOutlet UILabel *scoreLabel; - - int currentPlayer; - int thisScore; - int scores[2]; - - BOOL paused; - CADisplayLink *link; -} - -@property BOOL simulationPaused; -@property int thisScore; - -+ (AppDelegate *)sharedDelegate; - -- (IBAction)showInfo:(id)sender; -- (IBAction)backToGame:(id)sender; -- (IBAction)showInfoPage:(id)sender; - -- (void)gameOver; - -@end - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.m deleted file mode 100644 index 7c9c6e5c30..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/AppDelegate.m +++ /dev/null @@ -1,221 +0,0 @@ -#import "AppDelegate.h" - -#import - -#import "BoardView.h" - -@interface AppDelegate () - -- (void)resetGame; - -@end - - -@interface ResetGameDelegate : NSObject { -} -@end - -@implementation ResetGameDelegate - -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex -{ - [[AppDelegate sharedDelegate] resetGame]; - [self release]; -} - -@end - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(UIApplication *)application -{ - // Set up the update loop - link = [[CADisplayLink displayLinkWithTarget:board selector:@selector(update:)] retain]; - link.frameInterval = 2; - [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; - - flipController.view.frame = window.bounds; - - [self resetGame]; - - [window addSubview:flipController.view]; - [window makeKeyAndVisible]; -} - -- (void)updateLabels -{ - playerLabel.text = [NSString stringWithFormat:@"Player %d", currentPlayer + 1]; - scoreLabel.text = [NSString stringWithFormat:@"%d points", scores[currentPlayer]]; -} - -- (int)thisScore{return thisScore;} - -- (void)removeSubView:(NSString *)animationID finished:(NSNumber *)finished context:(UIView *)view -{ - [view removeFromSuperview]; -} - -- (void)addScoreFloaty:(NSString *)text -{ - UILabel *label = [[UILabel alloc] initWithFrame:scoreLabel.frame]; - label.text = text; - label.backgroundColor = scoreLabel.backgroundColor; - label.font = scoreLabel.font; - label.opaque = scoreLabel.opaque; - label.shadowColor = scoreLabel.shadowColor; - label.shadowOffset = scoreLabel.shadowOffset; - label.textAlignment = scoreLabel.textAlignment; - label.textColor = [UIColor whiteColor]; - label.transform = CGAffineTransformMakeTranslation(0.0, -70.0); - [window addSubview:label]; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:2.0]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(removeSubView:finished:context:)]; - - label.transform = CGAffineTransformMakeTranslation(0.0, -100.0); - label.alpha = 0.0; - [UIView commitAnimations]; -} - -- (void)setThisScore:(int)value -{ - [self addScoreFloaty:[NSString stringWithFormat:@"+%d", value]]; - scores[currentPlayer] -= thisScore; - - thisScore = value; - scores[currentPlayer] += thisScore; - - [self updateLabels]; -} - -- (void)switchPlayers -{ - [busy stopAnimating]; - [UIView beginAnimations:nil context:nil]; - meter.alpha = 0.0; - [UIView commitAnimations]; - - thisScore = 0; - currentPlayer = (currentPlayer + 1)%2; - - [self updateLabels]; - - paused = TRUE; -} - -- (void)updateScoring -{ - if(currentPlayer != -1){ - if(meter.progress == 0.0){ - int amount = -(thisScore + 5); - scores[currentPlayer] = MAX(0, scores[currentPlayer] + amount); - [self addScoreFloaty:[NSString stringWithFormat:@"%d", amount]]; - } - - [self updateLabels]; - [self performSelector:@selector(switchPlayers) withObject:nil afterDelay:1.0]; - } else { - [self switchPlayers]; - } -} - -- (BOOL)simulationPaused -{ - return paused; -} - -- (void)setSimulationPaused:(BOOL)value -{ - link.paused = value; - - if(value){ - [self updateScoring]; - } else { - paused = FALSE; - [busy startAnimating]; - meter.alpha = 1.0; - } -} - -+ (AppDelegate *)sharedDelegate; -{ - return (AppDelegate *)[UIApplication sharedApplication].delegate; -} - -- (void)dealloc -{ - [window release]; - - [link invalidate]; - [link release]; - - [super dealloc]; -} - -- (IBAction)showInfo:(id)sender; -{ - infoController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; - [flipController presentModalViewController:infoController animated:YES]; - infoController.view.frame = window.bounds; -} - -- (IBAction)backToGame:(id)sender; -{ - [flipController dismissModalViewControllerAnimated:YES]; - flipController.view.frame = window.bounds; -} - -- (IBAction)showInfoPage:(id)sender; -{ - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://code.google.com/p/chipmunk-physics/"]]; -} - -- (void)resetGame -{ - meter.alpha = 0.0; - [busy stopAnimating]; - - playerLabel.text = @""; - scoreLabel.text = @""; - - currentPlayer = -1; - thisScore = 0; - scores[0] = 0; - scores[1] = 0; - - link.paused = TRUE; - [board startNewGame]; - - paused = FALSE; - link.paused = FALSE; -} - -- (void)gameOver; -{ - int score1 = scores[0]; - int score2 = scores[1]; - - NSString *message = nil; - if(score1 == score2){ - message = [NSString stringWithFormat:@"Tie!\n%d to %d", score1, score2]; - } else { - message = [NSString stringWithFormat:@"Player %d won!\n%d to %d", (score1 > score2 ? 1 : 2), score1, score2]; - } - - UIAlertView *alert = [[UIAlertView alloc] - initWithTitle:@"Game Over" - message:message - delegate:[[ResetGameDelegate alloc] init] - cancelButtonTitle:@"New Game" - otherButtonTitles:nil - ]; - - [alert show]; - [alert release]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.h deleted file mode 100644 index 02a6d13d5a..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.h +++ /dev/null @@ -1,21 +0,0 @@ -#import - -#import "ObjectiveChipmunk.h" - -@interface BoardView : UIView { - IBOutlet UIView *barView; - IBOutlet UIProgressView *meter; - - ChipmunkBody *barBody; - cpFloat lastBarHeight; - - ChipmunkSpace *space; - ChipmunkBody *staticBody; - NSMutableSet *pieces; - - int idleTicks; -} - -- (void)startNewGame; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.m deleted file mode 100644 index d6573a97cf..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/BoardView.m +++ /dev/null @@ -1,159 +0,0 @@ -#import "BoardView.h" - -#import - -#import "AppDelegate.h" -#import "GamePiece.h" - -#define TIMESTEP 1.0/60.0 - -@implementation BoardView - -static cpFloat kineticEnergy(cpBody *body){return body->m*cpvlengthsq(body->v) + body->i*body->w*body->w;} - -- (void)update:(CADisplayLink *)sender; -{ - // Drawing using CoreAnimation is simple but slow, so the framerate is set to 30fps - // We want the space to be stepped at 60Hz, so we can step it twice per frame. - // This works great for a simple game like this, though action games will want to do - // something more elegant. - [space step:TIMESTEP]; - [space step:TIMESTEP]; - - meter.progress = 1.0 - MIN(MAX((barBody.pos.y - lastBarHeight)/40.0, 0.0), 1.0); - - cpFloat energy = barBody.mass*cpvlengthsq(barBody.vel); - for(GamePiece *piece in pieces){ - // This isn't really performance critical code, but you can still access and use - // the underlying C types if you need them to better optimize parts of your code. - energy += kineticEnergy(piece.body.body); - } - - if(energy < 1.0){ - if(++idleTicks > 10){ - // Nothing has been moving much for a few steps - // stop simulating and end the turn - [AppDelegate sharedDelegate].simulationPaused = TRUE; - lastBarHeight = barBody.pos.y; - } - } else { - idleTicks = 0; - } - - [pieces makeObjectsPerformSelector:@selector(updateTransform)]; - barView.transform = [barBody affineTransform]; -} - -- (void)addPiece:(GamePiece *)piece -{ - [pieces addObject:piece]; - [space add:piece]; - [self addSubview:piece]; -} - -- (void)removeSubView:(NSString *)animationID finished:(NSNumber *)finished context:(UIView *)view -{ - [view removeFromSuperview]; -} - -- (void)removePiece:(GamePiece *)piece -{ - if(piece == nil) return; - - idleTicks = 0; - [AppDelegate sharedDelegate].thisScore += piece.points; - - [pieces removeObject:piece]; - [space remove:piece]; -// [piece removeFromSuperview]; - - [UIView beginAnimations:nil context:piece]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(removeSubView:finished:context:)]; - piece.alpha = 0.0; - [UIView commitAnimations]; - - [AppDelegate sharedDelegate].simulationPaused = FALSE; - - if([pieces count] <= 2){ - [[AppDelegate sharedDelegate] gameOver]; - } -} - -- (void)startNewGame; -{ - for(GamePiece *piece in [NSSet setWithSet:pieces]){ - [piece removeFromSuperview]; - } - - [pieces release]; - [space release]; - - pieces = [[NSMutableSet alloc] init]; - space = [[ChipmunkSpace alloc] init]; - staticBody = [ChipmunkBody staticBody]; - - lastBarHeight = INFINITY; - - CGRect bounds = self.bounds; - bounds.size.height += 320.0; - bounds.origin.y -= 320.0; - [space addBounds:bounds thickness:100.0 elasticity:0.0 friction:FRICTION_AMOUNT layers:CP_ALL_LAYERS group:[BoardView class] collisionType:nil]; - - // Set up the bar - { - CGSize barSize = barView.bounds.size; - cpFloat offset = barSize.width/2.0; - cpFloat radius = barSize.height/2.0; - - [barBody release]; - barBody = [[ChipmunkBody alloc] initWithMass:10.0 andMoment:INFINITY]; - [space add:barBody]; - barBody.pos = cpv(160.0, -radius); - barBody.force = cpv(0.0 , 6000.0); - - ChipmunkShape *barShape = [space add:[ChipmunkSegmentShape segmentWithBody:barBody from:cpv(-offset, 0.0) to:cpv(offset, 0.0) radius:radius]]; - barShape.friction = FRICTION_AMOUNT; - barShape.group = [BoardView class]; - - cpFloat bottom = self.bounds.size.height - barSize.height/2.0; - [space add:[ChipmunkGrooveJoint grooveJointWithBodyA:staticBody bodyB:barBody groove_a:cpv(160.0, -1000.0) groove_b:cpv(160.0, bottom) anchr2:cpvzero]]; - - barView.center = CGPointZero; - barView.transform = [barBody affineTransform]; - } - - // Add the pieces - for(int i=0; i<12; i++) - [self addPiece:[GamePiece pieceWithSize:GamePieceSmall staticBody:staticBody]]; - for(int i=0; i<9; i++) - [self addPiece:[GamePiece pieceWithSize:GamePieceMed staticBody:staticBody]]; - for(int i=0; i<6; i++) - [self addPiece:[GamePiece pieceWithSize:GamePieceLarge staticBody:staticBody]]; - - // Let everything settle into place - for(int i=0; i<200; i++) - [space step:TIMESTEP]; -} - -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event -{ - // Can only remove pieces when the sim is not running - if(![AppDelegate sharedDelegate].simulationPaused) return; - - cpVect point = [[[event touchesForView:self] anyObject] locationInView:self]; - [self removePiece:[space pointQueryFirst:point layers:CP_ALL_LAYERS group:[BoardView class]].data]; -} - -- (void)dealloc -{ - [space release]; - [pieces release]; - - [barView release]; - [barBody release]; - - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.h b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.h deleted file mode 100644 index 666c904ce7..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.h +++ /dev/null @@ -1,26 +0,0 @@ -#import - -#import "ObjectiveChipmunk.h" - -#define FRICTION_AMOUNT 0.4 - -typedef enum GamePieceSize { - GamePieceSmall, - GamePieceMed, - GamePieceLarge, -} GamePieceSize; - -@interface GamePiece : UIImageView { - int points; - - ChipmunkBody *body; - NSSet *chipmunkObjects; -} - -@property (readonly) NSSet *chipmunkObjects; -@property (readonly) ChipmunkBody *body; -@property (readonly) int points; - -+ (id)pieceWithSize:(GamePieceSize)size staticBody:(ChipmunkBody *)staticBody; - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.m deleted file mode 100644 index f6495ed0f7..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Classes/GamePiece.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GamePiece.h" - - -@implementation GamePiece - -@synthesize chipmunkObjects; -@synthesize body; -@synthesize points; - -- (void)updateTransform -{ - self.transform = [body affineTransform]; -} - -static cpFloat cpfrand(void){return (cpFloat)rand()/(cpFloat)RAND_MAX;} - -- (id)initWithSize:(GamePieceSize)size staticBody:(ChipmunkBody *)staticBody -{ - static NSString *images[] = {@"1.png",@"3.png",@"5.png"}; - static int pointAmounts[] = {1, 3, 5}; - - if(self = [super initWithImage:[UIImage imageNamed:images[size]]]){ - points = pointAmounts[size]; - - cpFloat radius = 0.975*(self.bounds.size.width/2.0); - cpFloat mass = 1.0; - body = [[ChipmunkBody alloc] initWithMass:1.0 andMoment:cpMomentForCircle(mass, 0.0, radius, cpvzero)]; - body.data = self; - body.pos = cpv(cpfrand()*320.0, cpfrand()*320.0); - - ChipmunkShape *shape = [ChipmunkCircleShape circleWithBody:body radius:radius offset:cpvzero]; - shape.data = self; - shape.elasticity = 0.0; - shape.friction = FRICTION_AMOUNT; - - // Use Joints to fake top down friction - ChipmunkConstraint *linear = [ChipmunkPivotJoint pivotJointWithBodyA:staticBody bodyB:body anchr1:cpvzero anchr2:cpvzero]; - linear.biasCoef = 0.0; // Disable joint correction. - linear.maxForce = 50.0; - - ChipmunkConstraint *rotary = [ChipmunkGearJoint gearJointWithBodyA:staticBody bodyB:body phase:0.0 ratio:1.0]; - rotary.biasCoef = 0.0; // Disable joint correction. - rotary.maxForce = 2000.0; - - chipmunkObjects = [ChipmunkObjectFlatten(body, shape, linear, rotary, nil) retain]; - - self.center = CGPointZero; - [self updateTransform]; - } - - return self; -} - -+ (id)pieceWithSize:(GamePieceSize)size staticBody:(ChipmunkBody *)staticBody; -{ - return [[[self alloc] autorelease] initWithSize:size staticBody:staticBody]; -} - -- (void)dealloc { - [body release]; - [chipmunkObjects release]; - - [super dealloc]; -} - -@end diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Default.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Default.png deleted file mode 100644 index 153648c301..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Default.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Icon.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Icon.png deleted file mode 100644 index 44b7c99d1f..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/Icon.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/IconLarge.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/IconLarge.png deleted file mode 100644 index cbf9cefcd1..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/IconLarge.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/MainWindow.xib b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/MainWindow.xib deleted file mode 100644 index e585583fc9..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/MainWindow.xib +++ /dev/null @@ -1,732 +0,0 @@ - - - - 784 - 9L31a - 680 - 949.54 - 353.00 - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - 1316 - - {320, 480} - - 3 - MAA - - 2 - - - NO - NO - - - - - 274 - - YES - - - 256 - {320, 480} - - NO - YES - 4 - YES - - NSImage - Default.png - - - - - 292 - - YES - - - 292 - - YES - - - 256 - {{20, 0}, {320, 50}} - - NO - YES - 4 - YES - - NSImage - bar.png - - - - - 292 - {{116, 20}, {128, 11}} - - NO - YES - YES - 4.577465e-01 - 1 - - - {{-20, 169}, {360, 50}} - - - 3 - MSAwAA - - - NO - NO - - - {320, 396} - - - 3 - MSAwAA - - NO - NO - - - - 292 - {{23, 429}, {37, 37}} - - NO - NO - NO - YES - 0 - - - - 292 - {{91, 414}, {145, 33}} - - NO - YES - NO - - - Helvetica - 2.400000e+01 - 16 - - - 3 - MQA - - - - 1 - 1.000000e+01 - 1 - - - - 292 - {{91, 444}, {145, 33}} - - NO - YES - NO - - - - 3 - MC43NQA - - - - 1 - 1.000000e+01 - 1 - - - - 292 - {{268, 439}, {18, 19}} - - NO - NO - 0 - 0 - - Helvetica-Bold - 1.500000e+01 - 16 - - 3 - YES - - 3 - MQA - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - 3 - MC41AA - - - - {320, 480} - - - 3 - MAA - - - NO - - - - - - 274 - - YES - - - 256 - {320, 480} - - NO - YES - 4 - YES - - NSImage - info.png - - - - - 292 - {{232, 418}, {60, 35}} - - NO - NO - 0 - 0 - - 1 - Back - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - - - 292 - {{25, 418}, {147, 35}} - - NO - NO - 0 - 0 - - 1 - More information - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - - {320, 480} - - 3 - MQA - - - NO - - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - board - - - - 25 - - - - meter - - - - 26 - - - - busy - - - - 27 - - - - barView - - - - 29 - - - - meter - - - - 30 - - - - playerLabel - - - - 35 - - - - scoreLabel - - - - 36 - - - - flipController - - - - 50 - - - - infoController - - - - 51 - - - - showInfo: - - - 7 - - 52 - - - - backToGame: - - - 7 - - 53 - - - - showInfoPage: - - - 7 - - 55 - - - - - YES - - 0 - - YES - - - - - - 2 - - - YES - - - - - -1 - - - RmlsZSdzIE93bmVyA - - - 3 - - - App Delegate - - - -2 - - - - - 38 - - - YES - - - - Info Controller - - - 45 - - - YES - - - - - - - - 46 - - - - - 47 - - - - - 48 - - - YES - - - - Flip Controller - - - 49 - - - YES - - - - - - - - - - - 12 - - - YES - - - - GameArea - - - 28 - - - YES - - - - - - - 16 - - - - - 19 - - - - - 18 - - - - - 23 - - - - - 33 - - - - - 34 - - - - - 13 - - - - - 54 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 12.CustomClassName - 12.IBPluginDependency - 18.IBPluginDependency - 19.IBPluginDependency - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 23.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 33.IBPluginDependency - 34.IBPluginDependency - 38.IBEditorWindowLastContentRect - 38.IBPluginDependency - 45.IBPluginDependency - 47.IBPluginDependency - 48.IBEditorWindowLastContentRect - 48.IBPluginDependency - 49.IBPluginDependency - 54.IBPluginDependency - - - YES - UIApplication - UIResponder - BoardView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - YES - - - YES - - - {{436, -764}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - AppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{139, 493}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{504, 494}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 55 - - - - YES - - AppDelegate - NSObject - - YES - - YES - backToGame: - showInfo: - showInfoPage: - - - YES - id - id - id - - - - YES - - YES - board - busy - flipController - infoController - meter - playerLabel - scoreLabel - window - - - YES - BoardView - UIActivityIndicatorView - UIViewController - UIViewController - UIProgressView - UILabel - UILabel - UIWindow - - - - IBProjectSource - Classes/AppDelegate.h - - - - AppDelegate - NSObject - - IBUserSource - - - - - BoardView - UIView - - YES - - YES - barView - meter - - - YES - UIView - UIProgressView - - - - IBProjectSource - Classes/BoardView.h - - - - - 0 - iPhoneSnap.xcodeproj - 3 - 3.1 - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/README.rtf b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/README.rtf deleted file mode 100644 index a51162475d..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/README.rtf +++ /dev/null @@ -1,20 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww9360\viewh9900\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0\b\fs24 \cf0 About Snap!\ - -\b0 \ -Snap! is modeled after an old wooden board game I used to play. Pieces are placed on the board and a bar compresses them downwards. Players take turns removing pieces one at a time, if they cause the bar to move too far then the player loses points.\ -\ -The Snap! source code is available under the MIT License. The purpose is to show how simple Objective-Chipmunk makes using the Chipmunk physics library from Objective-C projects. Snap is also available from the App Store for $.99.\ -\ - -\b About the Objective-Chipmunk wrapper:\ - -\b0 \ -Objective-Chipmunk is an Objective-C wrapper for the Chipmunk Physics Library. Chipmunk was written in C to allow it to The primary advantages of a native Objective-C API include integrating with the Cocoa memory management model and the Chipmunk Object protocol. The Chipmunk Object protocol unifies the basic Chipmunk types as well as making it easy to create custom composite collections of the basic types. Additionally, the wrapper adds many convenience methods for doing common setup tasks as well as helper methods that integrate it with the rest of the Cocoa Touch API. The wrapper tries to do things the Objective-C way, adding useful method variations where it makes sense to do so.\ -\ -The Objective-Chipmunk wrapper is free to use on Mac OS X as well as the iPhone simulator. Access to the iPhone optimized build of the library costs $200 per title to license. Please contact us at {\field{\*\fldinst{HYPERLINK "mailto:admin@howlingmoonsoftware.com"}}{\fldrslt admin@howlingmoonsoftware.com}} for further information.} \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/bar.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/bar.png deleted file mode 100644 index d321ddf301..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/bar.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/buildsample.sh b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/buildsample.sh deleted file mode 100644 index afe46fff5f..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/buildsample.sh +++ /dev/null @@ -1,13 +0,0 @@ -rm -rf iPhoneSnapSample* - -svn export . iPhoneSnapSample -pushd iPhoneSnapSample -rm *.psd -rm buildsample.sh - -cd Objective-Chipmunk-iPhone -lipo libObjectiveChipmunk-iPhone.a -thin i386 -output libObjectiveChipmunk-iPhone.a - -popd -tar -czf iPhoneSnapSample.tgz iPhoneSnapSample -rm -rf iPhoneSnapSample diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap-Info.plist b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap-Info.plist deleted file mode 100644 index 13d8a32708..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap-Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - Snap! - CFBundleExecutable - Snap - CFBundleIconFile - - CFBundleIdentifier - com.howlingmoonsoftware.SnapPhysics - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Snap! - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - UIStatusBarStyle - UIStatusBarStyleBlackTranslucent - UIPrerenderedIcon - - - diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap.xcodeproj/project.pbxproj b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap.xcodeproj/project.pbxproj deleted file mode 100644 index a34c750452..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap.xcodeproj/project.pbxproj +++ /dev/null @@ -1,314 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; - D32CB01B112353EC007EBEB0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D32CB01A112353EC007EBEB0 /* QuartzCore.framework */; }; - D32CB18F11236519007EBEB0 /* GamePiece.m in Sources */ = {isa = PBXBuildFile; fileRef = D32CB18E11236519007EBEB0 /* GamePiece.m */; }; - D32CB25611237140007EBEB0 /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB25311237140007EBEB0 /* 1.png */; }; - D32CB25711237140007EBEB0 /* 3.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB25411237140007EBEB0 /* 3.png */; }; - D32CB25811237140007EBEB0 /* 5.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB25511237140007EBEB0 /* 5.png */; }; - D32CB2BE1123785A007EBEB0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB2BD1123785A007EBEB0 /* Default.png */; }; - D32CB2DF112453BE007EBEB0 /* BoardView.m in Sources */ = {isa = PBXBuildFile; fileRef = D32CB2DE112453BE007EBEB0 /* BoardView.m */; }; - D32CB35B11245BCF007EBEB0 /* bar.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB35A11245BCF007EBEB0 /* bar.png */; }; - D32CB5CA11247F75007EBEB0 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB5C911247F75007EBEB0 /* Icon.png */; }; - D32CB97F1124CD1C007EBEB0 /* info.png in Resources */ = {isa = PBXBuildFile; fileRef = D32CB97E1124CD1C007EBEB0 /* info.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* Snap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Snap.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* iPhoneSnap_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneSnap_Prefix.pch; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* iPhoneSnap-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iPhoneSnap-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - D32CB01A112353EC007EBEB0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - D32CB18D11236519007EBEB0 /* GamePiece.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamePiece.h; sourceTree = ""; }; - D32CB18E11236519007EBEB0 /* GamePiece.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GamePiece.m; sourceTree = ""; }; - D32CB25311237140007EBEB0 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; - D32CB25411237140007EBEB0 /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; - D32CB25511237140007EBEB0 /* 5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 5.png; sourceTree = ""; }; - D32CB2BD1123785A007EBEB0 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - D32CB2DD112453BE007EBEB0 /* BoardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoardView.h; sourceTree = ""; }; - D32CB2DE112453BE007EBEB0 /* BoardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BoardView.m; sourceTree = ""; }; - D32CB35A11245BCF007EBEB0 /* bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bar.png; sourceTree = ""; }; - D32CB5C911247F75007EBEB0 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - D32CB97E1124CD1C007EBEB0 /* info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info.png; sourceTree = ""; }; - D32CBB3A1125DD02007EBEB0 /* README.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = README.rtf; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - D32CB01B112353EC007EBEB0 /* QuartzCore.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - D32CB2DD112453BE007EBEB0 /* BoardView.h */, - D32CB2DE112453BE007EBEB0 /* BoardView.m */, - D32CB18D11236519007EBEB0 /* GamePiece.h */, - D32CB18E11236519007EBEB0 /* GamePiece.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* Snap.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - D32CBB3A1125DD02007EBEB0 /* README.rtf */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* iPhoneSnap_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - D32CB97E1124CD1C007EBEB0 /* info.png */, - D32CB5C911247F75007EBEB0 /* Icon.png */, - D32CB35A11245BCF007EBEB0 /* bar.png */, - D32CB2BD1123785A007EBEB0 /* Default.png */, - D32CB25311237140007EBEB0 /* 1.png */, - D32CB25411237140007EBEB0 /* 3.png */, - D32CB25511237140007EBEB0 /* 5.png */, - 28AD733E0D9D9553002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* iPhoneSnap-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - D32CB01A112353EC007EBEB0 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* iPhoneSnap */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneSnap" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iPhoneSnap; - productName = iPhoneSnap; - productReference = 1D6058910D05DD3D006BFB54 /* Snap.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneSnap" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* iPhoneSnap */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, - D32CB25611237140007EBEB0 /* 1.png in Resources */, - D32CB25711237140007EBEB0 /* 3.png in Resources */, - D32CB25811237140007EBEB0 /* 5.png in Resources */, - D32CB2BE1123785A007EBEB0 /* Default.png in Resources */, - D32CB35B11245BCF007EBEB0 /* bar.png in Resources */, - D32CB5CA11247F75007EBEB0 /* Icon.png in Resources */, - D32CB97F1124CD1C007EBEB0 /* info.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - D32CB18F11236519007EBEB0 /* GamePiece.m in Sources */, - D32CB2DF112453BE007EBEB0 /* BoardView.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = iPhoneSnap_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone", - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator", - ); - INFOPLIST_FILE = "iPhoneSnap-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone", - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator", - ); - OTHER_LDFLAGS = "-lObjectiveChipmunk-iPhone"; - PRODUCT_NAME = Snap; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = iPhoneSnap_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone", - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator", - ); - INFOPLIST_FILE = "iPhoneSnap-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-iPhone", - "$(SRCROOT)/../Objective-Chipmunk/Objective-Chipmunk-simulator", - ); - OTHER_LDFLAGS = "-lObjectiveChipmunk-iPhone"; - PRODUCT_NAME = Snap; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - OTHER_CFLAGS = ""; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.1; - OTHER_CFLAGS = ""; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneSnap" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneSnap" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap_Prefix.pch b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap_Prefix.pch deleted file mode 100644 index 066df6430e..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/iPhoneSnap_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'iPhoneSnap' target in the 'iPhoneSnap' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/info.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/info.png deleted file mode 100644 index 195c142f70..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/info.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/main.m b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/main.m deleted file mode 100644 index c0b0732c84..0000000000 --- a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// iPhoneSnap -// -// Created by Scott Lembcke on 2/10/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - sranddev(); - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/piece.png b/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/piece.png deleted file mode 100644 index b8f1a7a81d..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/Objective-Chipmunk/iPhoneSnap/piece.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/README.txt b/3rdparty/chipmunk-5.3.4/README.txt deleted file mode 100644 index 96480b30ed..0000000000 --- a/3rdparty/chipmunk-5.3.4/README.txt +++ /dev/null @@ -1,114 +0,0 @@ -ABOUT: -Chipmunk is a simple, lightweight, fast and portable 2D rigid body physics library written in C. It's licensed under the unrestrictive, OSI approved MIT license. My aim is to give 2D developers access the same quality of physics you find in newer 3D games. I hope you enjoy using Chipmunk, and please consider donating to help make it worth our time to continue to support Chipmunk with great new features. - -CONTRACTING: -Howling Moon Software (my company) is available for contracting if you want to make the physics in your game really stand out. Given our unique experience with the library, we can help you use Chipmunk to it's fullest potential. Feel free to contact us through our webpage: http://howlingmoonsoftware.com/contracting.php - -Objective-Chipmunk: -The Objective-Chipmunk directory contains an Objective-C wrapper for the Chipmunk Physics Library as well as some sample code from shipping iPhone Apps. One reason Chipmunk was written in C was to allow easy wrapping for other languages. The primary advantages of a native Objective-C API include integrating with the Cocoa memory management model and the Chipmunk Object protocol. The Chipmunk Object protocol unifies the basic Chipmunk types as well as making it easy to create and manage custom composite collections of the basic types. Additionally, the wrapper adds many convenience methods for doing common setup tasks as well as helper methods that integrate it with the rest of the Cocoa Touch API and basic datatypes used on the iPhone. The wrapper tries to do things the Objective-C way, adding useful method variations where it makes sense to do so. If you are an iPhone developer, Objective-Chipmunk will definitely save you time. - -To try Objective-Chipmunk in your own projects see Objective-Chipmunk/Objective-Chipmunk/Readme.rtf. - -BUILDING: -Mac OS X: There is an included XCode project file for building the static library and demo application. Alternatively you could use the CMake files. A Mac OS X version of Objective-Chipmunk is available for free upon request. We don't do regular builds as few people seem interested in it. - -iPhone: If you want a native Objective-C API, check out the Objective-Chipmunk directory for the Objective-C binding and some sample code from shipping iPhone Apps. It is inexpensive to license and should save you a lot of time. Otherwise, the XCode project can build a static library with all the proper compiler settings. Alternatively, you can just run iphonestatic.command in the macosx/ directory. It will build you a fat library compiled as release for the device and debug for the simulator. After running it, you can simply drop the Chipmunk-iPhone directory into your iPhone project! - -UNIXes: A forum user was kind enough to make a set of CMake files for Chipmunk. This will require you to have CMake installed. To build run 'cmake .' then 'make'. This should build a dynamic library, a static library, and the demo application. A number of people have had build errors on Ubuntu due to not having GLUT or libxmu installed. - -Windows: Visual Studio projects are included in the msvc/ directory. I do not maintain these personally, but a number of forum members have assisted with them. - -Ruby: I've been using maintaining a Ruby extension for Chipmunk, but at this time is not up to date with all the latest changes. It has been tested and builds under Linux and OS X using CMake however 'cmake -D BUILD_RUBY_EXT=ON .; make'. A forum member has been working on an FFI based extention (http://github.com/erisdiscord/chipmunk-ffi), and that may be a better way to take advantage of Chipmunk from Ruby. Another forum user has offered to maintain the non-FFI version of the extension. Stay tuned. - -GETTING STARTED: -First of all, you can find the C API documentation in the doc/ directory. - -A good starting point is to take a look at the included Demo application. The demos all just set up a Chipmunk simulation space and the demo app draws the graphics directly out of that. This makes it easy to see how the Chipmunk API works without worrying about the graphics code. You are free to use the demo drawing routines in your own projects, though it is certainly not the recommended way of drawing Chipmunk objects as it pokes around at the undocumented parts of Chipmunk. - -If you are looking at Objective-Chipmunk for the iPhone, we have a number of example projects and tutorials in the Objective-Chipmunk directory. - -FORUM: -http://www.slembcke.net/forums - -CONTACT: -slembcke@gmail.com (also on Google Talk) - -CHANGES SINCE 5.3.3: -* FIX: cpBodyActivate() can now be called from collision and query callbacks. This way you can use the setter functions to change properties without indirectly calling cpBodyActivate() and causing an assertion. -* FIX: cpArbiterGetContactPointSet() was returning the collision points for the normals. -* FIX: cpSpaceEachBody() now includes sleeping bodies. -* FIX: Shapes attached to static rogue bodies created with cpBodyNewStatic() are added as static shapes. -* MISC: Applied a user patch to update the MSVC project and add a .def file. - -CHANGES SINCE 5.3.2: -* API: Added cpArbiteGetCount() to return the number of contact points. -* API: Added helper functions for calculating areas of Chipmunk shapes as well as calculating polygon centroids and centering polygons on their centroid. -* API: Shape queries. Query a shape to test for collisions if it were to be inserted into a space. -* API: cpBodyInitStatic() and cpBodyNewStatic() for creating additional static (rogue) bodies. -* API: cpBodySleepWithGroup() to allow you to create groups of sleeping objects that are woken up together. -* API: Added overloaded *, +, - and == operators for C++ users. -* API: Added cpSpaceActivateShapesTouchingShape() to query for and activate any shapes touching a given shape. Useful if you ever need to move a static body. -* FIX: Fixed an extremely rare memory bug in the collision cache. -* FIX: Fixed a memory leak in Objective-Chipmunk that could cause ChipmunkSpace objects to be leaked. -* MISC: C struct fields and function that are considered private have been explicitly marked as such. Defining CP_ALLOW_PRIVATE_ACCESS to 0 in Chipmunk.h will let you test which parts of the private API that you are using and give me feedback about how to build proper APIs in Chipmunk 6 for what you are trying to do. -* MISC: Allow CGPoints to be used as cpVect on Mac OS X as well as iOS. - - -CHANGES SINCE 5.3.1: -* FIX: Collision begin callbacks were being called continuously for sensors or collisions rejected from the pre-solve callback. -* FIX: Plugged a nasty memory leak when adding post-step callbacks. -* FIX: Shapes were being added to the spatial hash using an uninitialized bounding box in some cases. -* FIX: Perfectly aligned circle shapes now push each other apart. -* FIX: cpBody setter functions now call cpBodyActivate(). -* FIX: Collision handler targets are released in Objective-Chipmunk when they are no longer needed instead of waiting for the space to be deallocated. -* API: cpSpaceSegmentQuery() no longer returns a boolean. Use cpSpaceSegmentQueryFirst() instead as it's more efficient. -* NEW: cpSpaceRehashShape() Rehash an individual shape, active or static. -* NEW: cpBodySleep() Force a body to fall asleep immediately. -* NEW: cpConstraintGetImpulse() Return the most recent impulse applied by a constraint. -* NEW: Added setter functions for the groove joint endpoints. -* MISC: A number of other minor optimizations and fixes. - -CHANGES SINCE 5.3.0: - * NEW: Added a brand new tutorial for Objective-Chipmunk: SimpleObjectiveChipmunk that can be found in the Objective-Chipmunk folder. - * NEW: Proper API docs for Objective-Chipmunk. - * NEW: Updated the included Objective-Chipmunk library. - * FIX: Fixed a rare memory crash in the sensor demo. - * FIX: Fixed some warnings that users submitted. - -CHANGES SINCE 5.2.0: - * FIX: Fixed the source so it can compile as C, C++, Objective-C, and Objective-C++. - * FIX: Fixed cp_contact_persistence. It was broken so that it would forget collision solutions after 1 frame instead of respecting the value set. - * OPTIMIZATION: Several minor optimizations have been added. Though performance should only differ by a few percent. - * OPTIMIZATION: Chipmunk now supports putting bodies to sleep when they become inactive. - * API: Elastic iterations are now deprecated as they should no longer be necessary. - * API: Added API elements to support body sleeping. - * API: Added a statically allocated static body to each space for attaching static shapes to. - * API: Static shapes attached to the space's static body can simply be added to the space using cpSpaceAddShape(). - * NEW: New MSVC projects. - * NEW: Added boolean and time stamp types for clarity. - -CHANGES SINCE 5.1.0: - * OPTIMIZATION: Chipmunk structs used within the solver are now allocated linearly in large blocks. This is much more CPU cache friendly. Programs have seen up to 50% performance improvements though 15-20% should be expected. - * API: Shape references in cpArbiter structs changed to private_a and private_b to discourage accessing the fields directly and getting them out of order. You should be using cpArbiterGetShapes() or CP_ARBITER_GET_SHAPES() to access the shapes in the correct order. - * API: Added assertion error messages as well as warnings and covered many new assertion cases. - * FIX: separate() callbacks are called before shapes are removed from the space to prevent dangling pointers. - * NEW: Added convenience functions for creating box shapes and calculating moments. - - -CHANGES SINCE 5.0.0: - * FIX: fixed a NaN issue that was causing raycasts for horizontal or vertical lines to end up in an infinite loop - * FIX: fixed a number of memory leaks - * FIX: fixed warnings for various compiler/OS combinations - * API: Rejecting a collision from a begin() callback permanently rejects the collision until separation - * API: Erroneous collision type parameterns removed from cpSpaceDefaulteCollisionHandler() - * MOVE: FFI declarations of inlined functions into their own header - * MOVE: Rearranged the project structure to separate out the header files into a separate include/ directory. - * NEW: Added a static library target for the iPhone. - * NEW: Type changes when building on the iPhone to make it friendlier to other iPhone APIs - * NEW: Added an AABB query to complement point and segment queries - * NEW: CP_NO_GROUP and CP_ALL_LAYERS constants - -CHANGES SINCE 4.x: - * Brand new Joint/Constraint API: New constraints can be added easily and are much more flexible than the old joint system - * Efficient Segment Queries - Like raycasting, but with line segments. - * Brand new collision callback API: Collision begin/separate events, API for removal of objects within callbacks, more programable control over collision handling. \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/doc/doc-src/chipmunk-docs.textile b/3rdparty/chipmunk-5.3.4/doc/doc-src/chipmunk-docs.textile deleted file mode 100644 index 1b86b711d7..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/doc-src/chipmunk-docs.textile +++ /dev/null @@ -1,1325 +0,0 @@ -!images/logo1_med.png! !{float:right;}images/hms_logo.png!:http://howlingmoonsoftware.com - -* "Chipmunk Physics":#ChipmunkPhysics -* "Chipmunk Basics":#ChipmunkBasics -* "Chipmunk C API":#ChipmunkCAPI -* "Chipmunk Vectors":#cpVect -* "Chipmunk Bounding Boxes":#cpBB -* "Chipmunk Rigid Bodies":#cpBody -* "Chipmunk Collision Shapes":#cpShape -* "Chipmunk Spaces":#cpSpace -* "Chipmunk Constraints":#cpConstraint -* "Constraint Types":#ConstraintTypes -* "Overview of Collision Detection in Chipmunk":#CollisionDetection -* "Callbacks":#Callbacks -* "Chipmunk Collision Pairs":#cpArbiter -* "Queries":#Queries - - - -h1. Chipmunk Physics 5.3.4 - -First of all, Chipmunk is a 2D rigid body physics library distributed under the MIT license. It is intended to be fast, portable, numerically stable, and easy to use. For this reason it's been used in hundreds of games on every system you can name. This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! I've put thousands of hours of work over many years to make Chipmunk what it is today. If you find Chipmunk has saved you a lot of time, please consider "donating":https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6666552. You'll make an indie game developer very happy! - -First of all, I would like to give a Erin Catto a big thank you, as Chipmunk's impulse solver was directly inspired by his Box2D example code way back in 2006. (Now a full fledged physics engine all it's own: "Box2D.org":http://www.box2d.org/). His contact persistence idea allows for stable stacks of objects with very few iterations of the solver. My previous solver produced mushy piles of objects or required a large amount of CPU to operate stably. - -h2. Why a C Library? - -A lot of people ask me why I wrote Chipmunk in C instead of _pick your favorite language here_. I tend to get really excited about different programming languages. Depending on the month, take your pick of Scheme, OCaml, Ruby, Objective-C, OOC, Lua, Io... the list goes on. The one common factor between most any language is that they are usually dead simple to make bindings to C code. I wanted Chipmunk to be fast, portable, and easy to optimize. With Chipmunk weiging in at less than 7,500 lines of C code, headers and comments, I don't feel that using C has made Chipmunk difficult to develop. In fact, at times I feel it has made it easier to optimize and debug. - -That said, I've never developed a whole game in C and I probably never will. There are much more interesting languages to do that in than C with all sorts of nice features like garbage collection, closures and object oriented runtimes. Check out the "Bindings and Ports":http://code.google.com/p/chipmunk-physics/wiki/BindingsAndPorts page to see if you can use Chipmunk from your language of choice. Because Chipmunk is written in a subset of C99 it compiles cleanly as C, C++, Objective-C and Objective-C++ code, making it easy to integrate into projects in those languages. - -If you are writing iPhone games using Chipmunk, you should check out the Objective-Chipmunk wrapper that we've developed for Chipmunk. It integrates with the Objective-C memory model and provides a number of high level APIs that make writing physics based games for the iPhone even easier. While we do charge for Objective-Chipmunk, it will almost certainly save you more time than the small cost to license it. As a bonus, you'll be helping to ensure that we can afford to continue to work on Chipmunk improvements. - -h2. Limitations of a C API: - -There are two problems with C APIs. The first is that they lack operator overloading. Chipmunk defines vector operators as functions instead of allowing you to use inline operators such as *, +, and -. In practice, it's usually not a major problem for readability, but a little annoying. Chipmunk does provide overloaded operators if you are using C++. Another problem is that there is no way to mark struct field or functions as "private" in C. To get around this, I created the @CP_PRIVATE()@ macro, if you see a struct field or function defined using CP_PRIVATE it means that you shouldn't be using it as it's name or meaning might change in future versions without warning. In Chipmunk 6, it will be a hard error to access these fields or functions unless you import the _chipmunk_private.h_ header. - -h2. Support: - -The best way to get support is to visit the "Chipmunk Forums":http://www.slembcke.net/forums/viewforum.php?f=1. There are plenty of people around using Chipmunk on the just about every platform I've ever heard of. If you are working on a commercial project, Howling Moon Software (my company) is "available for contracting":http://howlingmoonsoftware.com/contracting.php. We can help with implementing custom Chipmunk behaviors, as well as priority bug fixes and performance tuning. - -h2. Contact: - -If you find any bugs in Chipmunk or this document, or have a question or comment about Chipmunk you can contact me at slembcke(at)gmail(dot)com. - -h2. License: - -Chipmunk is licensed under the MIT license. - -
-Copyright (c) 2007 Scott Lembcke
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
- -This means that you do not have to buy a license or pay to use Chipmunk in commercial projects. (Though we really appreciate donations) - -h2. Links: - -* "slembcke.net/forums":http://www.slembcke.net/forums/viewforum.php?f=1 - The official forum Chipmunk Physics forum. -* "Howling Moon Software":http://howlingmoonsoftware.com/ - My software company. -* "Objective-Chipmunk":http://howlingmoonsoftware.com/objectiveChipmunk.php - An Objective-C wrapper that makes developing Chipmunk apps on the iPhone a snap. -* "Games":http://code.google.com/p/chipmunk-physics/wiki/Games - A small list of games done with Chipmunk. -* "Bindings and Ports":http://code.google.com/p/chipmunk-physics/wiki/BindingsAndPorts - A list of bindings and ports of Chipmunk to other languages. - -
- -h1. Chipmunk Basics: - -h2. Overview: - -There are 4 basic objects you will use in Chipmunk. - -* *Rigid Bodies:* A rigid body holds the physical properties of an object. (mass, position, rotation, velocity, etc.) It does not have a shape by itself. If you’ve done physics with particles before, rigid bodies differ in that they are able to rotate. -* *Collision Shapes:* By attaching shapes to bodies, you can define the a body’s shape. You can attach as many shapes to a single body as you need to in order to define a complex shape. Shapes contain the surface properties of an object such as how much friction or elasticity it has. -* *Constraints/Joints:* Constraints and joints describe how bodies are attached to each other. -* *Spaces:* Spaces are the basic simulation unit in Chipmunk. You add bodies, shapes and joints to a space, and then update the space as a whole. - -There is often confusion between rigid bodies and their collision shapes in Chipmunk and how they relate to sprites. A sprite would be a visual representation of an object, while a collision shape is an invisible property that defines how objects should collide. Both the sprite's and the collision shape's position and rotation are controlled by a rigid body. - -h2. Initialization: - -Before you do anything else, you *must* initialize Chipmunk. Otherwise you _will_ crash as soon as the first collision is detected. - -
cpInitChipmunk(); // That is all
- -If Chipmunk was not compiled with the NDEBUG flag set, it will also print out the debug mode message and the current version number to stdout. - -h2. Memory Management the Chipmunk way: - -For many of the structures you will use, Chipmunk uses a more or less standard set of memory management functions. Take the "cpSpace":#cpSpace struct for example: - -* @cpSpaceAlloc()@ - allocates but does not initialize a "cpSpace":#cpSpace struct. -* @cpSpaceInit(cpSpace *space)@ - initializes a "cpSpace":#cpSpace struct. -* @cpSpaceDestroy(cpSpace *space)@ - frees all memory allocated by the @cpSpaceInit()@, but does not free the "cpSpace":#cpSpace struct itself. - -* @cpSpaceNew()@ - allocates and initializes a "cpSpace":#cpSpace struct. It calls @cpSpaceAlloc()@ then @cpSpaceInit()@. -* @cpSpaceFree(cpSpace *space)@ - calls @cpSpaceDestroy()@ and then frees the "cpSpace":#cpSpace struct. - -While you will probably use the new/free versions exclusively if you are using C/C++, but the alloc/init/destroy functions can be helpful when writing language extensions so that you can more easily work with a garbage collector. - -In general, you are responsible for freeing any structs that you allocate. Chipmunk does not have any fancy reference counting or garbage collection built in. - -h2. Basic Types: - -@chipmunk_types.h@ defines a number of basic types that Chipmunk uses. These can be changed at compile time to better suit your needs: -* @cpFloat@: Floating point type. Defaults to @double@. See below. -* @cpVect@: 2D vector type. "cpVect documentation":#cpVect -* @cpBool@: Like every good C library that wants good cross language compatibility, you end up defining your own boolean type. :-\ Defaults to @int@. -* @cpDataPointer@: Pointer type defined for callbacks and the user definable data pointer on most Chipmunk structs. Defaults to @void*@. -* @cpCollisionType@: Unique identifier for collision shape types. Defaults to @unsigned int@. -* @cpGroup@: Unique identifier for collision groups. Defaults to @unsigned int@. A @CP_NO_GROUP@ value is defined that can be used when you don't want to specify a group. -* @cpLayers@: Type used as the layers bitmask. Defaults to @unsigned int@. A @CP_ALL_LAYERS@ value is defined that has all layer bits set. - -*Note:* On the iPhone, @cpFloat@ is defined as @float@ and @cpVect@ is an alias for @CGPoint@ for performance and compatibility reasons. - -h2. Math the Chipmunk way: - -First of all, Chipmunk uses double precision floating point numbers throughout it's calculations by default. This is likely to be faster on most modern desktop processors, and means you have to worry less about floating point round off errors. You can change the floating point type used by Chipmunk when compiling the library. Look in @chipmunk_types.h@. - -Chipmunk defines a number of aliases for common math functions so that you can choose to use floats or doubles for Chipmunk's floating point type. In your own code, there probably isn't a strong reason to use these aliases unless you expect you might want to change Chipmunk's floating point type later and a 2% performance hit from using the wrong float/double version of math functions will matter. - -That said, there are a few functions you will probably find very useful: - -
cpFloat cpfclamp(cpFloat f, cpFloat min, cpFloat max)
- -p(expl). Clamp @f@ to be between @min@ and @max@. - -
cpFloat cpflerp(cpFloat f1, cpFloat f2, cpFloat t)
- -p(expl). Linearly interpolate between @f1@ and @f2@. - -
cpFloat cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d)
- -p(expl). Linearly interpolate from @f1@ towards @f2@ by no more than @d@. - -Floating point infinity is defined for you as @INFINITY@ if your standard math library (cough MSVC cough) doesn't define it for you. - -To represent vectors, Chipmunk defines the "cpVect":#cpVect type and a set of inline functions for working with them (cpv, cpvadd, cpvmult, etc). See the API reference for more information.. - -
- -h1. Chipmunk C API: - -h2. Main API: - -* "cpVect":#cpVect - Create and manipulate 2D vectors. -* "cpBB":#cpBB - Create and manipulate 2D axis-aligned bounding boxes. -* "cpBody":#cpBody - Create and work with rigid bodies. -* "cpShape":#cpShape - Attach collision shapes to rigid bodies. -* "cpSpace":#cpSpace - Create a "space" to put your objects into and simulate them. -* "cpConstraint":#cpConstraint - Create joints and other constraints. -* Learn about how CollisionDetection in Chipmunk works. -* Learn about Chipmunk's CallbackSystem for recieving collision events and adding custom behavior to your physics. -* Learn about "Queries":#Queries. Point queries and segment queries (raycasting). - - - -h1. Chipmunk Vectors: @cpVect@ - -h2. Struct Definition, Constants and Constructors: - -
typedef struct cpVect{
-	cpFloat x, y;
-} cpVect
- -p(expl). Simply a 2D vector packed into a struct. - -
#define cpvzero ((cpVect){0.0f, 0.0f})
- -p(expl). Constant for the zero vector. - -
cpVect cpv(const cpFloat x, const cpFloat y)
- -p(expl). Convenience constructor for creating new @cpVect@ structs. - -h2. Operations: - -
cpBool cpveql(const cpVect v1, const cpVect v2)
- -p(expl). Check if two vectors are equal. (Be careful when comparing floating point numbers!) - -
cpVect cpvadd(const cpVect v1, const cpVect v2)
-cpVect cpvsub(const cpVect v1, const cpVect v2)
- -p(expl). Add or subtract two vectors. - -
cpVect cpvneg(const cpVect v)
- -p(expl). Negate a vector. - -
cpVect cpvmult(const cpVect v, const cpFloat s)
- -p(expl). Scalar multiplication. - -
cpFloat cpvdot(const cpVect v1, const cpVect v2)
- -p(expl). Vector dot product. - -
cpFloat cpvcross(const cpVect v1, const cpVect v2)
- -p(expl). 2D vector cross product analog. The cross product of 2D vectors results in a 3D vector with only a z component. This function returns the magnitude of the z value. - -
cpVect cpvperp(const cpVect v)
- -p(expl). Returns a perpendicular vector. (90 degree rotation) - -
cpVect cpvrperp(const cpVect v)
- -p(expl). Returns a perpendicular vector. (-90 degree rotation) - -
cpVect cpvproject(const cpVect v1, const cpVect v2)
- -p(expl). Returns the vector projection of @v1@ onto @v2@. - -
cpVect cpvrotate(const cpVect v1, const cpVect v2)
- -p(expl). Uses complex multiplication to rotate @v1@ by @v2@. Scaling will occur if @v1@ is not a unit vector. - -
cpVect cpvunrotate(const cpVect v1, const cpVect v2)
- -p(expl). Inverse of @cpvrotate()@. - -
cpFloat cpvlength(const cpVect v)
- -p(expl). Returns the length of @v@. - -
cpFloat cpvlengthsq(const cpVect v)
- -p(expl). Returns the squared length of @v@. Faster than @cpvlength()@ when you only need to compare lengths. - -
cpVect cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t)
- -p(expl). Linearly interpolate between @v1@ and @v2@. - -
cpVect cpvlerpconst(const cpVect v1, const cpVect v2, const cpFloat d)
- -p(expl). Linearly interpolate between @v1@ towards @v2@ by distance @d@. - -
cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t)
- -p(expl). Spherical linearly interpolate between @v1@ and @v2@. - -
cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)
- -p(expl). Spherical linearly interpolate between @v1@ towards @v2@ by no more than angle @a@' in radians. - -
cpVect cpvnormalize(const cpVect v)
- -p(expl). Returns a normalized copy of @v@. - -
cpVect cpvnormalize_safe(const cpVect v)
- -p(expl). Returns a normalized copy of @v@ or @cpvzero@ if @v@ was already @cpvzero@. Protects against divide by zero errors. - -
cpVect cpvclamp(const cpVect v, const cpFloat len)
- -p(expl). Clamp @v@ to length @len@. - -
cpFloat cpvdist(const cpVect v1, const cpVect v2)
- -p(expl). Returns the distance between @v1@ and @v2@. - -
cpFloat cpvdistsq(const cpVect v1, const cpVect v2)
- -p(expl). Returns the squared distance between @v1@ and @v2@. Faster than @cpvdist()@ when you only need to compare distances. - -
int cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist)
- -p(expl). Returns true if the distance between @v1@ and @v2@ is less than @dist@. - -
cpVect cpvforangle(const cpFloat a)
- -p(expl). Returns the unit length vector for the given angle (in radians). - -
cpFloat cpvtoangle(const cpVect v)
- -p(expl). Returns the angular direction @v@ is pointing in (in radians). - -
char *cpvstr(const cpVect v)
- -p(expl). Returns a string representation of @v@. Intended mostly for debugging purposes and not production use. - -*NOTE:* The string points to a static local and is reset every time the function is called. If you want to print more than one vector you will have to split up your printing onto separate lines. - - - -
- -h1. Chipmunk Bounding Boxes: @cpBB@ - -h2. Struct Definition and Constructors: - -
typedef struct cpBB{
-	cpFloat l, b, r ,t;
-} cpBB
- -p(expl). Simple bounding box struct. Stored as left, bottom, right, top values. - -
cpBB cpBBNew(const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t)
- -p(expl). Convenience constructor for @cpBB@ structs. Like @cpv()@ this function returns a copy and not a malloced pointer. - -h2. Operations: - -
int cpBBintersects(const cpBB a, const cpBB b)
- -p(expl). Returns true if the bounding boxes intersect. - -
int cpBBcontainsBB(const cpBB bb, const cpBB other)
- -p(expl). Returns true if @bb@ completely contains @other@. - -
int cpBBcontainsVect(const cpBB bb, const cpVect v)
- -p(expl). Returns true if @bb@ contains @v@. - -
int cpBBmerge(const cpBB a,  const cpBB b)
- -p(expl). Return the minimal bounding box that contains both @a@ and @b@. - -
int cpBBexpand(const cpBB bb,  const cpVect v)
- -p(expl). Return the minimal bounding box that contains both @bb@ and @v@. - -
cpVect cpBBClampVect(const cpBB bb, const cpVect v)
- -p(expl). Returns a copy of @v@ clamped to the bounding box. - -
cpVect cpBBWrapVect(const cpBB bb, const cpVect v)
- -p(expl). Returns a copy of @v@ wrapped to the bounding box. - - - -
- -h1. Chipmunk Rigid Bodies: @cpBody@ - -h2. Function Types for Integration Callbacks: - -
typedef void (*cpBodyVelocityFunc)(struct cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt);
-typedef void (*cpBodyPositionFunc)(struct cpBody *body, cpFloat dt);
- -p(expl). Integration function types. You can write your own integration functions to create your own body behaviors that go beyond applying simply gravity. It's unlikely that you'll need to override the position integration function, and if you do you should carefully study how the default function (@cpBodyUpdatePosition()@) works. See the "planet demo":http://code.google.com/p/chipmunk-physics/source/browse/trunk/Demo/Planet.c#49 for an example of how to create planetary gravity. - -h2. Fields: - -* @velocity_func@ - @cpBodyVelocityFunc@: Function pointer called to update the velocity of the body. -* @position_func@ - @cpBodyPositionFunc@: Function pointer called to update the position of the body. -* @m@ - @cpFloat@: Mass of the body. -* @i@ - @cpFloat@: Moment of inertia (MoI or sometimes just moment) of the body. The moment is like the rotational mass of a body. See below for function to help calculate the moment. -* @p@ - @cpVect@: Position of the body. -* @v@ - @cpVect@: Velocity of the body. -* @f@ - @cpVect@: Current force being applied to the body. *Note:* does not reset automatically as in some physics engines. -* @a@ - @cpFloat@: Current rotation angle of the body in radians. -* @w@ - @cpFloat@: Current rotational velocity of the body. -* @t@ - @cpFloat@: Current torque being applied to the body. *Note:* does not reset automatically as in some physics engines. -* @rot@ - @cpVect@: Cached unit length rotation vector. -* @v_limit@ - @cpFloat@: Maximum speed a body may have after updating it's velocity. -* @w_limit@ - @cpFloat@: Maximum rotational speed a body may have after updating it's velocity. -* @data@ - @cpDataPointer@: A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks. - -Using the standard single letter names used in physics equations for these values probably wasn't the best idea in the long run. For me at least, it made things easier as the equations in the code looked more like the written equations I was used to. The getter/setter functions listed below may help save your sanity however. - -When changing any of a body's properties, you should also call @cpBodyActivate()@ to make sure that it is not stuck sleeping when you've changed a property that should make it move again. The @cpBodySet*()@ functions do this for you automatically. - -*Note:* @m@, @i@, and @a@ *must* be set using setter functions. The body holds on to cached values based on them. - -h2. Memory Management Functions: - -
cpBody *cpBodyAlloc(void)
-cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i)
-cpBody *cpBodyNew(cpFloat m, cpFloat i)
-
-void cpBodyDestroy(cpBody *body)
-void cpBodyFree(cpBody *body)
- -p(expl). Standard set of Chipmunk memory management functions. @m@ and @i@ are the mass and moment of inertia for the body. Guessing the mass for a body is usually fine, but guessing a moment of inertia can lead to a very poor simulation. - -h2. Creating Additional Static Bodies: - -While every @cpSpace@:#cpSpace has a built in static body that you can use, it can be convenient to make your own as well. One potential use is in a level editor. By attaching chunks of your level to static bodies, you can still move and rotate the chunks independently of each other. Then all you have to do is call @cpSpaceRehashStatic()@ to rebuild the static collision detection data when you are done. - -For more information on rogue and static bodies, see "Chipmunk Spaces":#cpSpace. - -
cpBody *cpBodyAlloc(void);
-cpBody *cpBodyInitStatic(cpBody *body)
-cpBody *cpBodyNewStatic()
- -p(expl). Create additional static bodies with infinite mass and moment of inertia. - -h2. Moment of Inertia Helper Functions: - -Use the following functions to approximate the moment of inertia for your body, adding the results together if you want to use more than one. - -
cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset)
- -p(expl). Calculate the moment of inertia for a hollow circle, @r1@ and @r2@ are the inner and outer diameters in no particular order. _(A solid circle has an inner diameter of 0)_ - -
cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b)
- -p(expl). Calculate the moment of inertia for a line segment. The endpoints @a@ and @b@ are relative to the body. - -
cpFloat cpMomentForPoly(cpFloat m, int numVerts, cpVect *verts, cpVect offset)
- -p(expl). Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex. - -
cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height)
- -p(expl). Calculate the moment of inertia for a solid box centered on the body. - -h2. Area Helper Functions: - -Use the following functions to get the area for common Chipmunk shapes if you want to approximate masses. - -
cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2)
- -p(expl). Area of a hollow circle. - -
cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r)
- -p(expl). Area of a beveled segment. (Will always be zero if radius is zero) - -
cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts)
- -p(expl). Signed area of a polygon shape. Returns a negative number for polygons with a backwards winding. - - -h2. Setters for Linked Values: - -Because several rigid body values are linked (@m@/@m_inv@, @i@/@i_inv@, @a@/@rot@), don't set them explicitly. Use the following setter functions instead. - -
void cpBodySetMass(cpBody *body, cpFloat m);
-void cpBodySetMoment(cpBody *body, cpFloat i);
-void cpBodySetAngle(cpBody *body, cpFloat a);
- -h2. Getters and Setters: - -While you *MUST* use the setters in the previous section. You are encouraged to use setters/getters for all properties. - -Getters and setters will all be of the form: - -
cpFloat cpBodyGetMass(cpBody *body)
-void cpBodySetMass(cpBody *body, cpFloat mass)
- -And the full list: - -|_. Name |_. Type |_. Read Only? | -| Mass | cpFloat | no | -| Moment | cpFloat | no | -| Pos | cpVect | no | -| Vel | cpVect | no | -| Force | cpVect | no | -| Angle | cpFloat | no | -| AngVel | cpFloat | no | -| Torque | cpFloat | no | -| Rot | cpVect | yes | - -h2. Integration Functions: - -
void cpBodySlew(cpBody *body, cpVect pos, cpFloat dt)
- -p(expl). Modify the velocity of the body so that it will move to the specified absolute coordinates in the next timestep. Intended for objects that are moved manually with a custom velocity integration function. - - - -
void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt)
- -p(expl). Default rigid body velocity integration function. Updates the velocity of the body using Euler integration. - -
void cpBodyUpdatePosition(cpBody *body, cpFloat dt)
- -p(expl). Default rigid body position integration function. Updates the position of the body using Euler integration. Unlike the velocity function, it's unlikely you'll want to override this function. If you do, make sure you understand it's source code as it's an important part of the collision/joint correction process. - -h2. Coordinate Conversion Functions: - -
cpVect cpBodyLocal2World(cpBody *body, cpVect v)
- -p(expl). Convert from body local coordinates to world space coordinates. - -
cpVect cpBodyWorld2Local(cpBody *body, cpVect v)
- -p(expl). Convert from world space coordinates to body local coordinates. - -h2. Applying Forces and Torques: - -
void cpBodyApplyImpulse(cpBody *body, cpVect j, cpVect r)
- -p(expl). Apply the impulse @j@ to @body@ at a relative offset @r@ from the center of gravity. Both @r@ and @j@ are in world coordinates. @r@ is relative to the position of the body, but not the rotation. Many people get tripped up by this. - -
void cpBodyResetForces(cpBody *body)
- -p(expl). Zero both the forces and torques accumulated on @body@. - -
void cpBodyApplyForce(cpBody *body, cpVect f, cpVect r)
- -p(expl). Apply (accumulate) the force @f@ on @body@ at a *relative offset (important!)* @r@ from the center of gravity. Both @r@ and @f@ are in world coordinates. - -h2. Sleeping Functions: - -See Chipmunk Spaces":#cpSpace for more information on Chipmunk's sleeping feature. - -
cpBool cpBodyIsSleeping(const cpBody *body)
- -p(expl). Returns true if @body@ is sleeping. - -
void cpBodySleepWithGroup(cpBody *body, cpBody *group)
- -p(expl). When objects in Chipmunk sleep, they sleep as a group of all objects that are touching or jointed together. When an object is woken up, all of the objects in it's group are woken up. Calling cpBodySleepWithGroup() forces a body to fall asleep immediately. If @group@ is @NULL@, a new group will be created. If group is another sleeping body, it will be added to that body's group. It is an error to specify a non-sleeping body for @group@. Make sure everything is set up before calling this method. Calling a setter function or adding/removing a shape or constraint will cause the body to be woken up again. Also, this function must not be called from a collision handler or query callback. Use a post-step callback instead. - -An example of how this could be used is to set up a piles of boxes that a player can knock over. Creating the piles and letting them fall asleep normally would work, but it means that all of the boxes would need to be simulated until they fell asleep. This could be slow if you had a lot of piles. Instead you can force them to sleep and start the game with the boxes already sleeping. - -Another example would be collapsing platforms. You could create a sleeping object that is suspended in the air. As soon as the player comes along to jump on it, it wakes up and starts falling. In this case, it would be impossible to have the platform fall asleep naturally. - - - -
void cpBodySleep(cpBody *body)
- -p(expl). Equivalent to calling @cpBodySleepWithGroup(body, NULL)@. It forces @body@ to fall asleep and creates a new group for it. - -
void cpBodyActivate(cpBody *body)
- -p(expl). Wake @body@ up so that it starts actively simulating again if it's sleeping, or reset the idle timer if it's active. In Chipmunk 5.3.4 and up, you can call this function from a collision or query callback. In previous versions this was an error. - -h2. Misc Functions: - -
cpBool cpBodyIsStatic(const cpBody *body)
- -p(expl). Returns true if @body@ is a static body. (cpSpace.staticBody or a static rogue body) - -
cpBool cpBodyIsRogue(const cpBody *body)
- -p(expl). Returns true if @body@ has never been added to a space. Though shapes attached to this body may still be added to a space. For more information on rogue and static bodies, see "Chipmunk Spaces":#cpSpace. - -
cpBool cpBodyIsSleeping(const cpBody *body)
- -p(expl). Returns true if @body@ is sleeping. - - -h2. Notes: - -* Use forces to modify the rigid bodies if possible. This will be the most stable. -* Modifying a body's velocity shouldn't necessarily be avoided, but applying large changes every frame can cause strange results in the simulation. Experiment freely, but be warned. -* *Don't* modify a body's position every step unless you really know what you are doing. Otherwise you're likely to get the position/velocity badly out of sync. - -
- -h1. Chipmunk Collision Shapes: @cpShape@ - -There are currently 3 collision shape types: - -* *Circles*: Fastest and simplest collision shape. -* *Line segments*: Meant mainly as a static shape. They can be attached to moving bodies, but they don't currently generate collisions with other line segments. Can be beveled in order to give them a thickness. -* *Convex polygons*: Slowest, but most flexible collision shape. - -You can add multiple shapes to a body. This should give you the flexibility to make any shape you want as well providing different areas of the same object with different friction, elasticity or callback values. - -h2. Fields: - -When creating different types of shapes, you will always be given a @cpShape*@ pointer back. This is because Chipmunk shapes are meant to be opaque types. Think of the specific collision types such as @cpCircleShape@, @cpSegmentShape@ and @cpPolyShape@ as private subclasses of @cpShape@. You can still read some properties from them using the getter functions, but you are not intended to cast @cpShape@ pointers to their specific types. - -* @body@ - @cpBody*@: The rigid body the shape is attached to. -* @bb@ - @cpBB@: The bounding box of the shape. Only guaranteed to be valid after @cpShapeCacheBB()@ or @cpSpaceStep()@ is called. Moving a body that a shape is connected to does not update it's bounding box. -* @sensor@ - @cpBool@: A boolean value if this shape is a sensor or not. Sensors only call collision callbacks, and never generate real collisions. -* @e@ - @cpFloat@: Elasticity of the shape. A value of 0.0 gives no bounce, while a value of 1.0 will give a "perfect" bounce. However due to inaccuracies in the simulation using 1.0 or greater is not recommended however. _See the notes at the end of the section._ -* @u@ - @cpFloat@: Friction coefficient. Chipmunk uses the Coulomb friction model, a value of 0.0 is frictionless. "Tables of friction coefficients":http://www.roymech.co.uk/Useful_Tables/Tribology/co_of_frict.htm. _See the notes at the end of the section._ -* @surface_v@ - @cpVect@: The surface velocity of the object. Useful for creating conveyor belts or players that move around. This value is only used when calculating friction, not resolving the collision. -* @collision_type@ - @cpCollisionType@: You can assign types to Chipmunk collision shapes that trigger callbacks when objects of certain types touch. See the "callbacks section":#Callbacks or an "example":examples.html#CollisionCallbacks for more information. -* @group@ - @cpCollisionGroup@: Shapes in the same non-zero group do not generate collisions. Useful when creating an object out of many shapes that you don't want to self collide. Defaults to @CP_NO_GROUP@. -* @layers@ - @cpLayers@: Shapes only collide if they are in the same bit-planes. i.e. @(a->layers & b->layers) != 0@ By default, a shape occupies all bit-planes. "Wikipedia":http://en.wikipedia.org/wiki/Mask_(computing)#top has a nice article on bitmasks if you are unfamiliar with how to use them. Defaults to @CP_ALL_LAYERS@. -* @data@ - @cpDataPointer@: A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks. - -h2. Filtering Collisions: - -Chipmunk has two primary means of ignoring collisions: groups and layers. - -Groups are meant to ignore collisions between parts on a complex object. A ragdoll is a good example. When jointing an arm onto the torso, you'll want them to allow them to overlap. Groups allow you to do exactly that. Shapes that have the same group don't generate collisions. So by placing all of the shapes in a ragdoll in the same group, you'll prevent it from colliding against other parts of itself. - -Layers allow you to separate collision shapes into mutually exclusive planes. Shapes can be in more than one layer, and shapes only collide with other shapes that are in at least one of the same layers. As a simple example, say shape A is in layer 1, shape B is in layer 2, and shape C is in layer 1 and 2. Shape A and B won't collide with each other, but shape C will collide with both A and B. - -Layers can also be used to set up rule based collisions. Say you have four types of shapes in your game. The player, the enemies, player bullets and enemy bullets. The are that the player should collide with enemies, and bullets shouldn't collide with the type (player or enemy) that fired them. Making a chart would look like this: - -| | Player | Enemy | Player Bullet | Enemy Bullet | -| Player | - | (1) | | (2) | -| Enemy | - | - | (3) | | -| Player Bullet | - | - | - | | -| Enemy Bullet | - | - | - | - | - -The '-'s are for redundant spots in the chart, and the numbers are spots where types should collide. You can use a layer for rule that you want to define. Then add the layers to each type: The player should be in layers 1 and 2, the enemy should be in layers 1 and 3, the player bullets should be in layer 3, and the enemy bullets should be in layer 2. Treating layers as rules this way, you can define up to 32 rules. The default @cpLayers@ type is @unsigned int@ which has a resolution of 32 bits on most systems. Redefine it if you need more to work with. - -There is one last way of filtering collisions using collision handlers. See the "section on callbacks":#Callbacks for more information. While collision handlers can be more flexible, they are also the slowest method. So you try to use groups or layers first. - -h2. Memory Management Functions: - -
void cpShapeDestroy(cpShape *shape)
-void cpShapeFree(cpShape *shape)
- -p(expl). @Destroy@ and @Free@ functions are shared by all shape types. Allocation and initialization functions are specific to each shape type. See below. - -h2. Shape Operations: - -
cpBB cpShapeCacheBB(cpShape *shape)
- -p(expl). Updates and returns the bounding box of @shape@. - -
void cpResetShapeIdCounter(void)
- -p(expl). Chipmunk keeps a counter so that every new shape is given a unique hash value to be used in the spatial hash. Because this affects the order in which the collisions are found and handled, you can reset the shape counter every time you populate a space with new shapes. If you don't, there might be (very) slight differences in the simulation. - -h2. Working With Circle Shapes: - -
cpCircleShape *cpCircleShapeAlloc(void)
-cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset)
-cpShape *cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset)
- -p(expl). @body@ is the body to attach the circle to, @offset@ is the offset from the body's center of gravity in body local coordinates. - -
cpVect cpCircleShapeGetOffset(cpShape *circleShape)
-cpFloat cpCircleShapeGetRadius(cpShape *circleShape)
- -p(expl). Getters for circle shape properties. Passing as non-circle shape will throw an assertion. - -h2. Working With Segment Shapes: - -
cpSegmentShape* cpSegmentShapeAlloc(void)
-cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius)
-cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius)
- -p(expl). @body@ is the body to attach the segment to, @a@ and @b@ are the endpoints, and @radius@ is the thickness of the segment. - -
cpVect cpSegmentShapeGetA(cpShape *shape)
-cpVect cpSegmentShapeGetA(cpShape *shape)
-cpVect cpSegmentShapeGetNormal(cpShape *shape)
-cpFloat cpSegmentShapeGetRadius(cpShape *shape)
- -p(expl). Getters for segment shape properties. Passing a non-segment shape will throw an assertion. - -h2. Working With Polygon Shapes: - -
cpPolyShape *cpPolyShapeAlloc(void)
-cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset)
-cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset)
- -p(expl). @body@ is the body to attach the poly to, @verts@ is an array of @cpVect@ structs defining a convex hull with a clockwise winding, @offset@ is the offset from the body's center of gravity in body local coordinates. An assertion will be thrown the vertexes are not convex or do not have a clockwise winding. - -
int cpPolyShapeGetNumVerts(cpShape *shape)
-cpVect cpPolyShapeGetVert(cpShape *shape, int index)
- -p(expl). Getters for poly shape properties. Passing a non-poly shape or an index that does not exist will throw an assertion. - -h2. Poly Shape Helper Functions: - -
cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts)
- -p(expl). Calculate the centroid for a polygon. - -
void cpRecenterPoly(const int numVerts, cpVect *verts)
- -p(expl). Center a polygon to (0,0). Subtracts the centroid from each vertex. - -h2. Modifying cpShapes: - -The short answer is that you can't because the changes would be only picked up as a change to the position of the shape's surface, but not it's velocity. The long answer is that you can using the "unsafe" API as long as you realize that doing so will not result in realistic physical behavior. These extra functions are define in a separate header @chipmunk_unsafe.h@. - -h2. Notes: - -* You can attach multiple collision shapes to a rigid body. This should allow you to create almost any shape you could possibly need. -* Shapes attached to the same rigid body will never generate collisions. You don't have to worry about overlap when attaching multiple shapes to a rigid body. -* The amount of elasticity applied during a collision is determined by multiplying the elasticity of both shapes together. The same is done for determining the friction. If you want to override this default behavior, you can do so inside of a preSolve collision callback. See the "Chipmunk Callbacks":#ChipmunkCallbacks section for more information. -* Make sure you add both the body and it's collision shapes to a space. The exception is when you want to have a static body or a body that you integrate yourself. In that case, only add the shape. - -
- -h1. Chipmunk Spaces: @cpSpace@ - -Spaces in Chipmunk are the basic unit of simulation. You add rigid bodies, shapes and constraints to it and then step them forward through time. - -h2. What Are Iterations, and Why Should I care? - -Chipmunk uses an iterative solver to figure out the forces between objects in the space. What this means is that it builds a big list of all of the collisions, joints, and other constraints between the bodies and makes several passes over the list considering each one individually. The number of passes it makes is the iteration count, and each iteration makes the solution more accurate. If you use too many iterations, the physics should look nice and solid, but may use up too much CPU time. If you use too few iterations, the simulation may seem mushy or bouncy when the objects should be solid. Setting the number of iterations lets you balance between CPU usage and the accuracy of the physics. Chipmunk's default of 10 iterations is sufficient for most simple games. - -h2. Rogue and Static Bodies: - -Rogue bodies are bodies that have not been added to the space, but are referenced from shapes or joints. Rogue bodies are a common way of controlling moving elements in Chipmunk such as platforms. As long as the body's velocity matches the changes to it's position, there is no problem with doing this. Most games will not need rogue bodies however. - -In previous versions, Chipmunk used infinite mass rogue bodies to attach static shapes to. Creating and maintaining your own body for this is no longer necessary as each space has it's own body for attaching static shapes to. This body is marked as being a _static body_. A static body allows other objects resting on or jointed to it to fall asleep even though it does not fall asleep itself. Additional static bodies can be created using @cpBodyNewStatic()@ or @cpBodyInitStatic()@. Objects resting on or jointed to rogue bodies can never fall asleep. This is because the purpose of rogue bodies are to allow the programmer to move or modify them at any time. Without knowing when they will move, Chipmunk has to assume that objects cannot fall asleep when touching them. - -h2. Static Shapes: - -Chipmunk optimizes collision detection against shapes that do not move. There are two ways that Chipmunk knows a shape is static. - -The first is automatic. When adding or removing shapes attached to static bodies, Chipmunk knows to handle them specially and you just use the same functions as adding regular dynamic shapes, @cpSpaceAddShape()@ and @cpSpaceRemoveShape()@. - -The second way is to explicitly tag shapes as static using @cpSpaceAddStaticShape()@. This is rarely needed, but say for instance that you have a rogue body that seldomly moves. In this case, adding a shape attached to it as a static shape and updating it only when the body moves can increase performance. Shapes added this way must be removed by calling @cpSpaceRemoveStaticShape()@. - -Because static shapes aren't updated automatically, you must let Chipmunk know that it needs to update the static shapes. You can update all of the static shapes at once using @cpSpaceRehashStatic()@ or individual shapes using @cpSpaceRehashShape()@. If you find yourself rehashing static bodies often, you should be adding them normally using @cpSpaceAddShape()@ instead. - -h2. Sleeping - -New in Chipmunk 5.3 is the ability of spaces to disable entire groups of objects that have stopped moving to save CPU time as well as battery life. In order to use this feature you must do 2 things. The first is that you must attach all your static geometry to static bodies. Objects cannot fall asleep if they are touching a non-static rogue body even if it's shapes were added as static shapes. The second is that you must enable sleeping explicitly by choosing a time threshold value for @cpSpace.sleepTimeThreshold@. If you do not set @cpSpace.idleSpeedThreshold@ explicitly, a value will be chosen automatically based on the current amount of gravity. - -h2. Fields: - -* @iterations@ - @int@: Allow you to control the accuracy of the solver. Defaults to 10. See the section on iterations above for an explanation. -* @gravity@ - @cpVect@: Global gravity applied to the space. Defaults to @cpvzero@. Can be overridden on a per body basis by writing custom integration functions. -* @damping@ - @cpFloat@: Amount of viscous damping to apply to the space. A value of 0.9 means that each body will lose 10% of it's velocity per second. Defaults to 1. Like @gravity@ can be overridden on a per body basis. -* @idleSpeedThreshold@ - @cpFloat@: Speed threshold for a body to be considered idle. The default value of 0 means to let the space guess a good threshold based on gravity. -* @sleepTimeThreshold@ - @cpFloat@: Time a group of bodies must remain idle in order to fall asleep. The default value of @INFINITY@ disables the sleeping algorithm. -* @staticBody@ - @cpBody@: A statically allocated infinite mass body that the space uses to substitute for NULL bodies on shapes and constraints. Set the @space->staticBody.data@ pointer to something helpful if you want to have some context from within callbacks. - -h2. Memory Management Functions: - -
cpSpace* cpSpaceAlloc(void)
-cpSpace* cpSpaceInit(cpSpace *space)
-cpSpace* cpSpaceNew()
-
-void cpSpaceDestroy(cpSpace *space)
-void cpSpaceFree(cpSpace *space)
- -p(expl). More standard Chipmunk memory functions. - -
void cpSpaceFreeChildren(cpSpace *space)
- -p(expl). This function will free all of the shapes, bodies and joints that have been added to @space@. Does not free @space@. You will still need to call @cpSpaceFree()@ on your own. You will probably never use this in a real game, as your gamestate or game controller should manage removing and freeing objects from the space. - -h2. Operations: - -
void cpSpaceAddShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddBody(cpSpace *space, cpBody *body)
-void cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint)
-
-void cpSpaceRemoveShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveBody(cpSpace *space, cpBody *body)
-void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint)
- -p(expl). These functions add and remove shapes, bodies and constraints from @space@. See the section on Static Shapes above for an explanation of what a static shape is and how it differs from a normal shape. Also, you cannot call the any of these functions from within a callback other than a post-step callback (which is different than a post-solve callback!). Attempting to add or remove objects from the space while @cpSpaceStep()@ is still executing will throw an assertion. See the "callbacks section":#Callbacks for more information. - -h2. Misc: - -
void cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape)
- -p(expl). Perform a query for all shapes touching @shape@ and call @cpBodyActivate()@ on them. This is useful when you need to move a shape explicitly. Waking shapes touching the moved shape prevents objects from sleeping when the floor is moved or something similar. You only need to do this when changing the shape of an existing shape or moving a static shape. Most other methods of moving a shape automatically would wake up other touching objects. - -h2. Spatial Hash Management Functions: - -Chipmunk uses a spatial hash to accelerate it's collision detection. While it's not necessary to interact with the hash directly. The current API does expose some of this at the space level to allow you to tune it's performance. - -
void cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count)
-void cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count)
- -p(expl). The spatial hash data structures used by Chipmunk's collision detection are fairly size sensitive. @dim@ is the size of the hash cells. Setting @dim@ to the average collision shape size is likely to give the best performance. Setting @dim@ too small will cause the shape to be inserted into many cells, setting it too low will cause too many objects into the same hash slot. - -@count@ is the _suggested_ minimum number of cells in the hash table. If there are too few cells, the spatial hash will return many false positives. Too many cells will be hard on the cache and waste memory. the Setting @count@ to ~10x the number of objects in the space is probably a good starting point. Tune from there if necessary. By default, @dim@ is 100.0, and @count@ is 1000. The new demo program has a visualizer for the static hash. You can use this to get a feel for how to size things up against the spatial hash. - -Using the spatial has visualization in the demo program you can see what I mean. The grey squares represent cells in the spatial hash. The darker the cell, the more objects have been mapped into that cell. A good @dim@ size is when your objects fit nicely into the grid: - -!images/hash_just_right.png! - -Notice the light grey meaning that each cell doesn't have too many objects mapped onto it. - -When you use too small a size, Chipmunk has to insert each object into a lot of cells. This can get expensive. - -!images/hash_too_small.png! - -Notice that the grey cells are very small compared to the collision shapes. - -When you use too big of a size, a lot of shapes will fit into each cell. Each shape has to be checked against every other shape in the cell, so this makes for a lot of unnecessary collision checks. - -!images/hash_too_big.png! - -Notice the dark grey cells meaning that many objects are mapped onto them. - -
void cpSpaceRehashStatic(cpSpace *space)
- -p(expl). Rehashes the shapes in the static spatial hash. You must call this if you move any static shapes or Chipmunk won't update their collision detection data. - -
void cpSpaceRehashShape(cpSpace *space, cpShape *shape)
- -p(expl). Update an individual static shape that has moved. - - -h2. Simulating the Space: - -
void cpSpaceStep(cpSpace *space, cpFloat dt)
- -p(expl). Update the space for the given time step. Using a fixed time step is _highly_ recommended. Doing so will increase the efficiency of the contact persistence, requiring an order of magnitude fewer iterations and CPU usage. - - -h2. Notes: - -* When removing objects from the space, make sure you remove any other objects that reference it. For instance, when you remove a body, remove the joints and shapes attached to it. -* The number of iterations, and the size of the time step determine the quality of the simulation. More iterations, or smaller time steps increase the quality. Keep in mind that higher quality also means higher CPU usage. -* Because static shapes are only rehashed when you request it, it's possible to use a much higher @count@ argument to @cpHashResizeStaticHash()@ than to @cpSpaceResizeActiveHash()@. Doing so will use more memory but can improve performance if you have a lot of static shapes. - -
- -h1. Chipmunk Constraints: @cpConstraint@ - -A constraint is something that describes how two bodies interact with each other. (how they constrain each other) Constraints can be simple joints that allow bodies to pivot around each other like the bones in your body, or they can be more abstract like the gear joint or motors. - -h2. What constraints are and what they are not: - -Constraints in Chipmunk are all velocity based constraints. This means that they act primarily by synchronizing the velocity of two bodies. A pivot joint holds two anchor points on two separate bodies together by defining equations that say that the velocity of the anchor points must be the same and calculating impulses to apply to the bodies to try and keep it that way. A constraint takes a velocity as it's primary input and produces a velocity change as it's output. Some constraints, (joints in particular) apply velocity changes to correct differences in positions. More about this in the next section. - -A spring connected between two bodies is not a constraint. It's very constraint-like as it creates forces that affect the velocities of the two bodies, but a spring takes distances as input and produces forces as it's output. If a spring is not a constraint, then why do I have two varieties of spring constraints you ask? The reason is because they are _damped springs_. The damping associated with the spring is a true constraint that creates velocity changes based on the relative velocities of the two bodies it links. As it is convenient to put a damper and a spring together most of the time, I figured I might as well just apply the spring force as part of the constraint instead of having a damper constraint and having the user calculate and apply their own spring forces separately. - -h2. Fields: - -* @a@ - @cpBody*@: The first body that the constraint acts on. -* @b@ - @cpBody*@: The second body that the constraint acts on. -* @maxForce@ - @cpFloat@: is the maximum force that the constraint can use to act on the two bodies. Defaults to INFINITY. -* @biasCoef@ - @cpFloat@: is the percentage of error corrected each step of the space. (Can cause issues if you don't use a constant time step) Defaults to 0.1. -* @maxBias@ - @cpFloat@: is the maximum speed at which the constraint can apply error correction. Defaults to INFINITY. -* @data@ - @cpDataPointer@: A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks. - -To access properties of specific joint types, use the getter and setter functions provided (ex: @cpPinJointGetAnchr1()@). See the lists of properties for more information. - -h2. Error correction by Feedback: - -Joints in Chipmunk are not perfect. A pin joint can't maintain the exact correct distance between it's anchor points, nor can a pivot joint hold it's anchor points completely together. Instead, they are designed to deal with this by correcting themselves over time. In Chipmunk 5, you have a fair amount of extra control over how joints correct themselves and can even use this ability to create physical effects that allow you to use joints in unique ways: - -* Servo motors - Ex: open/close doors or rotate things without going over a maximum force. -* Winches - Pull one object towards another at a constant speed without going over a maximum force. -* Mouse manipulation - Interact with objects smoothly given coarse/shaky mouse input. - -There are three public fields of cpConstraint structs that control the error correction, @maxForce@, @maxBias@, and @biasCoef@. @maxForce@ is pretty self explanatory, a joint or constraint will not be able to use more than this amount of force in order to function. If it needs more force to be able to hold itself together, it will fall apart. @maxBias@ is the maximum speed at which error correction can be applied. If you change a property on a joint so that the joint will have to correct itself, it normally does so very quickly. By setting a maxSpeed you can make the joint work like a servo, correcting itself at a constant rate over a longer period of time. Lastly, @biasCoef@ is the percentage of error corrected every step before clamping to a maximum speed. You can use this to make joints correct themselves smoothly instead of at a constant speed, but is probably the least useful of the three properties by far. - - - -h2. Constraints and Collision Shapes: - -Neither constraints or collision shapes have any knowledge of the other. When connecting joints to a body the anchor points don't need to be inside of any shapes attached to the body and it often makes sense that they shouldn't. Also, adding a constraint between two bodies doesn't prevent their collision shapes from colliding. In fact, this is the primary reason that the collision group property exists. - -h2. Video Tour of Current Joint Types. (Requires connection to YouTube) - - - -h2. Shared Memory Management Functions: - -
void cpConstraintDestroy(cpConstraint *constraint)
-void cpConstraintFree(cpConstraint *constraint)
- -p(expl). @Destroy@ and @Free@ functions are shared by all joint types. Allocation and initialization functions are specific to each joint type. - -h2. Misc Functions: - -
cpFloat cpConstraintGetImpulse(cpConstraint *constraint)
- -p(expl). Get the most recent impulse that @constraint@ applied. To convert this to a force, divide by the timestep passed to @cpSpaceStep()@. - -
- -h1. Constraint Types: - -h2. Pin Joints: - -
cpPinJoint *cpPinJointAlloc(void)
-cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-cpConstraint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
- -p(expl). @a@ and @b@ are the two bodies to connect, and @anchr1@ and @anchr2@ are the anchor points on those bodies. The distance between the two anchor points is measured when the joint is created. If you want to set a specific distance, use the setter function to override it. - -*Properties List:* - -|_. Name |_. Type | -| Anchr1 | cpVect | -| Anchr2 | cpVect | -| Dist | cpFloat | - -h2. Slide Joints: - -
cpSlideJoint *cpSlideJointAlloc(void)
-
-cpSlideJoint *cpSlideJointInit(
-	cpSlideJoint *joint, cpBody *a, cpBody *b,
-	cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max
-)
-
-cpConstraint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max)
- -p(expl). @a@ and @b@ are the two bodies to connect, @anchr1@ and @anchr2@ are the anchor points on those bodies, and @min@ and @max@ define the allowed distances of the anchor points. - -*Properties List:* - -|_. Name |_. Type | -| Anchr1 | cpVect | -| Anchr2 | cpVect | -| Min | cpFloat | -| Max | cpFloat | - -h2. Pivot Joints: - -
cpPivotJoint *cpPivotJointAlloc(void)
-cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect pivot)
-cpConstraint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot)
-cpConstraint *cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
- -p(expl). @a@ and @b@ are the two bodies to connect, and @pivot@ is the point in world coordinates of the pivot. Because the pivot location is given in world coordinates, you must have the bodies moved into the correct positions already. Alternatively you can specify the joint based on a pair of anchor points, but make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space. - -*Properties List:* - -|_. Name |_. Type | -| Anchr1 | cpVect | -| Anchr2 | cpVect | - -h2. Groove Joint: - -
cpGrooveJoint *cpGrooveJointAlloc(void)
-
-cpGrooveJoint *cpGrooveJointInit(
-	cpGrooveJoint *joint, cpBody *a, cpBody *b,
-	cpVect groove_a, cpVect groove_b, cpVect anchr2
-)
-
-cpConstraint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2)
- -p(expl). The groove goes from @groov_a@ to @groove_b@ on body @a@, and the pivot is attached to @anchr2@ on body @b@. All coordinates are body local. - -*Properties List:* - -|_. Name |_. Type | -| Anchr2 | cpVect | -| GrooveA | cpVect | -| GrooveB | cpVect | - -h2. Damped Spring: - -
cpDampedSpring *cpDampedSpringAlloc(void)
-
-cpDampedSpring *cpDampedSpringInit(
-	cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2,
-	cpFloat restLength, cpFloat stiffness, cpFloat damping
-)
-
-cpConstraint *cpDampedSpringNew(
-	cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2,
-	cpFloat restLength, cpFloat stiffness, cpFloat damping
-)
- -p(expl). Defined much like a slide joint. @restLength@ is the distance the spring wants to be, @stiffness@ is the spring constant ("Young's modulus":http://en.wikipedia.org/wiki/Young's_modulus), and @damping@ is how soft to make the damping of the spring. - -*Properties List:* - -|_. Name |_. Type | -| Anchr1 | cpVect | -| Anchr2 | cpVect | -| RestLength | cpFloat | -| Stiffness | cpFloat | -| Damping | cpFloat | - -h2. Damped Rotary Spring: - -
cpDampedRotarySpring *cpDampedRotarySpringAlloc(void)
-
-cpDampedRotarySpring *cpDampedRotarySpringInit(
-	cpDampedRotarySpring *joint, cpBody *a, cpBody *b,
-	cpFloat restAngle, cpFloat stiffness, cpFloat damping
-)
-
-cpConstraint *cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping)
- -p(expl). Like a damped spring, but works in an angular fashion. @restAngle@ is the relative angle in radians that the bodies want to have, @stiffness@ and @damping@ work basically the same as on a damped spring. - -*Properties List:* - -|_. Name |_. Type | -| RestAngle | cpFloat | -| Stiffness | cpFloat | -| Damping | cpFloat | - -h2. Rotary Limit Joint: - -
cpRotaryLimitJoint *cpRotaryLimitJointAlloc(void)
-cpRotaryLimitJoint *cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max)
-cpConstraint *cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max)
- -p(expl). Constrains the relative rotations of two bodies. @min@ and @max@ are the angular limits in radians. It is implemented so that it's possible to for the range to be greater than a full revolution. - -*Properties List:* - -|_. Name |_. Type | -| Min | cpFloat | -| Max | cpFloat | - -h2. Ratchet Joint: - -
cpRatchetJoint *cpRatchetJointAlloc(void);
-cpRatchetJoint *cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
-cpConstraint *cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
- -p(expl). Works like a socket wrench. @ratchet@ is the distance between "clicks", @phase@ is the initial offset to use when deciding where the ratchet angles are. - -*Properties List:* - -|_. Name |_. Type | -| Angle | cpFloat | -| Phase | cpFloat | -| Ratchet | cpFloat | - -h2. Gear Joint: - -
cpGearJoint *cpGearJointAlloc(void);
-cpGearJoint *cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
-cpConstraint *cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
- -p(expl). Keeps the angular velocity ratio of a pair of bodies constant. @ratio@ is always measured in absolute terms. It is currently not possible to set the ratio in relation to a third body's angular velocity. @phase@ is the initial angular offset of the two bodies. - -*Properties List:* - -|_. Name |_. Type | -| Phase | cpFloat | -| Ratio | cpFloat | - -h2. Simple Motor: - -
cpSimpleMotor *cpSimpleMotorAlloc(void);
-cpSimpleMotor *cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate);
-cpConstraint *cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate);
- -p(expl). Keeps the relative angular velocity of a pair of bodies constant. @rate@ is the desired relative angular velocity. You will usually want to set an force (torque) maximum for motors as otherwise they will be able to apply a nearly infinite torque to keep the bodies moving. - -*Properties List:* - -|_. Name |_. Type | -| Rate | cpFloat | - -h2. Notes: - -* You can add multiple joints between two bodies, but make sure that they don't fight. Doing so can cause the bodies jitter or spin violently. - -
- -h1. Overview of Collision Detection in Chipmunk: - -In order to make collision detection in Chipmunk as fast as possible, the process is broken down into several stages. While I've tried to keep it conceptually simple, the implementation can be a bit daunting. Fortunately as a user of the library, you don't need to understand everything about how it works. If you are trying to squeeze every ounce of performance out of Chipmunk, understanding this section is crucial. - -h2. Magic Collision Detection Globals: - -Chipmunk contains a few global variables that control how collisions are solved. They can't be set on a per space basis, but most games wont need to change them at all. - -
extern cpFloat cp_bias_coef
- -p(expl). Because Chipmunk does not perform swept collisions, shapes may overlap. Each time you call @cpSpaceStep()@ Chipmunk fixes a percentage of the overlap to push the shapes apart. By default, this value is set to 0.1. With this setting, after 15 steps the overlap will be reduced to 20%, after 30 it will be reduced to 4%. This is usually satisfactory for most games. Setting cp_bias_coef to 1.0 is not recommended as it will reduce the stability of stacked objects. - -
extern cpFloat cp_collision_slop
- -p(expl). Chipmunk's impulse solver works by caching the last solution as it is likely to be very similar to the current one. In order to help keep objects touching, Chipmunk allows objects to overlap a small amount. By default this value is 0.1. If you are using pixel coordinates you won't even notice. If using a different scale, adjust the value to be as high as possible without creating any unwanted visual overlap. - -
extern cpTimestamp cp_contact_persistence
- -p(expl). This is how many steps the space should remember old contact solutions. The default value is 3 and it's unlikely that you'll need to change it. - -h2. Spatial Hashing: - -Chipmunk uses a spatial hash for its broad phase culling. Spatial hashes are very efficient for a scene made up of consistently sized objects. It basically works by taking the axis aligned bounding boxes for all the objects in the scene, mapping them onto an infinite sized grid, then mapping those grid cells onto a finite sized hash table. This way, you only have to check collisions between objects in the same hash table cells, and mapping the objects onto the grid can be done fairly quickly. Objects in the same hash table cells tend to be very close together, and therefore more likely to be colliding. The downside is that in order to get the best performance out of a spatial hash, you have to tune the size of the grid cells and the size of the hash table so you don't get too many false positives. For more information about tuning the hash see the "cpSpace":#cpSpace section. - -Things to keep in mind: -* Using too small a grid size means that your objects will be split into many grid cells which means that the spatial hash will spend a lot of time filling empty hash cells for just one object and rarely finding any with multiple objects. Making the grid size too big means that you will be putting a lot of objects into a single hash cell, and collisions will have to be checked between all of them. -* Using too small of a hash table means that you will map too many far away objects into a single hash cell. Using too many means that the hash table will have to spend a lot of time doing clears and rehashes. - -For more information on spatial hashing in general, "Optimized Spatial Hashing for Collision Detection of Deformable Objects":http://www.beosil.com/download/CollisionDetectionHashing_VMV03.pdf is a good paper that covers all the basics. - -h2. Collision Filtering: - -After the spatial hash figures out pairs of shapes that are likely to be near each other, it passes them back to the space to perform some additional filtering on the pairs. If the pairs pass all the filters, then Chipmunk will test if the shapes are actually overlapping. If the shape to shape collision check passes, then the collision handler callbacks are called. These tests are much faster to try than the shape to shape collision checks, so use these if you can to reject collisions early instead of rejecting them from callbacks if you can. - -* *Bounding Box Test:* The shapes are not colliding if their bounding boxes are not overlapping. You can't really affect this, but this is when it's done. -* *Layer Test:* The shapes are not colliding if they don't occupy and of the same layers. (the bitwise AND of their layer masks is 0) -* *Group Test:* Shapes shouldn't collide with other shapes in the same non-zero group. - -h2. Primitive Shape to Shape Collision Detection: - -The most expensive test that you can do to see if shapes should collide is to actually check based on their geometry. Circle to circle and circle to line collisions are pretty quick. Poly to poly collisions get more expensive as the number of vertexes increases. Simpler shapes make for faster collisions (and more importantly fewer collision points for the solver to run). - -h2. Collision Handler Filtering: - -After checking if two shapes overlap Chipmunk will look to see if you have defined a collision handler for the collision types of the shapes. This gives you a large amount of flexibility to process collisions events, but also gives you a very flexible way to filter out collisions. The return value of the begin and preSolve callback determines whether or not the colliding pair of shapes is discarded or not. Returning true will keep the pair, false will discard it. If you don't define a handler for the given collision_types, Chipmunk will call the space's default handler, which by default is defined to simply accept all collisions. - -While using callbacks to filter collisions is the most flexible way, keep in mind that by the time your callback is called all of the most expensive collision detection has already been done. For simulations with a lot of colliding objects each frame, the time spent finding collisions is small compared to the time spent solving the physics for them so it may not be a big deal. Still, use layers or groups first if you can. - -
- -h1. Callbacks: - -A physics library without any events or feedback would not be very useful for games. How would you know when the player bumped into an enemy so that you could take some health points away? How would you know how hard the car hit something so you don't play a loud crash noise when a pebble hits it? What if you need to decide if a collision should be ignored based on specific conditions, like implementing one way platforms? Chipmunk has a number of powerful callback systems that you can plug into to accomplish all of that. - -h2. Collision Handlers: - -A collision handler is a set of 4 function callbacks for the different collision events that Chipmunk recognizes. The event types are: -* *Begin:* Two shapes just started touching for the first time this step. Return true from the callback to process the collision normally or false to cause Chipmunk to ignore the collision entirely. If you return false, the pre-solve and post-solve callbacks will never be run, but you will still recieve a separate event when the shapes stop overlapping. -* *Pre-Solve:* Two shapes are touching during this step. Return false from the callback to make Chipmunk ignore the collision this step or true to process it normally. Additionally, you may override collision values such as cpArbiter.e and cpArbiter.u to provide custom friction or elasticity values. See "cpArbiter":#cpArbiter for more info. -* *Post-Solve:* Two shapes are touching and their collision response has been processed. You can retrieve the collision force at this time if you want to use it to calculate sound volumes or damage amounts. See "cpArbiter":#cpArbiter for more info. -* *Separate:* Two shapes have just stopped touching for the first time this step. - -Collision callbacks are closely associated with "cpArbiter":#cpArbiter structs. You should familiarize yourself with those as well. - -*Note:* Shapes tagged as sensors (@cpShape.sensor == true@) never generate collisions that get processed so collisions between sensors shapes and other shapes will never call the post-solve callback. They still generate begin, and separate callbacks, and the pre solve callback is also called every frame even though there is no real collision. - -h2. Collision Handler API: - -
typedef int (*cpCollisionBeginFunc)(cpArbiter *arb, struct cpSpace *space, void *data)
-typedef int (*cpCollisionPreSolveFunc)(cpArbiter *arb, cpSpace *space, void *data)
-typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, cpSpace *space, void *data)
-typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, cpSpace *space, void *data)
- -p(expl). Collision handler function types. While all of them take an arbiter, space, and a user data pointer, only the begin and pre-solve callbacks return a value. See above for more information. - -
void cpSpaceAddCollisionHandler(
-	cpSpace *space,
-	cpCollisionType a, cpCollisionType b,
-	cpCollisionBeginFunc begin,
-	cpCollisionPreSolveFunc preSolve,
-	cpCollisionPostSolveFunc postSolve,
-	cpCollisionSeparateFunc separate,
-	void *data
-)
- -p(expl). Add a collision handler for given collision type pair. Whenever a shapes with collision type (@cpShape.collision_type@) @a@ and collision type @b@ collide, these callbacks will be used to process the collision. @data@ is a user definable context pointer that is passed to each of the callbacks. NULL can be provided for callbacks you do not wish to implement, however Chipmunk will call it's own default versions for these and not the default ones you've set up for the space. If you need to fall back on the space's default callbacks, you'll have to provide them individually to each handler definition. - -
void cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b)
- -p(expl). Remove a collision handler for a given collision type pair. - -
void cpSpaceSetDefaultCollisionHandler(
-	cpSpace *space,
-	cpCollisionType a, cpCollisionType b,
-	cpCollisionBeginFunc begin,
-	cpCollisionPreSolveFunc preSolve,
-	cpCollisionPostSolveFunc postSolve,
-	cpCollisionSeparateFunc separate,
-	void *data
-)
- -p(expl). Register a default collision handler to be used when no specific collision handler is found. The space is given a default handler when created that returns true for all collisions in @begin()@ and @preSolve()@ and does nothing in the @postSolve()@ and @separate()@ callbacks. - -h2. Post-Step Callbacks: - -Post-step callbacks are the one place where you can break the rules about adding or removing objects from within a callback. In fact, their primary function is to help you safely remove objects from the space that you wanted to disable or destroy in a collision callback. - -Post step callbacks are registered as a function and a pointer that is used as a key. You can only register one post step callback per key. This prevents you from accidentally removing an object more than once. For instance, say that you get a collision callback between a bullet and object A. You want to destroy both the bullet and object A, so you register a post-step callback to safely remove them from your game. Then you get a second collision callback between the bullet and object B. You register a post-step callback to remove object B, and a second post-step callback to remove the bullet. Because you can only register one callback per key, the post-step callback for the bullet will only be called once and you can't accidentally register to have it removed twice. - -Note: Additional callbacks registered to the same key are ignored even if they use a different callback function or data pointer. - -
typedef void (*cpPostStepFunc)(cpSpace *space, void *key, void *data)
- -p(expl). Function type used for post step callbacks. @space@ is the space the callback was registered on, @obj@ is the pointer value you supplied as the key, and @data@ is a user definable pointer you can use to pass in as a context value. - -
void cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *key, void *data)
- -p(expl). Add @func@ to be called before @cpSpaceStep()@ returns. @obj@ and @data@ will be passed to your function. Only the last callback registered for any unique value of @obj@ will be recorded. You can add post-step callbacks from outside of other callback functions, but they won't be called until @cpSpaceStep()@ is called again. - -h2. Examples: - -See the "callback examples":examples.html#CollisionCallbacks for more information. - -
- -h1. Chipmunk Collision Pairs: @cpArbiter@ - -First of all, why are they called arbiters? The short answer is that Box2D called them that way back in 2006 when I was looking at the source for it's solver. An arbiter is like a judge, a person that has authority to settle disputes between two people. It was a fun, fitting name and was shorter to type than CollisionPair which I had been using. :p - -Originally arbiters were going to be an internal data type that Chipmunk used that wouldn't ever be sent to outside code. In Chipmunk 4.x and earlier, only a single callback hook was provided for handling collision events. It was triggered every step that to shapes were touching. This made it non-trivial to track when objects started and stopped touching as the user would have to record and process this themselves. Many people, including myself, wanted to get collision begin/separate events and eventually I realized that information was already being stored in the arbiter cache that the Chipmunk maintains. With some changes to the collision callback API, that information is now exposed to the user. Internally, arbiters are used primarily for solving collision impulses. To external users, you can simply think of them as a weird type used in collision callbacks. - -h2. Memory Management: - -You should never need to create an arbiter, nor will you ever need to free one as they are handled by the space. More importantly, because they are managed by the space you should never store a reference to an arbiter as you don't know when they will be destroyed. Use them within the callback where they are given to you and then forget about them or copy out the information you need. - -h2. Helper Functions: - -
void cpArbiterGetShapes(cpArbiter *arb, cpShape **a, cpShape **b)
-#define CP_ARBITER_GET_SHAPES(arb, a, b) cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
- -p(expl). Get the shapes in the order that they were defined in the collision handler associated with this arbiter. If you defined the handler as @cpSpaceAddCollisionHandler(space, 1, 2, ...)@, you you will find that @a->collision_type == 1@ and @b->collision_type == 2@. The convenience macro defines and initializes the two shape variables for you. "example":examples.html#CollisionCallbacks - -
int cpArbiterIsFirstContact(cpArbiter *arb)
- -p(expl). Returns true if this is the first step that the shapes touched. You can use this from @preSolve()@ and @postSolve()@ callbacks to know if a collision between two shapes is new without needing to flag a boolean in your begin callback. - -
typedef struct cpContactPointSet {
-	int count;
-	
-	struct {
-		cpVect point, normal;
-		cpFloat dist;
-	} points[CP_MAX_CONTACTS_PER_ARBITER];
-} cpContactPointSet;
-
-static inline cpContactPointSet
-cpArbiterGetContactPointSet(const cpArbiter *arb)
- -p(expl). Returns a @cpContactPointSet@ structure. This is the new and preferred API for working with contact points instead of the @cpArbiterGet*()@ functions as it is faster and slightly simpler. - -
cpContactPointSet set = cpArbiterGetContactPointSet(arbiter);
-for(int i=0; i
- -
cpVect cpArbiterGetCount(cpArbiter *arb)
- -p(expl). Returns the number of contact points in this arbiter. - -
cpVect cpArbiterGetNormal(cpArbiter *arb, int i)
- -p(expl). Returns the collision normal for the i'th contact point, flipping it if necessary. *Note:* Currently due to how Chipmunk's collision detection is implemented, the collision normals will be the same for all collision points. You can simply do @cpArbiterGetNormal(arb, 0)@ and not have to check each contact point. *Note:* calling this function from the @separate()@ callback is undefined. - -
cpVect cpArbiterGetPoint(cpArbiter *arb, int i)
- -p(expl). Returns the position of the i'th collision point. *Note:* calling this function from the @separate()@ callback is undefined. - -
cpVect cpArbiterGetDepth(cpArbiter *arb, int i)
- -p(expl). Returns the penetration depth of the i'th collision point. - - -
cpVect cpArbiterTotalImpulse(cpArbiter *arb);
-cpVect cpArbiterTotalImpulseWithFriction(cpArbiter *arb);
- -p(expl). Returns the impulse that was applied this step to resolve the collision. These functions should only be called from a @postStep()@ callback, otherwise the result is undefined. *Note:* If you are using the deprecated elastic iterations setting on your space, it will cause you to get incorrect results. Elastic iterations should no longer be needed, and you should be able to safely turn them off. - -h2. Fields: - -It's unlikely that you'll need to interact with a @cpArbiter@ struct directly as the collision helper functions should provide most functionality that people will need. One exception is the @e@, and @u@ fields. By default, Chipmunk multiplies the friction and elasticity values of to shapes together to determine what values to use when solving the collision. This mostly works, but in many cases is simply not flexible enough. If you are running into problems with that, you can change the values calculated for @e@ and @u@ in a preSolve callback. This is likely to change in the next major version of Chipmunk. - -* @numContacts@ - @int@: Number of contact points for this collision. -* @e@ - @cpFloat@: Calculated amount of elasticity to apply for this collision. Can be overriden from a @preSolve()@ callback. -* @u@ - @cpFloat@: Calculated amount of friction to apply for this collision. Can be overriden from a @preSolve()@ callback. -* @surface_v@ - @cpVect@: Calculated amount of surface velocity to apply for this collision. Can be overriden from a @preSolve()@ callback. (_Very_ likely to change in the next major version of Chipmunk). - -
- -h1. Queries: - -Chipmunk spaces currently support three kinds of spatial queries, point, segment and bounding box. Any type can be done efficiently against an entire space, or against individual shapes. All types of queries take a collision group and layer that are used to filter matches out using the same rules used for filtering collisions between shapes. See "cpShape":#cpShape for more information. If you don't want to filter out any matches, use @CP_ALL_LAYERS@ for the layers and @CP_NO_GROUP@ as the group. - -h2. Point Queries: - -Point queries are useful for things like mouse picking and simple sensors. - -
cpBool cpShapePointQuery(cpShape *shape, cpVect p)
- -p(expl). Check if the given point lies within the shape. - -
typedef void (*cpSpacePointQueryFunc)(cpShape *shape, void *data);
-
-void cpSpacePointQuery(
-	cpSpace *space, cpVect point,
-	cpLayers layers, cpGroup group,
-	cpSpacePointQueryFunc func, void *data
-)
- -p(expl). Query @space@ at @point@ filtering out matches with the given @layers@ and @group@. @func@ is called for each shape found along with the @data@ argument passed to @cpSpacePointQuery()@. Sensor shapes are included. - -
cpShape *cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group)
- -p(expl). Query @space@ at @point@ and return the first shape found matching the given @layers@ and @group@. Returns @NULL@ if no shape was found. Sensor shapes are ignored. - -h2. Segment Queries: - -Segment queries are like ray casting, but because Chipmunk uses a spatial hash to process collisions, it cannot process infinitely long queries like a ray. In practice this is still very fast and you don't need to worry too much about the performance as long as you aren't using extremely long segments for your queries. - -
typedef struct cpSegmentQueryInfo{
-	struct cpShape *shape; // shape that was hit, NULL if no collision
-	cpFloat t; // Distance along query segment, will always be in the range "1":0,.
-	cpVect n; // normal of hit surface
-} cpSegmentQueryInfo;
- -p(expl). Segment queries return more information than just a simple yes or no, they also return where a shape was hit and it's surface normal at the hit point. @t@ is the percentage between the query start and end points. If you need the hit point in world space or the absolute distance from start, see the segment query helper functions farther down. - -
cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info)
- -p(expl). Check if the line segment from @a@ to @b@ intersects the shape. @info@ must be a valid pointer to a @cpSegmentQueryInfo@ structure which will be initialized with the raycast info. - -
typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data)
-
-void cpSpaceSegmentQuery(
-	cpSpace *space, cpVect start, cpVect end,
-	cpLayers layers, cpGroup group,
-	cpSpaceSegmentQueryFunc func, void *data
-)
- -p(expl). Query @space@ along the line segment from @start@ to @end@ filtering out matches with the given @layers@ and @group@. @func@ is called with the normalized distance along the line and surface normal for each shape found along with the @data@ argument passed to @cpSpacePointQuery()@. Sensor shapes are included. - -
cpShape *cpSpaceSegmentQueryFirst(
-	cpSpace *space, cpVect start, cpVect end,
-	cpLayers layers, cpGroup group,
-	cpSegmentQueryInfo *info
-)
- -p(expl). Query @space@ along the line segment from @start@ to @end@ filtering out matches with the given @layers@ and @group@. Only the first shape encountered is returned and the search is short circuited. Returns @NULL@ if no shape was found. The info struct pointed to by @info@ will be initialized with the raycast info unless @info@ is NULL. Sensor shapes are ignored. - -h3. Segment Query Helper Functions: - -
cpVect cpSegmentQueryHitPoint(cpVect start, cpVect end, cpSegmentQueryInfo info)
- -p(expl). Return the hit point in world coordinates where the segment first intersected with the shape. - -
cpFloat cpSegmentQueryHitDist(cpVect start, cpVect end, cpSegmentQueryInfo info)
- -p(expl). Return the absolute distance where the segment first hit the shape. - -h2. Examples: - -See the "query examples":examples.html#Query for more information. \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/doc/doc-src/make_docs.rb b/3rdparty/chipmunk-5.3.4/doc/doc-src/make_docs.rb deleted file mode 100644 index 60dc6f629e..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/doc-src/make_docs.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'rubygems' -require 'redcloth' - -html = < - - - - Chipmunk Game Dynamics Documentation - - - - #{RedCloth.new(File.read('chipmunk-docs.textile')).to_html} - - -HTML - -File.open('../index.html', 'w') do|f| - f.write html -end diff --git a/3rdparty/chipmunk-5.3.4/doc/doc-src/upload_docs.sh b/3rdparty/chipmunk-5.3.4/doc/doc-src/upload_docs.sh deleted file mode 100644 index d01fbfb004..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/doc-src/upload_docs.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -r --exclude=".*" ../ slembcke.net:files.slembcke.net/chipmunk/release/Chipmunk-5.x/Chipmunk-Docs/ diff --git a/3rdparty/chipmunk-5.3.4/doc/examples.html b/3rdparty/chipmunk-5.3.4/doc/examples.html deleted file mode 100644 index 38b20b336f..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/examples.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Chipmunk Game Dynamics Documentation - - - - -

Example Code Snippets:

- - -
-

Getting a Transformation from a Rigid Body:

- -

You can quickly and easily build a transformation matrix from a Chipmunk body. The following code is for OpenGL, but it should be trivial to modify for DirectX or affine transforms. (Note that OpenGL matrices are column-major)

- -
cpVect pos = body->p;
-cpVect rot = body->rot;
-
-GLFloat matrix[16] = {
-   rot.x, rot.y, 0.0f, 0.0f,
-  -rot.y, rot.x, 0.0f, 0.0f,
-   0.0f,   0.0f, 1.0f, 0.0f,
-   pos.x, pos.y, 0.0f, 1.0f,
-};
-
-glMultMatrixf(matrix.farr);
-
- - -
-

Collision Callbacks:

- -

This snippet demonstrates several Chipmunk collision callback features. It defines a collision handler that is called when collision shapes start touching and also a post-step callback to remove the collision shape and body.

- -
static void
-postStepRemove(cpSpace *space, cpShape *shape, void *unused)
-{
-  cpSpaceRemoveBody(space, shape->body);
-  cpBodyFree(shape->body);
-  
-  cpSpaceRemoveShape(space, shape);
-  cpShapeFree(shape);
-}
-
-static int
-begin(cpArbiter *arb, cpSpace *space, void *unused)
-{
-  // Get the cpShapes involved in the collision
-  // The order will be the same as you defined in the handler definition
-  // a->collision_type will be BULLET_TYPE and b->collision_type will be MONSTER_TYPE
-  cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
-  
-  // Alternatively you can use the CP_ARBITER_GET_SHAPES() macro
-  // It defines and sets the variables for you.
-  //CP_ARBITER_GET_SHAPES(arb, a, b);
-  
-  // Add a post step callback to safely remove the body and shape from the space.
-  // Calling cpSpaceRemove*() directly from a collision handler callback can cause crashes.
-  cpSpaceAddPostStepCallback(space, (cpPostStepFunc)postStepRemove, b, NULL);
-  
-  // The object is dead, don’t process the collision further
-  return 0;
-}
-
-#define BULLET_TYPE 1
-#define MONSTER_TYPE 2
-
-// Define a collision handler for bullets and monsters
-// Kill the monster by removing it’s shape and body from the space as soon as it’s hit by a bullet 
-cpSpaceAddCollisionHandler(space, BULLET_TYPE, MONSTER_TYPE, begin, NULL, NULL, NULL, NULL);
- -

For more callback examples, see the One Way Platform Demo, Sensors Demo, or the Player Demo.

- - - -

Query Examples:

- -

The following example is taken directly from ChipmunkDemo.c. When the mouse is clicked, a point query is performed to see if there is a shape under the mouse. If there is, it adds a joint to the body that links it to the mouse's movement.

- -
static void
-click(int button, int state, int x, int y)
-{
-  if(button == GLUT_LEFT_BUTTON){
-    if(state == GLUT_DOWN){
-      cpVect point = mouseToSpace(x, y);
-    
-      cpShape *shape = cpSpacePointQueryFirst(space, point, GRABABLE_MASK_BIT, 0);
-      if(shape){
-        cpBody *body = shape->body;
-        mouseJoint = cpPivotJointNew2(mouseBody, body, cpvzero, cpBodyWorld2Local(body, point));
-        mouseJoint->maxForce = 50000.0f;
-        mouseJoint->biasCoef = 0.15f;
-        cpSpaceAddConstraint(space, mouseJoint);
-      }
-    } else if(mouseJoint){
-      cpSpaceRemoveConstraint(space, mouseJoint);
-      cpConstraintFree(mouseJoint);
-      mouseJoint = NULL;
-    }
-  }
-}
- -

Perform a segment query to see if a laser beam hits a shape. We want to draw particles at both the position where the beam enters and exits the shape.

- -
cpVect a = cpv(...), b = cpv(...);
-
-cpSegmentQueryInfo info = {};
-if(cpSpaceSegmentQueryFirst(space, a, b, -1, 0, &info)){
-  cpSegmentQueryInfo info2;
-  cpShapeSegmentQuery(info.shape, b, a, &info2);
-  
-  cpVect enterPoint = cpSegmentQueryHitPoint(a, b, info);
-  cpVect exitPoint = cpSegmentQueryHitPoint(b, a, info2);
-}
- - - diff --git a/3rdparty/chipmunk-5.3.4/doc/images/hash_just_right.png b/3rdparty/chipmunk-5.3.4/doc/images/hash_just_right.png deleted file mode 100644 index e567fd5255..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/doc/images/hash_just_right.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/doc/images/hash_too_big.png b/3rdparty/chipmunk-5.3.4/doc/images/hash_too_big.png deleted file mode 100644 index 434e3d7c4a..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/doc/images/hash_too_big.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/doc/images/hash_too_small.png b/3rdparty/chipmunk-5.3.4/doc/images/hash_too_small.png deleted file mode 100644 index ca9f8e9920..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/doc/images/hash_too_small.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/doc/images/hms_logo.png b/3rdparty/chipmunk-5.3.4/doc/images/hms_logo.png deleted file mode 100644 index c0b338d282..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/doc/images/hms_logo.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/doc/images/logo1_med.png b/3rdparty/chipmunk-5.3.4/doc/images/logo1_med.png deleted file mode 100644 index 01634a01f4..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/doc/images/logo1_med.png and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/doc/index.html b/3rdparty/chipmunk-5.3.4/doc/index.html deleted file mode 100644 index 2c5efb1a44..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/index.html +++ /dev/null @@ -1,1068 +0,0 @@ - - - - - Chipmunk Game Dynamics Documentation - - - -

- -

-

Chipmunk Physics 5.3.4

-

First of all, Chipmunk is a 2D rigid body physics library distributed under the MIT license. It is intended to be fast, portable, numerically stable, and easy to use. For this reason it’s been used in hundreds of games on every system you can name. This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! I’ve put thousands of hours of work over many years to make Chipmunk what it is today. If you find Chipmunk has saved you a lot of time, please consider donating. You’ll make an indie game developer very happy!

-

First of all, I would like to give a Erin Catto a big thank you, as Chipmunk’s impulse solver was directly inspired by his Box2D example code way back in 2006. (Now a full fledged physics engine all it’s own: Box2D.org). His contact persistence idea allows for stable stacks of objects with very few iterations of the solver. My previous solver produced mushy piles of objects or required a large amount of CPU to operate stably.

-

Why a C Library?

-

A lot of people ask me why I wrote Chipmunk in C instead of pick your favorite language here. I tend to get really excited about different programming languages. Depending on the month, take your pick of Scheme, OCaml, Ruby, Objective-C, OOC, Lua, Io… the list goes on. The one common factor between most any language is that they are usually dead simple to make bindings to C code. I wanted Chipmunk to be fast, portable, and easy to optimize. With Chipmunk weiging in at less than 7,500 lines of C code, headers and comments, I don’t feel that using C has made Chipmunk difficult to develop. In fact, at times I feel it has made it easier to optimize and debug.

-

That said, I’ve never developed a whole game in C and I probably never will. There are much more interesting languages to do that in than C with all sorts of nice features like garbage collection, closures and object oriented runtimes. Check out the Bindings and Ports page to see if you can use Chipmunk from your language of choice. Because Chipmunk is written in a subset of C99 it compiles cleanly as C, C++, Objective-C and Objective-C++ code, making it easy to integrate into projects in those languages.

-

If you are writing iPhone games using Chipmunk, you should check out the Objective-Chipmunk wrapper that we’ve developed for Chipmunk. It integrates with the Objective-C memory model and provides a number of high level APIs that make writing physics based games for the iPhone even easier. While we do charge for Objective-Chipmunk, it will almost certainly save you more time than the small cost to license it. As a bonus, you’ll be helping to ensure that we can afford to continue to work on Chipmunk improvements.

-

Limitations of a C API:

-

There are two problems with C APIs. The first is that they lack operator overloading. Chipmunk defines vector operators as functions instead of allowing you to use inline operators such as *, , and -. In practice, it’s usually not a major problem for readability, but a little annoying. Chipmunk does provide overloaded operators if you are using C+. Another problem is that there is no way to mark struct field or functions as “private” in C. To get around this, I created the CP_PRIVATE() macro, if you see a struct field or function defined using CP_PRIVATE it means that you shouldn’t be using it as it’s name or meaning might change in future versions without warning. In Chipmunk 6, it will be a hard error to access these fields or functions unless you import the _chipmunk_private.h_ header.

-

Support:

-

The best way to get support is to visit the Chipmunk Forums. There are plenty of people around using Chipmunk on the just about every platform I’ve ever heard of. If you are working on a commercial project, Howling Moon Software (my company) is available for contracting. We can help with implementing custom Chipmunk behaviors, as well as priority bug fixes and performance tuning.

-

Contact:

-

If you find any bugs in Chipmunk or this document, or have a question or comment about Chipmunk you can contact me at slembcke(at)gmail(dot)com.

-

License:

-

Chipmunk is licensed under the MIT license.

-
-Copyright (c) 2007 Scott Lembcke
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-

This means that you do not have to buy a license or pay to use Chipmunk in commercial projects. (Though we really appreciate donations)

-

Links:

- -

-

Chipmunk Basics:

-

Overview:

-

There are 4 basic objects you will use in Chipmunk.

-
    -
  • Rigid Bodies: A rigid body holds the physical properties of an object. (mass, position, rotation, velocity, etc.) It does not have a shape by itself. If you’ve done physics with particles before, rigid bodies differ in that they are able to rotate.
  • -
  • Collision Shapes: By attaching shapes to bodies, you can define the a body’s shape. You can attach as many shapes to a single body as you need to in order to define a complex shape. Shapes contain the surface properties of an object such as how much friction or elasticity it has.
  • -
  • Constraints/Joints: Constraints and joints describe how bodies are attached to each other.
  • -
  • Spaces: Spaces are the basic simulation unit in Chipmunk. You add bodies, shapes and joints to a space, and then update the space as a whole.
  • -
-

There is often confusion between rigid bodies and their collision shapes in Chipmunk and how they relate to sprites. A sprite would be a visual representation of an object, while a collision shape is an invisible property that defines how objects should collide. Both the sprite’s and the collision shape’s position and rotation are controlled by a rigid body.

-

Initialization:

-

Before you do anything else, you must initialize Chipmunk. Otherwise you will crash as soon as the first collision is detected.

-
cpInitChipmunk(); // That is all
-

If Chipmunk was not compiled with the NDEBUG flag set, it will also print out the debug mode message and the current version number to stdout.

-

Memory Management the Chipmunk way:

-

For many of the structures you will use, Chipmunk uses a more or less standard set of memory management functions. Take the cpSpace struct for example:

-
    -
  • cpSpaceAlloc() – allocates but does not initialize a cpSpace struct.
  • -
  • cpSpaceInit(cpSpace *space) – initializes a cpSpace struct.
  • -
  • cpSpaceDestroy(cpSpace *space) – frees all memory allocated by the cpSpaceInit(), but does not free the cpSpace struct itself.
  • -
-
    -
  • cpSpaceNew() – allocates and initializes a cpSpace struct. It calls cpSpaceAlloc() then cpSpaceInit().
  • -
  • cpSpaceFree(cpSpace *space) – calls cpSpaceDestroy() and then frees the cpSpace struct.
  • -
-

While you will probably use the new/free versions exclusively if you are using C/C++, but the alloc/init/destroy functions can be helpful when writing language extensions so that you can more easily work with a garbage collector.

-

In general, you are responsible for freeing any structs that you allocate. Chipmunk does not have any fancy reference counting or garbage collection built in.

-

Basic Types:

-

chipmunk_types.h defines a number of basic types that Chipmunk uses. These can be changed at compile time to better suit your needs:

-
    -
  • cpFloat: Floating point type. Defaults to double. See below.
  • -
  • cpVect: 2D vector type. cpVect documentation
  • -
  • cpBool: Like every good C library that wants good cross language compatibility, you end up defining your own boolean type. :-\ Defaults to int.
  • -
  • cpDataPointer: Pointer type defined for callbacks and the user definable data pointer on most Chipmunk structs. Defaults to void*.
  • -
  • cpCollisionType: Unique identifier for collision shape types. Defaults to unsigned int.
  • -
  • cpGroup: Unique identifier for collision groups. Defaults to unsigned int. A CP_NO_GROUP value is defined that can be used when you don’t want to specify a group.
  • -
  • cpLayers: Type used as the layers bitmask. Defaults to unsigned int. A CP_ALL_LAYERS value is defined that has all layer bits set.
  • -
-

Note: On the iPhone, cpFloat is defined as float and cpVect is an alias for CGPoint for performance and compatibility reasons.

-

Math the Chipmunk way:

-

First of all, Chipmunk uses double precision floating point numbers throughout it’s calculations by default. This is likely to be faster on most modern desktop processors, and means you have to worry less about floating point round off errors. You can change the floating point type used by Chipmunk when compiling the library. Look in chipmunk_types.h.

-

Chipmunk defines a number of aliases for common math functions so that you can choose to use floats or doubles for Chipmunk’s floating point type. In your own code, there probably isn’t a strong reason to use these aliases unless you expect you might want to change Chipmunk’s floating point type later and a 2% performance hit from using the wrong float/double version of math functions will matter.

-

That said, there are a few functions you will probably find very useful:

-
cpFloat cpfclamp(cpFloat f, cpFloat min, cpFloat max)
-

Clamp f to be between min and max.

-
cpFloat cpflerp(cpFloat f1, cpFloat f2, cpFloat t)
-

Linearly interpolate between f1 and f2.

-
cpFloat cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d)
-

Linearly interpolate from f1 towards f2 by no more than d.

-

Floating point infinity is defined for you as INFINITY if your standard math library (cough MSVC cough) doesn’t define it for you.

-

To represent vectors, Chipmunk defines the cpVect type and a set of inline functions for working with them (cpv, cpvadd, cpvmult, etc). See the API reference for more information..

-

-

Chipmunk C API:

-

Main API:

-
    -
  • cpVect – Create and manipulate 2D vectors.
  • -
  • cpBB – Create and manipulate 2D axis-aligned bounding boxes.
  • -
  • cpBody – Create and work with rigid bodies.
  • -
  • cpShape – Attach collision shapes to rigid bodies.
  • -
  • cpSpace – Create a “space” to put your objects into and simulate them.
  • -
  • cpConstraint – Create joints and other constraints.
  • -
  • Learn about how CollisionDetection in Chipmunk works.
  • -
  • Learn about Chipmunk’s CallbackSystem for recieving collision events and adding custom behavior to your physics.
  • -
  • Learn about Queries. Point queries and segment queries (raycasting).
  • -
-

-

Chipmunk Vectors: cpVect

-

Struct Definition, Constants and Constructors:

-
typedef struct cpVect{
-	cpFloat x, y;
-} cpVect
-

Simply a 2D vector packed into a struct.

-
#define cpvzero ((cpVect){0.0f, 0.0f})
-

Constant for the zero vector.

-
cpVect cpv(const cpFloat x, const cpFloat y)
-

Convenience constructor for creating new cpVect structs.

-

Operations:

-
cpBool cpveql(const cpVect v1, const cpVect v2)
-

Check if two vectors are equal. (Be careful when comparing floating point numbers!)

-
cpVect cpvadd(const cpVect v1, const cpVect v2)
-cpVect cpvsub(const cpVect v1, const cpVect v2)
-

Add or subtract two vectors.

-
cpVect cpvneg(const cpVect v)
-

Negate a vector.

-
cpVect cpvmult(const cpVect v, const cpFloat s)
-

Scalar multiplication.

-
cpFloat cpvdot(const cpVect v1, const cpVect v2)
-

Vector dot product.

-
cpFloat cpvcross(const cpVect v1, const cpVect v2)
-

2D vector cross product analog. The cross product of 2D vectors results in a 3D vector with only a z component. This function returns the magnitude of the z value.

-
cpVect cpvperp(const cpVect v)
-

Returns a perpendicular vector. (90 degree rotation)

-
cpVect cpvrperp(const cpVect v)
-

Returns a perpendicular vector. (-90 degree rotation)

-
cpVect cpvproject(const cpVect v1, const cpVect v2)
-

Returns the vector projection of v1 onto v2.

-
cpVect cpvrotate(const cpVect v1, const cpVect v2)
-

Uses complex multiplication to rotate v1 by v2. Scaling will occur if v1 is not a unit vector.

-
cpVect cpvunrotate(const cpVect v1, const cpVect v2)
-

Inverse of cpvrotate().

-
cpFloat cpvlength(const cpVect v)
-

Returns the length of v.

-
cpFloat cpvlengthsq(const cpVect v)
-

Returns the squared length of v. Faster than cpvlength() when you only need to compare lengths.

-
cpVect cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t)
-

Linearly interpolate between v1 and v2.

-
cpVect cpvlerpconst(const cpVect v1, const cpVect v2, const cpFloat d)
-

Linearly interpolate between v1 towards v2 by distance d.

-
cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t)
-

Spherical linearly interpolate between v1 and v2.

-
cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)
-

Spherical linearly interpolate between v1 towards v2 by no more than angle @a@’ in radians.

-
cpVect cpvnormalize(const cpVect v)
-

Returns a normalized copy of v.

-
cpVect cpvnormalize_safe(const cpVect v)
-

Returns a normalized copy of v or cpvzero if v was already cpvzero. Protects against divide by zero errors.

-
cpVect cpvclamp(const cpVect v, const cpFloat len)
-

Clamp v to length len.

-
cpFloat cpvdist(const cpVect v1, const cpVect v2)
-

Returns the distance between v1 and v2.

-
cpFloat cpvdistsq(const cpVect v1, const cpVect v2)
-

Returns the squared distance between v1 and v2. Faster than cpvdist() when you only need to compare distances.

-
int cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist)
-

Returns true if the distance between v1 and v2 is less than dist.

-
cpVect cpvforangle(const cpFloat a)
-

Returns the unit length vector for the given angle (in radians).

-
cpFloat cpvtoangle(const cpVect v)
-

Returns the angular direction v is pointing in (in radians).

-
char *cpvstr(const cpVect v)
-

Returns a string representation of v. Intended mostly for debugging purposes and not production use.

-

NOTE: The string points to a static local and is reset every time the function is called. If you want to print more than one vector you will have to split up your printing onto separate lines.

-

-

Chipmunk Bounding Boxes: cpBB

-

Struct Definition and Constructors:

-
typedef struct cpBB{
-	cpFloat l, b, r ,t;
-} cpBB
-

Simple bounding box struct. Stored as left, bottom, right, top values.

-
cpBB cpBBNew(const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t)
-

Convenience constructor for cpBB structs. Like cpv() this function returns a copy and not a malloced pointer.

-

Operations:

-
int cpBBintersects(const cpBB a, const cpBB b)
-

Returns true if the bounding boxes intersect.

-
int cpBBcontainsBB(const cpBB bb, const cpBB other)
-

Returns true if bb completely contains other.

-
int cpBBcontainsVect(const cpBB bb, const cpVect v)
-

Returns true if bb contains v.

-
int cpBBmerge(const cpBB a,  const cpBB b)
-

Return the minimal bounding box that contains both a and b.

-
int cpBBexpand(const cpBB bb,  const cpVect v)
-

Return the minimal bounding box that contains both bb and v.

-
cpVect cpBBClampVect(const cpBB bb, const cpVect v)
-

Returns a copy of v clamped to the bounding box.

-
cpVect cpBBWrapVect(const cpBB bb, const cpVect v)
-

Returns a copy of v wrapped to the bounding box.

-

-

Chipmunk Rigid Bodies: cpBody

-

Function Types for Integration Callbacks:

-
typedef void (*cpBodyVelocityFunc)(struct cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt);
-typedef void (*cpBodyPositionFunc)(struct cpBody *body, cpFloat dt);
-

Integration function types. You can write your own integration functions to create your own body behaviors that go beyond applying simply gravity. It’s unlikely that you’ll need to override the position integration function, and if you do you should carefully study how the default function (cpBodyUpdatePosition()) works. See the planet demo for an example of how to create planetary gravity.

-

Fields:

-
    -
  • velocity_funccpBodyVelocityFunc: Function pointer called to update the velocity of the body.
  • -
  • position_funccpBodyPositionFunc: Function pointer called to update the position of the body.
  • -
  • mcpFloat: Mass of the body.
  • -
  • icpFloat: Moment of inertia (MoI or sometimes just moment) of the body. The moment is like the rotational mass of a body. See below for function to help calculate the moment.
  • -
  • pcpVect: Position of the body.
  • -
  • vcpVect: Velocity of the body.
  • -
  • fcpVect: Current force being applied to the body. Note: does not reset automatically as in some physics engines.
  • -
  • acpFloat: Current rotation angle of the body in radians.
  • -
  • wcpFloat: Current rotational velocity of the body.
  • -
  • tcpFloat: Current torque being applied to the body. Note: does not reset automatically as in some physics engines.
  • -
  • rotcpVect: Cached unit length rotation vector.
  • -
  • v_limitcpFloat: Maximum speed a body may have after updating it’s velocity.
  • -
  • w_limitcpFloat: Maximum rotational speed a body may have after updating it’s velocity.
  • -
  • datacpDataPointer: A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks.
  • -
-

Using the standard single letter names used in physics equations for these values probably wasn’t the best idea in the long run. For me at least, it made things easier as the equations in the code looked more like the written equations I was used to. The getter/setter functions listed below may help save your sanity however.

-

When changing any of a body’s properties, you should also call cpBodyActivate() to make sure that it is not stuck sleeping when you’ve changed a property that should make it move again. The cpBodySet*() functions do this for you automatically.

-

Note: m, i, and a must be set using setter functions. The body holds on to cached values based on them.

-

Memory Management Functions:

-
cpBody *cpBodyAlloc(void)
-cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i)
-cpBody *cpBodyNew(cpFloat m, cpFloat i)
-
-void cpBodyDestroy(cpBody *body)
-void cpBodyFree(cpBody *body)
-

Standard set of Chipmunk memory management functions. m and i are the mass and moment of inertia for the body. Guessing the mass for a body is usually fine, but guessing a moment of inertia can lead to a very poor simulation.

-

Creating Additional Static Bodies:

-

While every cpSpace:#cpSpace has a built in static body that you can use, it can be convenient to make your own as well. One potential use is in a level editor. By attaching chunks of your level to static bodies, you can still move and rotate the chunks independently of each other. Then all you have to do is call cpSpaceRehashStatic() to rebuild the static collision detection data when you are done.

-

For more information on rogue and static bodies, see Chipmunk Spaces.

-
cpBody *cpBodyAlloc(void);
-cpBody *cpBodyInitStatic(cpBody *body)
-cpBody *cpBodyNewStatic()
-

Create additional static bodies with infinite mass and moment of inertia.

-

Moment of Inertia Helper Functions:

-

Use the following functions to approximate the moment of inertia for your body, adding the results together if you want to use more than one.

-
cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset)
-

Calculate the moment of inertia for a hollow circle, r1 and r2 are the inner and outer diameters in no particular order. (A solid circle has an inner diameter of 0)

-
cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b)
-

Calculate the moment of inertia for a line segment. The endpoints a and b are relative to the body.

-
cpFloat cpMomentForPoly(cpFloat m, int numVerts, cpVect *verts, cpVect offset)
-

Calculate the moment of inertia for a solid polygon shape assuming it’s center of gravity is at it’s centroid. The offset is added to each vertex.

-
cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height)
-

Calculate the moment of inertia for a solid box centered on the body.

-

Area Helper Functions:

-

Use the following functions to get the area for common Chipmunk shapes if you want to approximate masses.

-
cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2)
-

Area of a hollow circle.

-
cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r)
-

Area of a beveled segment. (Will always be zero if radius is zero)

-
cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts)
-

Signed area of a polygon shape. Returns a negative number for polygons with a backwards winding.

-

Setters for Linked Values:

-

Because several rigid body values are linked (m/m_inv, i/i_inv, a/rot), don’t set them explicitly. Use the following setter functions instead.

-
void cpBodySetMass(cpBody *body, cpFloat m);
-void cpBodySetMoment(cpBody *body, cpFloat i);
-void cpBodySetAngle(cpBody *body, cpFloat a);
-

Getters and Setters:

-

While you MUST use the setters in the previous section. You are encouraged to use setters/getters for all properties.

-

Getters and setters will all be of the form:

-
cpFloat cpBodyGetMass(cpBody *body)
-void cpBodySetMass(cpBody *body, cpFloat mass)
-

And the full list:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name Type Read Only?
Mass cpFloat no
Moment cpFloat no
Pos cpVect no
Vel cpVect no
Force cpVect no
Angle cpFloat no
AngVel cpFloat no
Torque cpFloat no
Rot cpVect yes
-

Integration Functions:

-
void cpBodySlew(cpBody *body, cpVect pos, cpFloat dt)
-

Modify the velocity of the body so that it will move to the specified absolute coordinates in the next timestep. Intended for objects that are moved manually with a custom velocity integration function.

-

-
void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt)
-

Default rigid body velocity integration function. Updates the velocity of the body using Euler integration.

-
void cpBodyUpdatePosition(cpBody *body, cpFloat dt)
-

Default rigid body position integration function. Updates the position of the body using Euler integration. Unlike the velocity function, it’s unlikely you’ll want to override this function. If you do, make sure you understand it’s source code as it’s an important part of the collision/joint correction process.

-

Coordinate Conversion Functions:

-
cpVect cpBodyLocal2World(cpBody *body, cpVect v)
-

Convert from body local coordinates to world space coordinates.

-
cpVect cpBodyWorld2Local(cpBody *body, cpVect v)
-

Convert from world space coordinates to body local coordinates.

-

Applying Forces and Torques:

-
void cpBodyApplyImpulse(cpBody *body, cpVect j, cpVect r)
-

Apply the impulse j to body at a relative offset r from the center of gravity. Both r and j are in world coordinates. r is relative to the position of the body, but not the rotation. Many people get tripped up by this.

-
void cpBodyResetForces(cpBody *body)
-

Zero both the forces and torques accumulated on body.

-
void cpBodyApplyForce(cpBody *body, cpVect f, cpVect r)
-

Apply (accumulate) the force f on body at a relative offset (important!) r from the center of gravity. Both r and f are in world coordinates.

-

Sleeping Functions:

-

See Chipmunk Spaces":#cpSpace for more information on Chipmunk’s sleeping feature.

-
cpBool cpBodyIsSleeping(const cpBody *body)
-

Returns true if body is sleeping.

-
void cpBodySleepWithGroup(cpBody *body, cpBody *group)
-

When objects in Chipmunk sleep, they sleep as a group of all objects that are touching or jointed together. When an object is woken up, all of the objects in it’s group are woken up. Calling cpBodySleepWithGroup() forces a body to fall asleep immediately. If group is NULL, a new group will be created. If group is another sleeping body, it will be added to that body’s group. It is an error to specify a non-sleeping body for group. Make sure everything is set up before calling this method. Calling a setter function or adding/removing a shape or constraint will cause the body to be woken up again. Also, this function must not be called from a collision handler or query callback. Use a post-step callback instead.

-

An example of how this could be used is to set up a piles of boxes that a player can knock over. Creating the piles and letting them fall asleep normally would work, but it means that all of the boxes would need to be simulated until they fell asleep. This could be slow if you had a lot of piles. Instead you can force them to sleep and start the game with the boxes already sleeping.

-

Another example would be collapsing platforms. You could create a sleeping object that is suspended in the air. As soon as the player comes along to jump on it, it wakes up and starts falling. In this case, it would be impossible to have the platform fall asleep naturally.

-

-
void cpBodySleep(cpBody *body)
-

Equivalent to calling cpBodySleepWithGroup(body, NULL). It forces body to fall asleep and creates a new group for it.

-
void cpBodyActivate(cpBody *body)
-

Wake body up so that it starts actively simulating again if it’s sleeping, or reset the idle timer if it’s active. In Chipmunk 5.3.4 and up, you can call this function from a collision or query callback. In previous versions this was an error.

-

Misc Functions:

-
cpBool cpBodyIsStatic(const cpBody *body)
-

Returns true if body is a static body. (cpSpace.staticBody or a static rogue body)

-
cpBool cpBodyIsRogue(const cpBody *body)
-

Returns true if body has never been added to a space. Though shapes attached to this body may still be added to a space. For more information on rogue and static bodies, see Chipmunk Spaces.

-
cpBool cpBodyIsSleeping(const cpBody *body)
-

Returns true if body is sleeping.

-

Notes:

-
    -
  • Use forces to modify the rigid bodies if possible. This will be the most stable.
  • -
  • Modifying a body’s velocity shouldn’t necessarily be avoided, but applying large changes every frame can cause strange results in the simulation. Experiment freely, but be warned.
  • -
  • Don’t modify a body’s position every step unless you really know what you are doing. Otherwise you’re likely to get the position/velocity badly out of sync.
  • -
-

-

Chipmunk Collision Shapes: cpShape

-

There are currently 3 collision shape types:

-
    -
  • Circles: Fastest and simplest collision shape.
  • -
  • Line segments: Meant mainly as a static shape. They can be attached to moving bodies, but they don’t currently generate collisions with other line segments. Can be beveled in order to give them a thickness.
  • -
  • Convex polygons: Slowest, but most flexible collision shape.
  • -
-

You can add multiple shapes to a body. This should give you the flexibility to make any shape you want as well providing different areas of the same object with different friction, elasticity or callback values.

-

Fields:

-

When creating different types of shapes, you will always be given a cpShape* pointer back. This is because Chipmunk shapes are meant to be opaque types. Think of the specific collision types such as cpCircleShape, cpSegmentShape and cpPolyShape as private subclasses of cpShape. You can still read some properties from them using the getter functions, but you are not intended to cast cpShape pointers to their specific types.

-
-

Filtering Collisions:

-

Chipmunk has two primary means of ignoring collisions: groups and layers.

-

Groups are meant to ignore collisions between parts on a complex object. A ragdoll is a good example. When jointing an arm onto the torso, you’ll want them to allow them to overlap. Groups allow you to do exactly that. Shapes that have the same group don’t generate collisions. So by placing all of the shapes in a ragdoll in the same group, you’ll prevent it from colliding against other parts of itself.

-

Layers allow you to separate collision shapes into mutually exclusive planes. Shapes can be in more than one layer, and shapes only collide with other shapes that are in at least one of the same layers. As a simple example, say shape A is in layer 1, shape B is in layer 2, and shape C is in layer 1 and 2. Shape A and B won’t collide with each other, but shape C will collide with both A and B.

-

Layers can also be used to set up rule based collisions. Say you have four types of shapes in your game. The player, the enemies, player bullets and enemy bullets. The are that the player should collide with enemies, and bullets shouldn’t collide with the type (player or enemy) that fired them. Making a chart would look like this:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Player Enemy Player Bullet Enemy Bullet
Player (1) (2)
Enemy (3)
Player Bullet
Enemy Bullet
-

The ‘-’s are for redundant spots in the chart, and the numbers are spots where types should collide. You can use a layer for rule that you want to define. Then add the layers to each type: The player should be in layers 1 and 2, the enemy should be in layers 1 and 3, the player bullets should be in layer 3, and the enemy bullets should be in layer 2. Treating layers as rules this way, you can define up to 32 rules. The default cpLayers type is unsigned int which has a resolution of 32 bits on most systems. Redefine it if you need more to work with.

-

There is one last way of filtering collisions using collision handlers. See the section on callbacks for more information. While collision handlers can be more flexible, they are also the slowest method. So you try to use groups or layers first.

-

Memory Management Functions:

-
void cpShapeDestroy(cpShape *shape)
-void cpShapeFree(cpShape *shape)
-

Destroy and Free functions are shared by all shape types. Allocation and initialization functions are specific to each shape type. See below.

-

Shape Operations:

-
cpBB cpShapeCacheBB(cpShape *shape)
-

Updates and returns the bounding box of shape.

-
void cpResetShapeIdCounter(void)
-

Chipmunk keeps a counter so that every new shape is given a unique hash value to be used in the spatial hash. Because this affects the order in which the collisions are found and handled, you can reset the shape counter every time you populate a space with new shapes. If you don’t, there might be (very) slight differences in the simulation.

-

Working With Circle Shapes:

-
cpCircleShape *cpCircleShapeAlloc(void)
-cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset)
-cpShape *cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset)
-

body is the body to attach the circle to, offset is the offset from the body’s center of gravity in body local coordinates.

-
cpVect cpCircleShapeGetOffset(cpShape *circleShape)
-cpFloat cpCircleShapeGetRadius(cpShape *circleShape)
-

Getters for circle shape properties. Passing as non-circle shape will throw an assertion.

-

Working With Segment Shapes:

-
cpSegmentShape* cpSegmentShapeAlloc(void)
-cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius)
-cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius)
-

body is the body to attach the segment to, a and b are the endpoints, and radius is the thickness of the segment.

-
cpVect cpSegmentShapeGetA(cpShape *shape)
-cpVect cpSegmentShapeGetA(cpShape *shape)
-cpVect cpSegmentShapeGetNormal(cpShape *shape)
-cpFloat cpSegmentShapeGetRadius(cpShape *shape)
-

Getters for segment shape properties. Passing a non-segment shape will throw an assertion.

-

Working With Polygon Shapes:

-
cpPolyShape *cpPolyShapeAlloc(void)
-cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset)
-cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset)
-

body is the body to attach the poly to, verts is an array of cpVect structs defining a convex hull with a clockwise winding, offset is the offset from the body’s center of gravity in body local coordinates. An assertion will be thrown the vertexes are not convex or do not have a clockwise winding.

-
int cpPolyShapeGetNumVerts(cpShape *shape)
-cpVect cpPolyShapeGetVert(cpShape *shape, int index)
-

Getters for poly shape properties. Passing a non-poly shape or an index that does not exist will throw an assertion.

-

Poly Shape Helper Functions:

-
cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts)
-

Calculate the centroid for a polygon.

-
void cpRecenterPoly(const int numVerts, cpVect *verts)
-

Center a polygon to (0,0). Subtracts the centroid from each vertex.

-

Modifying cpShapes:

-

The short answer is that you can’t because the changes would be only picked up as a change to the position of the shape’s surface, but not it’s velocity. The long answer is that you can using the “unsafe” API as long as you realize that doing so will not result in realistic physical behavior. These extra functions are define in a separate header chipmunk_unsafe.h.

-

Notes:

-
    -
  • You can attach multiple collision shapes to a rigid body. This should allow you to create almost any shape you could possibly need.
  • -
  • Shapes attached to the same rigid body will never generate collisions. You don’t have to worry about overlap when attaching multiple shapes to a rigid body.
  • -
  • The amount of elasticity applied during a collision is determined by multiplying the elasticity of both shapes together. The same is done for determining the friction. If you want to override this default behavior, you can do so inside of a preSolve collision callback. See the Chipmunk Callbacks section for more information.
  • -
  • Make sure you add both the body and it’s collision shapes to a space. The exception is when you want to have a static body or a body that you integrate yourself. In that case, only add the shape.
  • -
-

-

Chipmunk Spaces: cpSpace

-

Spaces in Chipmunk are the basic unit of simulation. You add rigid bodies, shapes and constraints to it and then step them forward through time.

-

What Are Iterations, and Why Should I care?

-

Chipmunk uses an iterative solver to figure out the forces between objects in the space. What this means is that it builds a big list of all of the collisions, joints, and other constraints between the bodies and makes several passes over the list considering each one individually. The number of passes it makes is the iteration count, and each iteration makes the solution more accurate. If you use too many iterations, the physics should look nice and solid, but may use up too much CPU time. If you use too few iterations, the simulation may seem mushy or bouncy when the objects should be solid. Setting the number of iterations lets you balance between CPU usage and the accuracy of the physics. Chipmunk’s default of 10 iterations is sufficient for most simple games.

-

Rogue and Static Bodies:

-

Rogue bodies are bodies that have not been added to the space, but are referenced from shapes or joints. Rogue bodies are a common way of controlling moving elements in Chipmunk such as platforms. As long as the body’s velocity matches the changes to it’s position, there is no problem with doing this. Most games will not need rogue bodies however.

-

In previous versions, Chipmunk used infinite mass rogue bodies to attach static shapes to. Creating and maintaining your own body for this is no longer necessary as each space has it’s own body for attaching static shapes to. This body is marked as being a static body. A static body allows other objects resting on or jointed to it to fall asleep even though it does not fall asleep itself. Additional static bodies can be created using cpBodyNewStatic() or cpBodyInitStatic(). Objects resting on or jointed to rogue bodies can never fall asleep. This is because the purpose of rogue bodies are to allow the programmer to move or modify them at any time. Without knowing when they will move, Chipmunk has to assume that objects cannot fall asleep when touching them.

-

Static Shapes:

-

Chipmunk optimizes collision detection against shapes that do not move. There are two ways that Chipmunk knows a shape is static.

-

The first is automatic. When adding or removing shapes attached to static bodies, Chipmunk knows to handle them specially and you just use the same functions as adding regular dynamic shapes, cpSpaceAddShape() and cpSpaceRemoveShape().

-

The second way is to explicitly tag shapes as static using cpSpaceAddStaticShape(). This is rarely needed, but say for instance that you have a rogue body that seldomly moves. In this case, adding a shape attached to it as a static shape and updating it only when the body moves can increase performance. Shapes added this way must be removed by calling cpSpaceRemoveStaticShape().

-

Because static shapes aren’t updated automatically, you must let Chipmunk know that it needs to update the static shapes. You can update all of the static shapes at once using cpSpaceRehashStatic() or individual shapes using cpSpaceRehashShape(). If you find yourself rehashing static bodies often, you should be adding them normally using cpSpaceAddShape() instead.

-

Sleeping

-

New in Chipmunk 5.3 is the ability of spaces to disable entire groups of objects that have stopped moving to save CPU time as well as battery life. In order to use this feature you must do 2 things. The first is that you must attach all your static geometry to static bodies. Objects cannot fall asleep if they are touching a non-static rogue body even if it’s shapes were added as static shapes. The second is that you must enable sleeping explicitly by choosing a time threshold value for cpSpace.sleepTimeThreshold. If you do not set cpSpace.idleSpeedThreshold explicitly, a value will be chosen automatically based on the current amount of gravity.

-

Fields:

-
    -
  • iterationsint: Allow you to control the accuracy of the solver. Defaults to 10. See the section on iterations above for an explanation.
  • -
  • gravitycpVect: Global gravity applied to the space. Defaults to cpvzero. Can be overridden on a per body basis by writing custom integration functions.
  • -
  • dampingcpFloat: Amount of viscous damping to apply to the space. A value of 0.9 means that each body will lose 10% of it’s velocity per second. Defaults to 1. Like gravity can be overridden on a per body basis.
  • -
  • idleSpeedThresholdcpFloat: Speed threshold for a body to be considered idle. The default value of 0 means to let the space guess a good threshold based on gravity.
  • -
  • sleepTimeThresholdcpFloat: Time a group of bodies must remain idle in order to fall asleep. The default value of INFINITY disables the sleeping algorithm.
  • -
  • staticBodycpBody: A statically allocated infinite mass body that the space uses to substitute for NULL bodies on shapes and constraints. Set the space->staticBody.data pointer to something helpful if you want to have some context from within callbacks.
  • -
-

Memory Management Functions:

-
cpSpace* cpSpaceAlloc(void)
-cpSpace* cpSpaceInit(cpSpace *space)
-cpSpace* cpSpaceNew()
-
-void cpSpaceDestroy(cpSpace *space)
-void cpSpaceFree(cpSpace *space)
-

More standard Chipmunk memory functions.

-
void cpSpaceFreeChildren(cpSpace *space)
-

This function will free all of the shapes, bodies and joints that have been added to space. Does not free space. You will still need to call cpSpaceFree() on your own. You will probably never use this in a real game, as your gamestate or game controller should manage removing and freeing objects from the space.

-

Operations:

-
void cpSpaceAddShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddBody(cpSpace *space, cpBody *body)
-void cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint)
-
-void cpSpaceRemoveShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveBody(cpSpace *space, cpBody *body)
-void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint)
-

These functions add and remove shapes, bodies and constraints from space. See the section on Static Shapes above for an explanation of what a static shape is and how it differs from a normal shape. Also, you cannot call the any of these functions from within a callback other than a post-step callback (which is different than a post-solve callback!). Attempting to add or remove objects from the space while cpSpaceStep() is still executing will throw an assertion. See the callbacks section for more information.

-

Misc:

-
void cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape)
-

Perform a query for all shapes touching shape and call cpBodyActivate() on them. This is useful when you need to move a shape explicitly. Waking shapes touching the moved shape prevents objects from sleeping when the floor is moved or something similar. You only need to do this when changing the shape of an existing shape or moving a static shape. Most other methods of moving a shape automatically would wake up other touching objects.

-

Spatial Hash Management Functions:

-

Chipmunk uses a spatial hash to accelerate it’s collision detection. While it’s not necessary to interact with the hash directly. The current API does expose some of this at the space level to allow you to tune it’s performance.

-
void cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count)
-void cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count)
-

The spatial hash data structures used by Chipmunk’s collision detection are fairly size sensitive. dim is the size of the hash cells. Setting dim to the average collision shape size is likely to give the best performance. Setting dim too small will cause the shape to be inserted into many cells, setting it too low will cause too many objects into the same hash slot.

-

count is the suggested minimum number of cells in the hash table. If there are too few cells, the spatial hash will return many false positives. Too many cells will be hard on the cache and waste memory. the Setting count to ~10x the number of objects in the space is probably a good starting point. Tune from there if necessary. By default, dim is 100.0, and count is 1000. The new demo program has a visualizer for the static hash. You can use this to get a feel for how to size things up against the spatial hash.

-

Using the spatial has visualization in the demo program you can see what I mean. The grey squares represent cells in the spatial hash. The darker the cell, the more objects have been mapped into that cell. A good dim size is when your objects fit nicely into the grid:

-

-

Notice the light grey meaning that each cell doesn’t have too many objects mapped onto it.

-

When you use too small a size, Chipmunk has to insert each object into a lot of cells. This can get expensive.

-

-

Notice that the grey cells are very small compared to the collision shapes.

-

When you use too big of a size, a lot of shapes will fit into each cell. Each shape has to be checked against every other shape in the cell, so this makes for a lot of unnecessary collision checks.

-

-

Notice the dark grey cells meaning that many objects are mapped onto them.

-
void cpSpaceRehashStatic(cpSpace *space)
-

Rehashes the shapes in the static spatial hash. You must call this if you move any static shapes or Chipmunk won’t update their collision detection data.

-
void cpSpaceRehashShape(cpSpace *space, cpShape *shape)
-

Update an individual static shape that has moved.

-

Simulating the Space:

-
void cpSpaceStep(cpSpace *space, cpFloat dt)
-

Update the space for the given time step. Using a fixed time step is highly recommended. Doing so will increase the efficiency of the contact persistence, requiring an order of magnitude fewer iterations and CPU usage.

-

Notes:

-
    -
  • When removing objects from the space, make sure you remove any other objects that reference it. For instance, when you remove a body, remove the joints and shapes attached to it.
  • -
  • The number of iterations, and the size of the time step determine the quality of the simulation. More iterations, or smaller time steps increase the quality. Keep in mind that higher quality also means higher CPU usage.
  • -
  • Because static shapes are only rehashed when you request it, it’s possible to use a much higher count argument to cpHashResizeStaticHash() than to cpSpaceResizeActiveHash(). Doing so will use more memory but can improve performance if you have a lot of static shapes.
  • -
-

-

Chipmunk Constraints: cpConstraint

-

A constraint is something that describes how two bodies interact with each other. (how they constrain each other) Constraints can be simple joints that allow bodies to pivot around each other like the bones in your body, or they can be more abstract like the gear joint or motors.

-

What constraints are and what they are not:

-

Constraints in Chipmunk are all velocity based constraints. This means that they act primarily by synchronizing the velocity of two bodies. A pivot joint holds two anchor points on two separate bodies together by defining equations that say that the velocity of the anchor points must be the same and calculating impulses to apply to the bodies to try and keep it that way. A constraint takes a velocity as it’s primary input and produces a velocity change as it’s output. Some constraints, (joints in particular) apply velocity changes to correct differences in positions. More about this in the next section.

-

A spring connected between two bodies is not a constraint. It’s very constraint-like as it creates forces that affect the velocities of the two bodies, but a spring takes distances as input and produces forces as it’s output. If a spring is not a constraint, then why do I have two varieties of spring constraints you ask? The reason is because they are damped springs. The damping associated with the spring is a true constraint that creates velocity changes based on the relative velocities of the two bodies it links. As it is convenient to put a damper and a spring together most of the time, I figured I might as well just apply the spring force as part of the constraint instead of having a damper constraint and having the user calculate and apply their own spring forces separately.

-

Fields:

-
    -
  • acpBody*: The first body that the constraint acts on.
  • -
  • bcpBody*: The second body that the constraint acts on.
  • -
  • maxForcecpFloat: is the maximum force that the constraint can use to act on the two bodies. Defaults to INFINITY.
  • -
  • biasCoefcpFloat: is the percentage of error corrected each step of the space. (Can cause issues if you don’t use a constant time step) Defaults to 0.1.
  • -
  • maxBiascpFloat: is the maximum speed at which the constraint can apply error correction. Defaults to INFINITY.
  • -
  • datacpDataPointer: A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks.
  • -
-

To access properties of specific joint types, use the getter and setter functions provided (ex: cpPinJointGetAnchr1()). See the lists of properties for more information.

-

Error correction by Feedback:

-

Joints in Chipmunk are not perfect. A pin joint can’t maintain the exact correct distance between it’s anchor points, nor can a pivot joint hold it’s anchor points completely together. Instead, they are designed to deal with this by correcting themselves over time. In Chipmunk 5, you have a fair amount of extra control over how joints correct themselves and can even use this ability to create physical effects that allow you to use joints in unique ways:

-
    -
  • Servo motors – Ex: open/close doors or rotate things without going over a maximum force.
  • -
  • Winches – Pull one object towards another at a constant speed without going over a maximum force.
  • -
  • Mouse manipulation – Interact with objects smoothly given coarse/shaky mouse input.
  • -
-

There are three public fields of cpConstraint structs that control the error correction, maxForce, maxBias, and biasCoef. maxForce is pretty self explanatory, a joint or constraint will not be able to use more than this amount of force in order to function. If it needs more force to be able to hold itself together, it will fall apart. maxBias is the maximum speed at which error correction can be applied. If you change a property on a joint so that the joint will have to correct itself, it normally does so very quickly. By setting a maxSpeed you can make the joint work like a servo, correcting itself at a constant rate over a longer period of time. Lastly, biasCoef is the percentage of error corrected every step before clamping to a maximum speed. You can use this to make joints correct themselves smoothly instead of at a constant speed, but is probably the least useful of the three properties by far.

-

-

Constraints and Collision Shapes:

-

Neither constraints or collision shapes have any knowledge of the other. When connecting joints to a body the anchor points don’t need to be inside of any shapes attached to the body and it often makes sense that they shouldn’t. Also, adding a constraint between two bodies doesn’t prevent their collision shapes from colliding. In fact, this is the primary reason that the collision group property exists.

-

Video Tour of Current Joint Types. (Requires connection to YouTube)

-

-

Shared Memory Management Functions:

-
void cpConstraintDestroy(cpConstraint *constraint)
-void cpConstraintFree(cpConstraint *constraint)
-

Destroy and Free functions are shared by all joint types. Allocation and initialization functions are specific to each joint type.

-

Misc Functions:

-
cpFloat cpConstraintGetImpulse(cpConstraint *constraint)
-

Get the most recent impulse that constraint applied. To convert this to a force, divide by the timestep passed to cpSpaceStep().

-

-

Constraint Types:

-

Pin Joints:

-
cpPinJoint *cpPinJointAlloc(void)
-cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-cpConstraint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-

a and b are the two bodies to connect, and anchr1 and anchr2 are the anchor points on those bodies. The distance between the two anchor points is measured when the joint is created. If you want to set a specific distance, use the setter function to override it.

-

Properties List:

- - - - - - - - - - - - - - - - - -
Name Type
Anchr1 cpVect
Anchr2 cpVect
Dist cpFloat
-

Slide Joints:

-
cpSlideJoint *cpSlideJointAlloc(void)
-
-cpSlideJoint *cpSlideJointInit(
-	cpSlideJoint *joint, cpBody *a, cpBody *b,
-	cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max
-)
-
-cpConstraint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max)
-

a and b are the two bodies to connect, anchr1 and anchr2 are the anchor points on those bodies, and min and max define the allowed distances of the anchor points.

-

Properties List:

- - - - - - - - - - - - - - - - - - - - - -
Name Type
Anchr1 cpVect
Anchr2 cpVect
Min cpFloat
Max cpFloat
-

Pivot Joints:

-
cpPivotJoint *cpPivotJointAlloc(void)
-cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect pivot)
-cpConstraint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot)
-cpConstraint *cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-

a and b are the two bodies to connect, and pivot is the point in world coordinates of the pivot. Because the pivot location is given in world coordinates, you must have the bodies moved into the correct positions already. Alternatively you can specify the joint based on a pair of anchor points, but make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space.

-

Properties List:

- - - - - - - - - - - - - -
Name Type
Anchr1 cpVect
Anchr2 cpVect
-

Groove Joint:

-
cpGrooveJoint *cpGrooveJointAlloc(void)
-
-cpGrooveJoint *cpGrooveJointInit(
-	cpGrooveJoint *joint, cpBody *a, cpBody *b,
-	cpVect groove_a, cpVect groove_b, cpVect anchr2
-)
-
-cpConstraint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2)
-

The groove goes from groov_a to groove_b on body a, and the pivot is attached to anchr2 on body b. All coordinates are body local.

-

Properties List:

- - - - - - - - - - - - - - - - - -
Name Type
Anchr2 cpVect
GrooveA cpVect
GrooveB cpVect
-

Damped Spring:

-
cpDampedSpring *cpDampedSpringAlloc(void)
-
-cpDampedSpring *cpDampedSpringInit(
-	cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2,
-	cpFloat restLength, cpFloat stiffness, cpFloat damping
-)
-
-cpConstraint *cpDampedSpringNew(
-	cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2,
-	cpFloat restLength, cpFloat stiffness, cpFloat damping
-)
-

Defined much like a slide joint. restLength is the distance the spring wants to be, stiffness is the spring constant (Young’s modulus), and damping is how soft to make the damping of the spring.

-

Properties List:

- - - - - - - - - - - - - - - - - - - - - - - - - -
Name Type
Anchr1 cpVect
Anchr2 cpVect
RestLength cpFloat
Stiffness cpFloat
Damping cpFloat
-

Damped Rotary Spring:

-
cpDampedRotarySpring *cpDampedRotarySpringAlloc(void)
-
-cpDampedRotarySpring *cpDampedRotarySpringInit(
-	cpDampedRotarySpring *joint, cpBody *a, cpBody *b,
-	cpFloat restAngle, cpFloat stiffness, cpFloat damping
-)
-
-cpConstraint *cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping)
-

Like a damped spring, but works in an angular fashion. restAngle is the relative angle in radians that the bodies want to have, stiffness and damping work basically the same as on a damped spring.

-

Properties List:

- - - - - - - - - - - - - - - - - -
Name Type
RestAngle cpFloat
Stiffness cpFloat
Damping cpFloat
-

Rotary Limit Joint:

-
cpRotaryLimitJoint *cpRotaryLimitJointAlloc(void)
-cpRotaryLimitJoint *cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max)
-cpConstraint *cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max)
-

Constrains the relative rotations of two bodies. min and max are the angular limits in radians. It is implemented so that it’s possible to for the range to be greater than a full revolution.

-

Properties List:

- - - - - - - - - - - - - -
Name Type
Min cpFloat
Max cpFloat
-

Ratchet Joint:

-
cpRatchetJoint *cpRatchetJointAlloc(void);
-cpRatchetJoint *cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
-cpConstraint *cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
-

Works like a socket wrench. ratchet is the distance between “clicks”, phase is the initial offset to use when deciding where the ratchet angles are.

-

Properties List:

- - - - - - - - - - - - - - - - - -
Name Type
Angle cpFloat
Phase cpFloat
Ratchet cpFloat
-

Gear Joint:

-
cpGearJoint *cpGearJointAlloc(void);
-cpGearJoint *cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
-cpConstraint *cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
-

Keeps the angular velocity ratio of a pair of bodies constant. ratio is always measured in absolute terms. It is currently not possible to set the ratio in relation to a third body’s angular velocity. phase is the initial angular offset of the two bodies.

-

Properties List:

- - - - - - - - - - - - - -
Name Type
Phase cpFloat
Ratio cpFloat
-

Simple Motor:

-
cpSimpleMotor *cpSimpleMotorAlloc(void);
-cpSimpleMotor *cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate);
-cpConstraint *cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate);
-

Keeps the relative angular velocity of a pair of bodies constant. rate is the desired relative angular velocity. You will usually want to set an force (torque) maximum for motors as otherwise they will be able to apply a nearly infinite torque to keep the bodies moving.

-

Properties List:

- - - - - - - - - -
Name Type
Rate cpFloat
-

Notes:

-
    -
  • You can add multiple joints between two bodies, but make sure that they don’t fight. Doing so can cause the bodies jitter or spin violently.
  • -
-

-

Overview of Collision Detection in Chipmunk:

-

In order to make collision detection in Chipmunk as fast as possible, the process is broken down into several stages. While I’ve tried to keep it conceptually simple, the implementation can be a bit daunting. Fortunately as a user of the library, you don’t need to understand everything about how it works. If you are trying to squeeze every ounce of performance out of Chipmunk, understanding this section is crucial.

-

Magic Collision Detection Globals:

-

Chipmunk contains a few global variables that control how collisions are solved. They can’t be set on a per space basis, but most games wont need to change them at all.

-
extern cpFloat cp_bias_coef
-

Because Chipmunk does not perform swept collisions, shapes may overlap. Each time you call cpSpaceStep() Chipmunk fixes a percentage of the overlap to push the shapes apart. By default, this value is set to 0.1. With this setting, after 15 steps the overlap will be reduced to 20%, after 30 it will be reduced to 4%. This is usually satisfactory for most games. Setting cp_bias_coef to 1.0 is not recommended as it will reduce the stability of stacked objects.

-
extern cpFloat cp_collision_slop
-

Chipmunk’s impulse solver works by caching the last solution as it is likely to be very similar to the current one. In order to help keep objects touching, Chipmunk allows objects to overlap a small amount. By default this value is 0.1. If you are using pixel coordinates you won’t even notice. If using a different scale, adjust the value to be as high as possible without creating any unwanted visual overlap.

-
extern cpTimestamp cp_contact_persistence
-

This is how many steps the space should remember old contact solutions. The default value is 3 and it’s unlikely that you’ll need to change it.

-

Spatial Hashing:

-

Chipmunk uses a spatial hash for its broad phase culling. Spatial hashes are very efficient for a scene made up of consistently sized objects. It basically works by taking the axis aligned bounding boxes for all the objects in the scene, mapping them onto an infinite sized grid, then mapping those grid cells onto a finite sized hash table. This way, you only have to check collisions between objects in the same hash table cells, and mapping the objects onto the grid can be done fairly quickly. Objects in the same hash table cells tend to be very close together, and therefore more likely to be colliding. The downside is that in order to get the best performance out of a spatial hash, you have to tune the size of the grid cells and the size of the hash table so you don’t get too many false positives. For more information about tuning the hash see the cpSpace section.

-

Things to keep in mind:

-
    -
  • Using too small a grid size means that your objects will be split into many grid cells which means that the spatial hash will spend a lot of time filling empty hash cells for just one object and rarely finding any with multiple objects. Making the grid size too big means that you will be putting a lot of objects into a single hash cell, and collisions will have to be checked between all of them.
  • -
  • Using too small of a hash table means that you will map too many far away objects into a single hash cell. Using too many means that the hash table will have to spend a lot of time doing clears and rehashes.
  • -
-

For more information on spatial hashing in general, Optimized Spatial Hashing for Collision Detection of Deformable Objects is a good paper that covers all the basics.

-

Collision Filtering:

-

After the spatial hash figures out pairs of shapes that are likely to be near each other, it passes them back to the space to perform some additional filtering on the pairs. If the pairs pass all the filters, then Chipmunk will test if the shapes are actually overlapping. If the shape to shape collision check passes, then the collision handler callbacks are called. These tests are much faster to try than the shape to shape collision checks, so use these if you can to reject collisions early instead of rejecting them from callbacks if you can.

-
    -
  • Bounding Box Test: The shapes are not colliding if their bounding boxes are not overlapping. You can’t really affect this, but this is when it’s done.
  • -
  • Layer Test: The shapes are not colliding if they don’t occupy and of the same layers. (the bitwise AND of their layer masks is 0)
  • -
  • Group Test: Shapes shouldn’t collide with other shapes in the same non-zero group.
  • -
-

Primitive Shape to Shape Collision Detection:

-

The most expensive test that you can do to see if shapes should collide is to actually check based on their geometry. Circle to circle and circle to line collisions are pretty quick. Poly to poly collisions get more expensive as the number of vertexes increases. Simpler shapes make for faster collisions (and more importantly fewer collision points for the solver to run).

-

Collision Handler Filtering:

-

After checking if two shapes overlap Chipmunk will look to see if you have defined a collision handler for the collision types of the shapes. This gives you a large amount of flexibility to process collisions events, but also gives you a very flexible way to filter out collisions. The return value of the begin and preSolve callback determines whether or not the colliding pair of shapes is discarded or not. Returning true will keep the pair, false will discard it. If you don’t define a handler for the given collision_types, Chipmunk will call the space’s default handler, which by default is defined to simply accept all collisions.

-

While using callbacks to filter collisions is the most flexible way, keep in mind that by the time your callback is called all of the most expensive collision detection has already been done. For simulations with a lot of colliding objects each frame, the time spent finding collisions is small compared to the time spent solving the physics for them so it may not be a big deal. Still, use layers or groups first if you can.

-

-

Callbacks:

-

A physics library without any events or feedback would not be very useful for games. How would you know when the player bumped into an enemy so that you could take some health points away? How would you know how hard the car hit something so you don’t play a loud crash noise when a pebble hits it? What if you need to decide if a collision should be ignored based on specific conditions, like implementing one way platforms? Chipmunk has a number of powerful callback systems that you can plug into to accomplish all of that.

-

Collision Handlers:

-

A collision handler is a set of 4 function callbacks for the different collision events that Chipmunk recognizes. The event types are:

-
-

Collision callbacks are closely associated with cpArbiter structs. You should familiarize yourself with those as well.

-

Note: Shapes tagged as sensors (cpShape.sensor == true) never generate collisions that get processed so collisions between sensors shapes and other shapes will never call the post-solve callback. They still generate begin, and separate callbacks, and the pre solve callback is also called every frame even though there is no real collision.

-

Collision Handler API:

-
typedef int (*cpCollisionBeginFunc)(cpArbiter *arb, struct cpSpace *space, void *data)
-typedef int (*cpCollisionPreSolveFunc)(cpArbiter *arb, cpSpace *space, void *data)
-typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, cpSpace *space, void *data)
-typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, cpSpace *space, void *data)
-

Collision handler function types. While all of them take an arbiter, space, and a user data pointer, only the begin and pre-solve callbacks return a value. See above for more information.

-
void cpSpaceAddCollisionHandler(
-	cpSpace *space,
-	cpCollisionType a, cpCollisionType b,
-	cpCollisionBeginFunc begin,
-	cpCollisionPreSolveFunc preSolve,
-	cpCollisionPostSolveFunc postSolve,
-	cpCollisionSeparateFunc separate,
-	void *data
-)
-

Add a collision handler for given collision type pair. Whenever a shapes with collision type (cpShape.collision_type) a and collision type b collide, these callbacks will be used to process the collision. data is a user definable context pointer that is passed to each of the callbacks. NULL can be provided for callbacks you do not wish to implement, however Chipmunk will call it’s own default versions for these and not the default ones you’ve set up for the space. If you need to fall back on the space’s default callbacks, you’ll have to provide them individually to each handler definition.

-
void cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b)
-

Remove a collision handler for a given collision type pair.

-
void cpSpaceSetDefaultCollisionHandler(
-	cpSpace *space,
-	cpCollisionType a, cpCollisionType b,
-	cpCollisionBeginFunc begin,
-	cpCollisionPreSolveFunc preSolve,
-	cpCollisionPostSolveFunc postSolve,
-	cpCollisionSeparateFunc separate,
-	void *data
-)
-

Register a default collision handler to be used when no specific collision handler is found. The space is given a default handler when created that returns true for all collisions in begin() and preSolve() and does nothing in the postSolve() and separate() callbacks.

-

Post-Step Callbacks:

-

Post-step callbacks are the one place where you can break the rules about adding or removing objects from within a callback. In fact, their primary function is to help you safely remove objects from the space that you wanted to disable or destroy in a collision callback.

-

Post step callbacks are registered as a function and a pointer that is used as a key. You can only register one post step callback per key. This prevents you from accidentally removing an object more than once. For instance, say that you get a collision callback between a bullet and object A. You want to destroy both the bullet and object A, so you register a post-step callback to safely remove them from your game. Then you get a second collision callback between the bullet and object B. You register a post-step callback to remove object B, and a second post-step callback to remove the bullet. Because you can only register one callback per key, the post-step callback for the bullet will only be called once and you can’t accidentally register to have it removed twice.

-

Note: Additional callbacks registered to the same key are ignored even if they use a different callback function or data pointer.

-
typedef void (*cpPostStepFunc)(cpSpace *space, void *key, void *data)
-

Function type used for post step callbacks. space is the space the callback was registered on, obj is the pointer value you supplied as the key, and data is a user definable pointer you can use to pass in as a context value.

-
void cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *key, void *data)
-

Add func to be called before cpSpaceStep() returns. obj and data will be passed to your function. Only the last callback registered for any unique value of obj will be recorded. You can add post-step callbacks from outside of other callback functions, but they won’t be called until cpSpaceStep() is called again.

-

Examples:

-

See the callback examples for more information.

-

-

Chipmunk Collision Pairs: cpArbiter

-

First of all, why are they called arbiters? The short answer is that Box2D called them that way back in 2006 when I was looking at the source for it’s solver. An arbiter is like a judge, a person that has authority to settle disputes between two people. It was a fun, fitting name and was shorter to type than CollisionPair which I had been using. :p

-

Originally arbiters were going to be an internal data type that Chipmunk used that wouldn’t ever be sent to outside code. In Chipmunk 4.x and earlier, only a single callback hook was provided for handling collision events. It was triggered every step that to shapes were touching. This made it non-trivial to track when objects started and stopped touching as the user would have to record and process this themselves. Many people, including myself, wanted to get collision begin/separate events and eventually I realized that information was already being stored in the arbiter cache that the Chipmunk maintains. With some changes to the collision callback API, that information is now exposed to the user. Internally, arbiters are used primarily for solving collision impulses. To external users, you can simply think of them as a weird type used in collision callbacks.

-

Memory Management:

-

You should never need to create an arbiter, nor will you ever need to free one as they are handled by the space. More importantly, because they are managed by the space you should never store a reference to an arbiter as you don’t know when they will be destroyed. Use them within the callback where they are given to you and then forget about them or copy out the information you need.

-

Helper Functions:

-
void cpArbiterGetShapes(cpArbiter *arb, cpShape **a, cpShape **b)
-#define CP_ARBITER_GET_SHAPES(arb, a, b) cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
-

Get the shapes in the order that they were defined in the collision handler associated with this arbiter. If you defined the handler as cpSpaceAddCollisionHandler(space, 1, 2, ...), you you will find that a->collision_type == 1 and b->collision_type == 2. The convenience macro defines and initializes the two shape variables for you. example

-
int cpArbiterIsFirstContact(cpArbiter *arb)
-

Returns true if this is the first step that the shapes touched. You can use this from preSolve() and postSolve() callbacks to know if a collision between two shapes is new without needing to flag a boolean in your begin callback.

-
typedef struct cpContactPointSet {
-	int count;
-	
-	struct {
-		cpVect point, normal;
-		cpFloat dist;
-	} points[CP_MAX_CONTACTS_PER_ARBITER];
-} cpContactPointSet;
-
-static inline cpContactPointSet
-cpArbiterGetContactPointSet(const cpArbiter *arb)
-

Returns a cpContactPointSet structure. This is the new and preferred API for working with contact points instead of the cpArbiterGet*() functions as it is faster and slightly simpler.

-
cpContactPointSet set = cpArbiterGetContactPointSet(arbiter);
-for(int i=0; i<set.count; i++){
-	// get and work with the collision point normal and penetration distance:
-	set.points[i].point
-	set.points[i].normal
-	set.points[i].dist
-}
- -
cpVect cpArbiterGetCount(cpArbiter *arb)
-

Returns the number of contact points in this arbiter.

-
cpVect cpArbiterGetNormal(cpArbiter *arb, int i)
-

Returns the collision normal for the i’th contact point, flipping it if necessary. Note: Currently due to how Chipmunk’s collision detection is implemented, the collision normals will be the same for all collision points. You can simply do cpArbiterGetNormal(arb, 0) and not have to check each contact point. Note: calling this function from the separate() callback is undefined.

-
cpVect cpArbiterGetPoint(cpArbiter *arb, int i)
-

Returns the position of the i’th collision point. Note: calling this function from the separate() callback is undefined.

-
cpVect cpArbiterGetDepth(cpArbiter *arb, int i)
-

Returns the penetration depth of the i’th collision point.

-
cpVect cpArbiterTotalImpulse(cpArbiter *arb);
-cpVect cpArbiterTotalImpulseWithFriction(cpArbiter *arb);
-

Returns the impulse that was applied this step to resolve the collision. These functions should only be called from a postStep() callback, otherwise the result is undefined. Note: If you are using the deprecated elastic iterations setting on your space, it will cause you to get incorrect results. Elastic iterations should no longer be needed, and you should be able to safely turn them off.

-

Fields:

-

It’s unlikely that you’ll need to interact with a cpArbiter struct directly as the collision helper functions should provide most functionality that people will need. One exception is the e, and u fields. By default, Chipmunk multiplies the friction and elasticity values of to shapes together to determine what values to use when solving the collision. This mostly works, but in many cases is simply not flexible enough. If you are running into problems with that, you can change the values calculated for e and u in a preSolve callback. This is likely to change in the next major version of Chipmunk.

-
    -
  • numContactsint: Number of contact points for this collision.
  • -
  • ecpFloat: Calculated amount of elasticity to apply for this collision. Can be overriden from a preSolve() callback.
  • -
  • ucpFloat: Calculated amount of friction to apply for this collision. Can be overriden from a preSolve() callback.
  • -
  • surface_vcpVect: Calculated amount of surface velocity to apply for this collision. Can be overriden from a preSolve() callback. (Very likely to change in the next major version of Chipmunk).
  • -
-

-

Queries:

-

Chipmunk spaces currently support three kinds of spatial queries, point, segment and bounding box. Any type can be done efficiently against an entire space, or against individual shapes. All types of queries take a collision group and layer that are used to filter matches out using the same rules used for filtering collisions between shapes. See cpShape for more information. If you don’t want to filter out any matches, use CP_ALL_LAYERS for the layers and CP_NO_GROUP as the group.

-

Point Queries:

-

Point queries are useful for things like mouse picking and simple sensors.

-
cpBool cpShapePointQuery(cpShape *shape, cpVect p)
-

Check if the given point lies within the shape.

-
typedef void (*cpSpacePointQueryFunc)(cpShape *shape, void *data);
-
-void cpSpacePointQuery(
-	cpSpace *space, cpVect point,
-	cpLayers layers, cpGroup group,
-	cpSpacePointQueryFunc func, void *data
-)
-

Query space at point filtering out matches with the given layers and group. func is called for each shape found along with the data argument passed to cpSpacePointQuery(). Sensor shapes are included.

-
cpShape *cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group)
-

Query space at point and return the first shape found matching the given layers and group. Returns NULL if no shape was found. Sensor shapes are ignored.

-

Segment Queries:

-

Segment queries are like ray casting, but because Chipmunk uses a spatial hash to process collisions, it cannot process infinitely long queries like a ray. In practice this is still very fast and you don’t need to worry too much about the performance as long as you aren’t using extremely long segments for your queries.

-
typedef struct cpSegmentQueryInfo{
-	struct cpShape *shape; // shape that was hit, NULL if no collision
-	cpFloat t; // Distance along query segment, will always be in the range "1":0,.
-	cpVect n; // normal of hit surface
-} cpSegmentQueryInfo;
-

Segment queries return more information than just a simple yes or no, they also return where a shape was hit and it’s surface normal at the hit point. t is the percentage between the query start and end points. If you need the hit point in world space or the absolute distance from start, see the segment query helper functions farther down.

-
cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info)
-

Check if the line segment from a to b intersects the shape. info must be a valid pointer to a cpSegmentQueryInfo structure which will be initialized with the raycast info.

-
typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data)
-
-void cpSpaceSegmentQuery(
-	cpSpace *space, cpVect start, cpVect end,
-	cpLayers layers, cpGroup group,
-	cpSpaceSegmentQueryFunc func, void *data
-)
-

Query space along the line segment from start to end filtering out matches with the given layers and group. func is called with the normalized distance along the line and surface normal for each shape found along with the data argument passed to cpSpacePointQuery(). Sensor shapes are included.

-
cpShape *cpSpaceSegmentQueryFirst(
-	cpSpace *space, cpVect start, cpVect end,
-	cpLayers layers, cpGroup group,
-	cpSegmentQueryInfo *info
-)
-

Query space along the line segment from start to end filtering out matches with the given layers and group. Only the first shape encountered is returned and the search is short circuited. Returns NULL if no shape was found. The info struct pointed to by info will be initialized with the raycast info unless info is NULL. Sensor shapes are ignored.

-

Segment Query Helper Functions:

-
cpVect cpSegmentQueryHitPoint(cpVect start, cpVect end, cpSegmentQueryInfo info)
-

Return the hit point in world coordinates where the segment first intersected with the shape.

-
cpFloat cpSegmentQueryHitDist(cpVect start, cpVect end, cpSegmentQueryInfo info)
-

Return the absolute distance where the segment first hit the shape.

-

Examples:

-

See the query examples for more information.

- - diff --git a/3rdparty/chipmunk-5.3.4/doc/stylesheet.css b/3rdparty/chipmunk-5.3.4/doc/stylesheet.css deleted file mode 100644 index 54ffe494b2..0000000000 --- a/3rdparty/chipmunk-5.3.4/doc/stylesheet.css +++ /dev/null @@ -1,23 +0,0 @@ -h1, h2 { padding: 3px; } -h1 { background-color: #DB944D;} -h2 { background-color: lightGrey;} -p { margin-left: 1em; } -p.expl { margin-left: 2em; } -code { color: #191970 } - -pre { - background-color: #F0F0F0; - padding: 3px; - margin-left: 1em; -} - -table { - border: 2px solid black; - border-collapse: collapse; - margin-left: 1em; -} - -table td, th { - border: 1px black solid; - padding: 5px; -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk.h deleted file mode 100644 index 03581b0616..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef CHIPMUNK_HEADER -#define CHIPMUNK_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef CP_ALLOW_PRIVATE_ACCESS - #define CP_ALLOW_PRIVATE_ACCESS 1 -#endif - -#if CP_ALLOW_PRIVATE_ACCESS == 1 - #define CP_PRIVATE(symbol) symbol -#else - #define CP_PRIVATE(symbol) symbol##_private -#endif - -void cpMessage(const char *message, const char *condition, const char *file, int line, int isError); -#ifdef NDEBUG - #define cpAssertWarn(condition, message) -#else - #define cpAssertWarn(condition, message) if(!(condition)) cpMessage(message, #condition, __FILE__, __LINE__, 0) -#endif - -#ifdef NDEBUG - #define cpAssert(condition, message) -#else - #define cpAssert(condition, message) if(!(condition)) cpMessage(message, #condition, __FILE__, __LINE__, 1) -#endif - -#include "chipmunk_types.h" - -#ifndef INFINITY - #ifdef _MSC_VER - union MSVC_EVIL_FLOAT_HACK - { - unsigned __int8 Bytes[4]; - float Value; - }; - static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}}; - #define INFINITY (INFINITY_HACK.Value) - #endif - - #ifdef __GNUC__ - #define INFINITY (__builtin_inf()) - #endif - - #ifndef INFINITY - #define INFINITY (1e1000) - #endif -#endif - -// Maximum allocated size for various Chipmunk buffers -#define CP_BUFFER_BYTES (32*1024) - -#define cpmalloc malloc -#define cpcalloc calloc -#define cprealloc realloc -#define cpfree free - -#include "cpVect.h" -#include "cpBB.h" -#include "cpArray.h" -#include "cpHashSet.h" -#include "cpSpaceHash.h" - -#include "cpBody.h" -#include "cpShape.h" -#include "cpPolyShape.h" - -#include "cpArbiter.h" -#include "cpCollision.h" - -#include "constraints/cpConstraint.h" - -#include "cpSpace.h" - -#define CP_HASH_COEF (3344921057ul) -#define CP_HASH_PAIR(A, B) ((cpHashValue)(A)*CP_HASH_COEF ^ (cpHashValue)(B)*CP_HASH_COEF) - -extern const char *cpVersionString; -void cpInitChipmunk(void); - -/** - Calculate the moment of inertia for a circle. - r1 and r2 are the inner and outer diameters. A solid circle has an inner diameter of 0. -*/ -cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset); - -/** - Calculate area of a hollow circle. -*/ -cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2); - -/** - Calculate the moment of inertia for a line segment. - Beveling radius is not supported. -*/ -cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b); - -/** - Calculate the area of a fattened (capsule shaped) line segment. -*/ -cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r); - -/** - Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex. -*/ -cpFloat cpMomentForPoly(cpFloat m, int numVerts, const cpVect *verts, cpVect offset); - -/** - Calculate the signed area of a polygon. -*/ -cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts); - -/** - Calculate the natural centroid of a polygon. -*/ -cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts); - -/** - Center the polygon on the origin. (Subtracts the centroid of the polygon from each vertex) -*/ -void cpRecenterPoly(const int numVerts, cpVect *verts); - -/** - Calculate the moment of inertia for a solid box. -*/ -cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height); - -#ifdef __cplusplus -} - -static inline cpVect operator *(const cpVect v, const cpFloat s){return cpvmult(v, s);} -static inline cpVect operator +(const cpVect v1, const cpVect v2){return cpvadd(v1, v2);} -static inline cpVect operator -(const cpVect v1, const cpVect v2){return cpvsub(v1, v2);} -static inline cpBool operator ==(const cpVect v1, const cpVect v2){return cpveql(v1, v2);} -static inline cpVect operator -(const cpVect v){return cpvneg(v);} - -#endif - -#endif diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_ffi.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_ffi.h deleted file mode 100644 index 7fe0d8ec90..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_ffi.h +++ /dev/null @@ -1,59 +0,0 @@ -// Create non static inlined copies of Chipmunk functions, useful for working with dynamic FFIs -// This file should only be included in chipmunk.c - -#ifdef _MSC_VER - #if _MSC_VER >= 1600 - #define MAKE_REF(name) decltype(name) *_##name = name - #else - #define MAKE_REF(name) - #endif -#else - #define MAKE_REF(name) __typeof__(name) *_##name = name -#endif - -MAKE_REF(cpv); // makes a variable named _cpv that contains the function pointer for cpv() -MAKE_REF(cpveql); -MAKE_REF(cpvadd); -MAKE_REF(cpvneg); -MAKE_REF(cpvsub); -MAKE_REF(cpvmult); -MAKE_REF(cpvdot); -MAKE_REF(cpvcross); -MAKE_REF(cpvperp); -MAKE_REF(cpvrperp); -MAKE_REF(cpvproject); -MAKE_REF(cpvrotate); -MAKE_REF(cpvunrotate); -MAKE_REF(cpvlengthsq); -MAKE_REF(cpvlerp); -MAKE_REF(cpvnormalize); -MAKE_REF(cpvnormalize_safe); -MAKE_REF(cpvclamp); -MAKE_REF(cpvlerpconst); -MAKE_REF(cpvdist); -MAKE_REF(cpvdistsq); -MAKE_REF(cpvnear); - -MAKE_REF(cpBBNew); -MAKE_REF(cpBBintersects); -MAKE_REF(cpBBcontainsBB); -MAKE_REF(cpBBcontainsVect); -MAKE_REF(cpBBmerge); -MAKE_REF(cpBBexpand); - -MAKE_REF(cpBodyWorld2Local); -MAKE_REF(cpBodyLocal2World); -MAKE_REF(cpBodyApplyImpulse); -MAKE_REF(cpBodyIsSleeping); -MAKE_REF(cpBodyIsRogue); -MAKE_REF(cpBodyKineticEnergy); - -MAKE_REF(cpArbiterIsFirstContact); -MAKE_REF(cpArbiterGetShapes); -MAKE_REF(cpArbiterGetNormal); -MAKE_REF(cpArbiterGetPoint); - -MAKE_REF(cpConstraintGetImpulse); - -MAKE_REF(cpSegmentQueryHitPoint); -MAKE_REF(cpSegmentQueryHitDist); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_private.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_private.h deleted file mode 100644 index 1aa52ace49..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_private.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define CP_ALLOW_PRIVATE_ACCESS 1 -#include "chipmunk.h" - -void *cpSpaceGetPostStepData(cpSpace *space, void *obj); - -void cpSpaceActivateBody(cpSpace *space, cpBody *body); - -static inline void -cpSpaceLock(cpSpace *space) -{ - space->locked++; -} - -static inline void -cpSpaceUnlock(cpSpace *space) -{ - space->locked--; - cpAssert(space->locked >= 0, "Internal error:Space lock underflow."); - - if(!space->locked){ - cpArray *waking = space->rousedBodies; - for(int i=0, count=waking->num; iarr[i]); - } - - waking->num = 0; - } -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_types.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_types.h deleted file mode 100644 index 33cea2d544..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_types.h +++ /dev/null @@ -1,153 +0,0 @@ -#ifdef __APPLE__ - #import "TargetConditionals.h" -#endif - -#if (defined TARGET_OS_IPHONE) && (!defined CP_USE_CGPOINTS) - #define CP_USE_CGPOINTS -#endif - -#ifdef CP_USE_CGPOINTS - #if TARGET_OS_IPHONE - #import - #elif TARGET_OS_MAC - #import - #endif - - #if defined(__LP64__) && __LP64__ - #define CP_USE_DOUBLES 1 - #else - #define CP_USE_DOUBLES 0 - #endif -#endif - -#ifndef CP_USE_DOUBLES - // use doubles by default for higher precision - #ifndef ANDROID - #define CP_USE_DOUBLES 1 - #endif -#endif - -#if CP_USE_DOUBLES - typedef double cpFloat; - #define cpfsqrt sqrt - #define cpfsin sin - #define cpfcos cos - #define cpfacos acos - #define cpfatan2 atan2 - #define cpfmod fmod - #define cpfexp exp - #define cpfpow pow - #define cpffloor floor - #define cpfceil ceil -#else - typedef float cpFloat; - #define cpfsqrt sqrtf - #define cpfsin sinf - #define cpfcos cosf - #define cpfacos acosf - #define cpfatan2 atan2f - #define cpfmod fmodf - #define cpfexp expf - #define cpfpow powf - #define cpffloor floorf - #define cpfceil ceilf -#endif - -static inline cpFloat -cpfmax(cpFloat a, cpFloat b) -{ - return (a > b) ? a : b; -} - -static inline cpFloat -cpfmin(cpFloat a, cpFloat b) -{ - return (a < b) ? a : b; -} - -static inline cpFloat -cpfabs(cpFloat n) -{ - return (n < 0) ? -n : n; -} - -static inline cpFloat -cpfclamp(cpFloat f, cpFloat min, cpFloat max) -{ - return cpfmin(cpfmax(f, min), max); -} - -static inline cpFloat -cpflerp(cpFloat f1, cpFloat f2, cpFloat t) -{ - return f1*(1.0f - t) + f2*t; -} - -static inline cpFloat -cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d) -{ - return f1 + cpfclamp(f2 - f1, -d, d); -} - -// CGPoints are structurally the same, and allow -// easy interoperability with other Cocoa libraries -#ifdef CP_USE_CGPOINTS - typedef CGPoint cpVect; -#else - typedef struct cpVect{cpFloat x,y;} cpVect; -#endif - -typedef unsigned int cpHashValue; - -// Oh C, how we love to define our own boolean types to get compiler compatibility -#ifdef CP_BOOL_TYPE - typedef CP_BOOL_TYPE cpBool; -#else - typedef int cpBool; -#endif - -#ifndef cpTrue - #define cpTrue 1 -#endif - -#ifndef cpFalse - #define cpFalse 0 -#endif - -#ifdef CP_DATA_POINTER_TYPE - typedef CP_DATA_POINTER_TYPE cpDataPointer; -#else - typedef void * cpDataPointer; -#endif - -#ifdef CP_COLLISION_TYPE_TYPE - typedef CP_COLLISION_TYPE_TYPE cpCollisionType; -#else - typedef unsigned int cpCollisionType; -#endif - -#ifdef CP_GROUP_TYPE - typedef CP_GROUP_TYPE cpGroup; -#else - typedef unsigned int cpGroup; -#endif - -#ifdef CP_LAYERS_TYPE - typedef CP_GROUP_TYPE cpLayers; -#else - typedef unsigned int cpLayers; -#endif - -#ifdef CP_TIMESTAMP_TYPE - typedef CP_TIMESTAMP_TYPE cpTimestamp; -#else - typedef unsigned int cpTimestamp; -#endif - -#ifndef CP_NO_GROUP - #define CP_NO_GROUP ((cpGroup)0) -#endif - -#ifndef CP_ALL_LAYERS - #define CP_ALL_LAYERS (~(cpLayers)0) -#endif diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_unsafe.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_unsafe.h deleted file mode 100644 index c5a3f5c857..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/chipmunk_unsafe.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - - -/* This header defines a number of "unsafe" operations on Chipmunk objects. - * In this case "unsafe" is referring to operations which may reduce the - * physical accuracy or numerical stability of the simulation, but will not - * cause crashes. - * - * The prime example is mutating collision shapes. Chipmunk does not support - * this directly. Mutating shapes using this API will caused objects in contact - * to be pushed apart using Chipmunk's overlap solver, but not using real - * persistent velocities. Probably not what you meant, but perhaps close enough. - */ - -#ifndef CHIPMUNK_UNSAFE_HEADER -#define CHIPMUNK_UNSAFE_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -void cpCircleShapeSetRadius(cpShape *shape, cpFloat radius); -void cpCircleShapeSetOffset(cpShape *shape, cpVect offset); - -void cpSegmentShapeSetEndpoints(cpShape *shape, cpVect a, cpVect b); -void cpSegmentShapeSetRadius(cpShape *shape, cpFloat radius); - -void cpPolyShapeSetVerts(cpShape *shape, int numVerts, cpVect *verts, cpVect offset); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpConstraint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpConstraint.h deleted file mode 100644 index fe11e65196..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpConstraint.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// TODO: Comment me! - -extern cpFloat cp_constraint_bias_coef; - -struct cpConstraintClass; -struct cpConstraint; - -typedef void (*cpConstraintPreStepFunction)(struct cpConstraint *constraint, cpFloat dt, cpFloat dt_inv); -typedef void (*cpConstraintApplyImpulseFunction)(struct cpConstraint *constraint); -typedef cpFloat (*cpConstraintGetImpulseFunction)(struct cpConstraint *constraint); - -typedef struct cpConstraintClass { - cpConstraintPreStepFunction preStep; - cpConstraintApplyImpulseFunction applyImpulse; - cpConstraintGetImpulseFunction getImpulse; -} cpConstraintClass; - - - -typedef struct cpConstraint { - CP_PRIVATE(const cpConstraintClass *klass); - - cpBody *a, *b; - cpFloat maxForce; - cpFloat biasCoef; - cpFloat maxBias; - - cpDataPointer data; -} cpConstraint; - -#ifdef CP_USE_DEPRECATED_API_4 -typedef cpConstraint cpJoint; -#endif - -void cpConstraintDestroy(cpConstraint *constraint); -void cpConstraintFree(cpConstraint *constraint); - -static inline void -cpConstraintActivateBodies(cpConstraint *constraint) -{ - cpBody *a = constraint->a; if(a) cpBodyActivate(a); - cpBody *b = constraint->b; if(b) cpBodyActivate(b); -} - -static inline cpFloat -cpConstraintGetImpulse(cpConstraint *constraint) -{ - return constraint->CP_PRIVATE(klass)->getImpulse(constraint); -} - -#define cpConstraintCheckCast(constraint, struct) \ - cpAssert(constraint->CP_PRIVATE(klass) == struct##GetClass(), "Constraint is not a "#struct); - - -#define CP_DefineConstraintGetter(struct, type, member, name) \ -static inline type \ -struct##Get##name(const cpConstraint *constraint){ \ - cpConstraintCheckCast(constraint, struct); \ - return ((struct *)constraint)->member; \ -} \ - -#define CP_DefineConstraintSetter(struct, type, member, name) \ -static inline void \ -struct##Set##name(cpConstraint *constraint, type value){ \ - cpConstraintCheckCast(constraint, struct); \ - cpConstraintActivateBodies(constraint); \ - ((struct *)constraint)->member = value; \ -} \ - -#define CP_DefineConstraintProperty(struct, type, member, name) \ -CP_DefineConstraintGetter(struct, type, member, name) \ -CP_DefineConstraintSetter(struct, type, member, name) - -// Built in Joint types -#include "cpPinJoint.h" -#include "cpSlideJoint.h" -#include "cpPivotJoint.h" -#include "cpGrooveJoint.h" -#include "cpDampedSpring.h" -#include "cpDampedRotarySpring.h" -#include "cpRotaryLimitJoint.h" -#include "cpRatchetJoint.h" -#include "cpGearJoint.h" -#include "cpSimpleMotor.h" diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedRotarySpring.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedRotarySpring.h deleted file mode 100644 index b446a3a513..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedRotarySpring.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef cpFloat (*cpDampedRotarySpringTorqueFunc)(struct cpConstraint *spring, cpFloat relativeAngle); - -const cpConstraintClass *cpDampedRotarySpringGetClass(); - -typedef struct cpDampedRotarySpring { - cpConstraint constraint; - cpFloat restAngle; - cpFloat stiffness; - cpFloat damping; - cpDampedRotarySpringTorqueFunc springTorqueFunc; - - cpFloat target_wrn; - cpFloat w_coef; - - cpFloat iSum; -} cpDampedRotarySpring; - -cpDampedRotarySpring *cpDampedRotarySpringAlloc(void); -cpDampedRotarySpring *cpDampedRotarySpringInit(cpDampedRotarySpring *joint, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); -cpConstraint *cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, restAngle, RestAngle); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, stiffness, Stiffness); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, damping, Damping); -CP_DefineConstraintProperty(cpDampedRotarySpring, cpDampedRotarySpringTorqueFunc, springTorqueFunc, SpringTorqueFunc); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedSpring.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedSpring.h deleted file mode 100644 index 732812892c..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpDampedSpring.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpDampedSpring; - -typedef cpFloat (*cpDampedSpringForceFunc)(struct cpConstraint *spring, cpFloat dist); - -const cpConstraintClass *cpDampedSpringGetClass(); - -typedef struct cpDampedSpring { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat restLength; - cpFloat stiffness; - cpFloat damping; - cpDampedSpringForceFunc springForceFunc; - - cpFloat target_vrn; - cpFloat v_coef; - - cpVect r1, r2; - cpFloat nMass; - cpVect n; -} cpDampedSpring; - -cpDampedSpring *cpDampedSpringAlloc(void); -cpDampedSpring *cpDampedSpringInit(cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); -cpConstraint *cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, restLength, RestLength); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, stiffness, Stiffness); -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, damping, Damping); -CP_DefineConstraintProperty(cpDampedSpring, cpDampedSpringForceFunc, springForceFunc, SpringForceFunc); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGearJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGearJoint.h deleted file mode 100644 index f0317c1d49..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGearJoint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpGearJointGetClass(); - -typedef struct cpGearJoint { - cpConstraint constraint; - cpFloat phase, ratio; - cpFloat ratio_inv; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpGearJoint; - -cpGearJoint *cpGearJointAlloc(void); -cpGearJoint *cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); -cpConstraint *cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); - -CP_DefineConstraintProperty(cpGearJoint, cpFloat, phase, Phase); -CP_DefineConstraintGetter(cpGearJoint, cpFloat, ratio, Ratio); -void cpGearJointSetRatio(cpConstraint *constraint, cpFloat value); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGrooveJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGrooveJoint.h deleted file mode 100644 index 831e3b68c8..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpGrooveJoint.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpGrooveJointGetClass(); - -typedef struct cpGrooveJoint { - cpConstraint constraint; - cpVect grv_n, grv_a, grv_b; - cpVect anchr2; - - cpVect grv_tn; - cpFloat clamp; - cpVect r1, r2; - cpVect k1, k2; - - cpVect jAcc; - cpFloat jMaxLen; - cpVect bias; -} cpGrooveJoint; - -cpGrooveJoint *cpGrooveJointAlloc(void); -cpGrooveJoint *cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); -cpConstraint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); - - -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_a, GrooveA); -void cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value); -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_b, GrooveB); -void cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value); -CP_DefineConstraintProperty(cpGrooveJoint, cpVect, anchr2, Anchr2); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPinJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPinJoint.h deleted file mode 100644 index 5b257a190b..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPinJoint.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpPinJointGetClass(); - -typedef struct cpPinJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat dist; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc, jnMax; - cpFloat bias; -} cpPinJoint; - -cpPinJoint *cpPinJointAlloc(void); -cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -cpConstraint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpPinJoint, cpFloat, dist, Dist); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPivotJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPivotJoint.h deleted file mode 100644 index e71c7a015a..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpPivotJoint.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpPivotJointGetClass(); - -typedef struct cpPivotJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - - cpVect r1, r2; - cpVect k1, k2; - - cpVect jAcc; - cpFloat jMaxLen; - cpVect bias; -} cpPivotJoint; - -cpPivotJoint *cpPivotJointAlloc(void); -cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -cpConstraint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot); -cpConstraint *cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr2, Anchr2); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRatchetJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRatchetJoint.h deleted file mode 100644 index ecb026ce7f..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRatchetJoint.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpRatchetJointGetClass(); - -typedef struct cpRatchetJoint { - cpConstraint constraint; - cpFloat angle, phase, ratchet; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpRatchetJoint; - -cpRatchetJoint *cpRatchetJointAlloc(void); -cpRatchetJoint *cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); -cpConstraint *cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); - -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, angle, Angle); -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, phase, Phase); -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, ratchet, Ratchet); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRotaryLimitJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRotaryLimitJoint.h deleted file mode 100644 index 9062f85f06..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpRotaryLimitJoint.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpRotaryLimitJointGetClass(); - -typedef struct cpRotaryLimitJoint { - cpConstraint constraint; - cpFloat min, max; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc, jMax; -} cpRotaryLimitJoint; - -cpRotaryLimitJoint *cpRotaryLimitJointAlloc(void); -cpRotaryLimitJoint *cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max); -cpConstraint *cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, min, Min); -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, max, Max); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSimpleMotor.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSimpleMotor.h deleted file mode 100644 index 1611e640df..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSimpleMotor.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpSimpleMotorGetClass(); - -typedef struct cpSimpleMotor { - cpConstraint constraint; - cpFloat rate; - - cpFloat iSum; - - cpFloat jAcc, jMax; -} cpSimpleMotor; - -cpSimpleMotor *cpSimpleMotorAlloc(void); -cpSimpleMotor *cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate); -cpConstraint *cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate); - -CP_DefineConstraintProperty(cpSimpleMotor, cpFloat, rate, Rate); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSlideJoint.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSlideJoint.h deleted file mode 100644 index c5ffa4e3d0..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/cpSlideJoint.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const cpConstraintClass *cpSlideJointGetClass(); - -typedef struct cpSlideJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat min, max; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc, jnMax; - cpFloat bias; -} cpSlideJoint; - -cpSlideJoint *cpSlideJointAlloc(void); -cpSlideJoint *cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); -cpConstraint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr1, Anchr1); -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr2, Anchr2); -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, min, Min); -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, max, Max); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/util.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/util.h deleted file mode 100644 index e8c0e0b2a0..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/constraints/util.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define CP_DefineClassGetter(t) const cpConstraintClass * t##GetClass(){return (cpConstraintClass *)&klass;} - -void cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b); - -#define J_MAX(constraint, dt) (((cpConstraint *)constraint)->maxForce*(dt)) - -// Get valid body pointers and exit early if the bodies are idle -#define CONSTRAINT_BEGIN(constraint, a_var, b_var) \ -cpBody *a_var, *b_var; { \ - a_var = ((cpConstraint *)constraint)->a; \ - b_var = ((cpConstraint *)constraint)->b; \ - if( \ - (cpBodyIsSleeping(a_var) || cpBodyIsStatic(a_var)) && \ - (cpBodyIsSleeping(b_var) || cpBodyIsStatic(b_var)) \ - ) return; \ -} - -static inline cpVect -relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2){ - cpVect v1_sum = cpvadd(a->v, cpvmult(cpvperp(r1), a->w)); - cpVect v2_sum = cpvadd(b->v, cpvmult(cpvperp(r2), b->w)); - - return cpvsub(v2_sum, v1_sum); -} - -static inline cpFloat -normal_relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n){ - return cpvdot(relative_velocity(a, b, r1, r2), n); -} - -static inline void -apply_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - cpBodyApplyImpulse(a, cpvneg(j), r1); - cpBodyApplyImpulse(b, j, r2); -} - -static inline void -apply_bias_impulse(cpBody *body, cpVect j, cpVect r) -{ - body->v_bias = cpvadd(body->v_bias, cpvmult(j, body->m_inv)); - body->w_bias += body->i_inv*cpvcross(r, j); -} - -static inline void -apply_bias_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - apply_bias_impulse(a, cpvneg(j), r1); - apply_bias_impulse(b, j, r2); -} - -static inline cpVect -clamp_vect(cpVect v, cpFloat len) -{ - return cpvclamp(v, len); -// return (cpvdot(v,v) > len*len) ? cpvmult(cpvnormalize(v), len) : v; -} - -static inline cpFloat -k_scalar(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n) -{ - cpFloat mass_sum = a->m_inv + b->m_inv; - cpFloat r1cn = cpvcross(r1, n); - cpFloat r2cn = cpvcross(r2, n); - - cpFloat value = mass_sum + a->i_inv*r1cn*r1cn + b->i_inv*r2cn*r2cn; - cpAssert(value != 0.0, "Unsolvable collision or constraint."); - - return value; -} - -static inline void -k_tensor(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect *k1, cpVect *k2) -{ - // calculate mass matrix - // If I wasn't lazy and wrote a proper matrix class, this wouldn't be so gross... - cpFloat k11, k12, k21, k22; - cpFloat m_sum = a->m_inv + b->m_inv; - - // start with I*m_sum - k11 = m_sum; k12 = 0.0f; - k21 = 0.0f; k22 = m_sum; - - // add the influence from r1 - cpFloat a_i_inv = a->i_inv; - cpFloat r1xsq = r1.x * r1.x * a_i_inv; - cpFloat r1ysq = r1.y * r1.y * a_i_inv; - cpFloat r1nxy = -r1.x * r1.y * a_i_inv; - k11 += r1ysq; k12 += r1nxy; - k21 += r1nxy; k22 += r1xsq; - - // add the influnce from r2 - cpFloat b_i_inv = b->i_inv; - cpFloat r2xsq = r2.x * r2.x * b_i_inv; - cpFloat r2ysq = r2.y * r2.y * b_i_inv; - cpFloat r2nxy = -r2.x * r2.y * b_i_inv; - k11 += r2ysq; k12 += r2nxy; - k21 += r2nxy; k22 += r2xsq; - - // invert - cpFloat determinant = k11*k22 - k12*k21; - cpAssert(determinant != 0.0, "Unsolvable constraint."); - - cpFloat det_inv = 1.0f/determinant; - *k1 = cpv( k22*det_inv, -k12*det_inv); - *k2 = cpv(-k21*det_inv, k11*det_inv); -} - -static inline cpVect -mult_k(cpVect vr, cpVect k1, cpVect k2) -{ - return cpv(cpvdot(vr, k1), cpvdot(vr, k2)); -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArbiter.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArbiter.h deleted file mode 100644 index 31bb929ff3..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArbiter.h +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - struct cpArbiter; - struct cpSpace; - struct cpCollisionHandler; - -// Determines how fast penetrations resolve themselves. -extern cpFloat cp_bias_coef; -// Amount of allowed penetration. Used to reduce vibrating contacts. -extern cpFloat cp_collision_slop; - -// Data structure for contact points. -typedef struct cpContact { - // Contact point and normal. - cpVect CP_PRIVATE(p), CP_PRIVATE(n); - // Penetration distance. - CP_PRIVATE(cpFloat dist); - - // Calculated by cpArbiterPreStep(). - cpVect CP_PRIVATE(r1), CP_PRIVATE(r2); - cpFloat CP_PRIVATE(nMass), CP_PRIVATE(tMass), CP_PRIVATE(bounce); - - // Persistant contact information. - cpFloat CP_PRIVATE(jnAcc), CP_PRIVATE(jtAcc), CP_PRIVATE(jBias); - CP_PRIVATE(cpFloat bias); - - // Hash value used to (mostly) uniquely identify a contact. - CP_PRIVATE(cpHashValue hash); -} cpContact; - -// Contacts are always allocated in groups. -cpContact* cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash); - -// Sum the contact impulses. (Can be used after cpSpaceStep() returns) -cpVect CP_PRIVATE(cpContactsSumImpulses)(cpContact *contacts, int numContacts); -cpVect CP_PRIVATE(cpContactsSumImpulsesWithFriction)(cpContact *contacts, int numContacts); - -#define CP_MAX_CONTACTS_PER_ARBITER 6 - -typedef enum cpArbiterState { - cpArbiterStateNormal, - cpArbiterStateFirstColl, - cpArbiterStateIgnore, - cpArbiterStateSleep, - cpArbiterStateCached, -} cpArbiterState; - -// Data structure for tracking collisions between shapes. -typedef struct cpArbiter { - // Information on the contact points between the objects. - CP_PRIVATE(int numContacts); - CP_PRIVATE(cpContact *contacts); - - // The two shapes and bodies involved in the collision. - // These variables are NOT in the order defined by the collision handler. - // Using CP_ARBITER_GET_SHAPES and CP_ARBITER_GET_BODIES will save you from - // many headaches - cpShape CP_PRIVATE(*a), CP_PRIVATE(*b); - - // Calculated before calling the pre-solve collision handler - // Override them with custom values if you want specialized behavior - CP_PRIVATE(cpFloat e); - CP_PRIVATE(cpFloat u); - // Used for surface_v calculations, implementation may change - CP_PRIVATE(cpVect surface_vr); - - // Time stamp of the arbiter. (from cpSpace) - CP_PRIVATE(cpTimestamp stamp); - - CP_PRIVATE(struct cpCollisionHandler *handler); - - // Are the shapes swapped in relation to the collision handler? - CP_PRIVATE(cpBool swappedColl); - CP_PRIVATE(cpArbiterState state); -} cpArbiter; - -// Arbiters are allocated in large buffers by the space and don't require a destroy function -cpArbiter* CP_PRIVATE(cpArbiterInit)(cpArbiter *arb, cpShape *a, cpShape *b); - -// These functions are all intended to be used internally. -// Inject new contact points into the arbiter while preserving contact history. -void CP_PRIVATE(cpArbiterUpdate)(cpArbiter *arb, cpContact *contacts, int numContacts, struct cpCollisionHandler *handler, cpShape *a, cpShape *b); -// Precalculate values used by the solver. -void CP_PRIVATE(cpArbiterPreStep)(cpArbiter *arb, cpFloat dt_inv); -void CP_PRIVATE(cpArbiterApplyCachedImpulse)(cpArbiter *arb); -// Run an iteration of the solver on the arbiter. -void CP_PRIVATE(cpArbiterApplyImpulse)(cpArbiter *arb, cpFloat eCoef); - -// Arbiter Helper Functions -cpVect cpArbiterTotalImpulse(cpArbiter *arb); -cpVect cpArbiterTotalImpulseWithFriction(cpArbiter *arb); -void cpArbiterIgnore(cpArbiter *arb); - - -static inline void -cpArbiterGetShapes(const cpArbiter *arb, cpShape **a, cpShape **b) -{ - if(arb->CP_PRIVATE(swappedColl)){ - (*a) = arb->CP_PRIVATE(b), (*b) = arb->CP_PRIVATE(a); - } else { - (*a) = arb->CP_PRIVATE(a), (*b) = arb->CP_PRIVATE(b); - } -} -#define CP_ARBITER_GET_SHAPES(arb, a, b) cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b); - -static inline void -cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b) -{ - CP_ARBITER_GET_SHAPES(arb, shape_a, shape_b); - (*a) = shape_a->body; - (*b) = shape_b->body; -} -#define CP_ARBITER_GET_BODIES(arb, a, b) cpBody *a, *b; cpArbiterGetBodies(arb, &a, &b); - -static inline cpBool -cpArbiterIsFirstContact(const cpArbiter *arb) -{ - return arb->CP_PRIVATE(state) == cpArbiterStateFirstColl; -} - -static inline int -cpArbiterGetCount(const cpArbiter *arb) -{ - return arb->CP_PRIVATE(numContacts); -} - -static inline cpVect -cpArbiterGetNormal(const cpArbiter *arb, int i) -{ - cpVect n = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n); - return arb->CP_PRIVATE(swappedColl) ? cpvneg(n) : n; -} - -static inline cpVect -cpArbiterGetPoint(const cpArbiter *arb, int i) -{ - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(p); -} - -static inline cpFloat -cpArbiteGetDepth(const cpArbiter *arb, int i) -{ - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); -} - -typedef struct cpContactPointSet { - int count; - - struct { - cpVect point, normal; - cpFloat dist; - } points[CP_MAX_CONTACTS_PER_ARBITER]; -} cpContactPointSet; - -static inline cpContactPointSet -cpArbiterGetContactPointSet(const cpArbiter *arb) -{ - cpContactPointSet set; - set.count = cpArbiterGetCount(arb); - - int i; - for(i=0; iCP_PRIVATE(contacts)[i].CP_PRIVATE(p); - set.points[i].normal = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n); - set.points[i].dist = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); - } - - return set; -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArray.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArray.h deleted file mode 100644 index 742c391293..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpArray.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// NOTE: cpArray is rarely used and will probably go away. - -typedef struct cpArray{ - CP_PRIVATE(int num); - CP_PRIVATE(int max); - CP_PRIVATE(void **arr); -} cpArray; - -typedef void (*cpArrayIter)(void *ptr, void *data); - -cpArray *cpArrayAlloc(void); -cpArray *cpArrayInit(cpArray *arr, int size); -cpArray *cpArrayNew(int size); - -void cpArrayDestroy(cpArray *arr); -void cpArrayFree(cpArray *arr); - -void cpArrayClear(cpArray *arr); - -void cpArrayPush(cpArray *arr, void *object); -void *cpArrayPop(cpArray *arr); -void cpArrayDeleteIndex(cpArray *arr, int idx); -void cpArrayDeleteObj(cpArray *arr, void *obj); - -void cpArrayAppend(cpArray *arr, cpArray *other); - -void cpArrayEach(cpArray *arr, cpArrayIter iterFunc, void *data); -cpBool cpArrayContains(cpArray *arr, void *ptr); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBB.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBB.h deleted file mode 100644 index e2563590ca..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBB.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -typedef struct cpBB{ - cpFloat l, b, r ,t; -} cpBB; - -static inline cpBB -cpBBNew(const cpFloat l, const cpFloat b, - const cpFloat r, const cpFloat t) -{ - cpBB bb = {l, b, r, t}; - return bb; -} - -static inline cpBool -cpBBintersects(const cpBB a, const cpBB b) -{ - return (a.l<=b.r && b.l<=a.r && a.b<=b.t && b.b<=a.t); -} - -static inline cpBool -cpBBcontainsBB(const cpBB bb, const cpBB other) -{ - return (bb.l < other.l && bb.r > other.r && bb.b < other.b && bb.t > other.t); -} - -static inline cpBool -cpBBcontainsVect(const cpBB bb, const cpVect v) -{ - return (bb.l < v.x && bb.r > v.x && bb.b < v.y && bb.t > v.y); -} - -static inline cpBB -cpBBmerge(const cpBB a, const cpBB b){ - return cpBBNew( - cpfmin(a.l, b.l), - cpfmin(a.b, b.b), - cpfmax(a.r, b.r), - cpfmax(a.t, b.t) - ); -} - -static inline cpBB -cpBBexpand(const cpBB bb, const cpVect v){ - return cpBBNew( - cpfmin(bb.l, v.x), - cpfmin(bb.b, v.y), - cpfmax(bb.r, v.x), - cpfmax(bb.t, v.y) - ); -} - -cpVect cpBBClampVect(const cpBB bb, const cpVect v); // clamps the vector to lie within the bbox -// TODO edge case issue -cpVect cpBBWrapVect(const cpBB bb, const cpVect v); // wrap a vector to a bbox diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBody.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBody.h deleted file mode 100644 index ba1a3372b5..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpBody.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpBody; -struct cpShape; -struct cpSpace; - -typedef void (*cpBodyVelocityFunc)(struct cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -typedef void (*cpBodyPositionFunc)(struct cpBody *body, cpFloat dt); - -extern cpBodyVelocityFunc cpBodyUpdateVelocityDefault; -extern cpBodyPositionFunc cpBodyUpdatePositionDefault; - -// Structure to hold information about the contact graph components -// when putting groups of objects to sleep. -// No interesting user accessible fields. -typedef struct cpComponentNode { - struct cpBody *parent; - struct cpBody *next; - int rank; - cpFloat idleTime; -} cpComponentNode; - -typedef struct cpBody{ - // *** Integration Functions. - - // Function that is called to integrate the body's velocity. (Defaults to cpBodyUpdateVelocity) - cpBodyVelocityFunc velocity_func; - - // Function that is called to integrate the body's position. (Defaults to cpBodyUpdatePosition) - cpBodyPositionFunc position_func; - - // *** Mass Properties - - // Mass and it's inverse. - // Always use cpBodySetMass() whenever changing the mass as these values must agree. - cpFloat m, m_inv; - - // Moment of inertia and it's inverse. - // Always use cpBodySetMoment() whenever changing the moment as these values must agree. - cpFloat i, i_inv; - - // *** Positional Properties - - // Linear components of motion (position, velocity, and force) - cpVect p, v, f; - - // Angular components of motion (angle, angular velocity, and torque) - // Always use cpBodySetAngle() to set the angle of the body as a and rot must agree. - cpFloat a, w, t; - - // Cached unit length vector representing the angle of the body. - // Used for fast vector rotation using cpvrotate(). - cpVect rot; - - // *** User Definable Fields - - // User defined data pointer. - cpDataPointer data; - - // *** Other Fields - - // Maximum velocities this body can move at after integrating velocity - cpFloat v_limit, w_limit; - - // *** Internally Used Fields - - // Velocity bias values used when solving penetrations and correcting constraints. - CP_PRIVATE(cpVect v_bias); - CP_PRIVATE(cpFloat w_bias); - - // Space this body has been added to - CP_PRIVATE(struct cpSpace *space); - - // Pointer to the shape list. - // Shapes form a linked list using cpShape.next when added to a space. - CP_PRIVATE(struct cpShape *shapesList); - - // Used by cpSpaceStep() to store contact graph information. - CP_PRIVATE(cpComponentNode node); -} cpBody; - -// Basic allocation/destruction functions -cpBody *cpBodyAlloc(void); -cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i); -cpBody *cpBodyNew(cpFloat m, cpFloat i); - -cpBody *cpBodyInitStatic(cpBody *body); -cpBody *cpBodyNewStatic(); - -void cpBodyDestroy(cpBody *body); -void cpBodyFree(cpBody *body); - -// Wake up a sleeping or idle body. (defined in cpSpace.c) -void cpBodyActivate(cpBody *body); - -// Force a body to sleep; -// defined in cpSpaceComponent.c -void cpBodySleep(cpBody *body); -void cpBodySleepWithGroup(cpBody *body, cpBody *group); - -static inline cpBool -cpBodyIsSleeping(const cpBody *body) -{ - return (CP_PRIVATE(body->node).next != ((cpBody*)0)); -} - -static inline cpBool -cpBodyIsStatic(const cpBody *body) -{ - return CP_PRIVATE(body->node).idleTime == INFINITY; -} - -static inline cpBool -cpBodyIsRogue(const cpBody *body) -{ - return (body->CP_PRIVATE(space) == ((struct cpSpace*)0)); -} - - -#define CP_DefineBodyGetter(type, member, name) \ -static inline type cpBodyGet##name(const cpBody *body){return body->member;} - -#define CP_DefineBodySetter(type, member, name) \ -static inline void \ -cpBodySet##name(cpBody *body, const type value){ \ - cpBodyActivate(body); \ - body->member = value; \ -} \ - -#define CP_DefineBodyProperty(type, member, name) \ -CP_DefineBodyGetter(type, member, name) \ -CP_DefineBodySetter(type, member, name) - - -// Accessors for cpBody struct members -CP_DefineBodyGetter(cpFloat, m, Mass); -void cpBodySetMass(cpBody *body, cpFloat m); - -CP_DefineBodyGetter(cpFloat, i, Moment); -void cpBodySetMoment(cpBody *body, cpFloat i); - - -CP_DefineBodyProperty(cpVect, p, Pos); -CP_DefineBodyProperty(cpVect, v, Vel); -CP_DefineBodyProperty(cpVect, f, Force); -CP_DefineBodyGetter(cpFloat, a, Angle); -void cpBodySetAngle(cpBody *body, cpFloat a); -CP_DefineBodyProperty(cpFloat, w, AngVel); -CP_DefineBodyProperty(cpFloat, t, Torque); -CP_DefineBodyGetter(cpVect, rot, Rot); -CP_DefineBodyProperty(cpFloat, v_limit, VelLimit); -CP_DefineBodyProperty(cpFloat, w_limit, AngVelLimit); - -// Modify the velocity of the body so that it will move to the specified absolute coordinates in the next timestep. -// Intended for objects that are moved manually with a custom velocity integration function. -void cpBodySlew(cpBody *body, cpVect pos, cpFloat dt); - -// Default Integration functions. -void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -void cpBodyUpdatePosition(cpBody *body, cpFloat dt); - -// Convert body local to world coordinates -static inline cpVect -cpBodyLocal2World(const cpBody *body, const cpVect v) -{ - return cpvadd(body->p, cpvrotate(v, body->rot)); -} - -// Convert world to body local coordinates -static inline cpVect -cpBodyWorld2Local(const cpBody *body, const cpVect v) -{ - return cpvunrotate(cpvsub(v, body->p), body->rot); -} - -// Apply an impulse (in world coordinates) to the body at a point relative to the center of gravity (also in world coordinates). -static inline void -cpBodyApplyImpulse(cpBody *body, const cpVect j, const cpVect r) -{ - body->v = cpvadd(body->v, cpvmult(j, body->m_inv)); - body->w += body->i_inv*cpvcross(r, j); -} - -// Zero the forces on a body. -void cpBodyResetForces(cpBody *body); -// Apply a force (in world coordinates) to a body at a point relative to the center of gravity (also in world coordinates). -void cpBodyApplyForce(cpBody *body, const cpVect f, const cpVect r); - -static inline cpFloat -cpBodyKineticEnergy(const cpBody *body) -{ - // Need to do some fudging to avoid NaNs - cpFloat vsq = cpvdot(body->v, body->v); - cpFloat wsq = body->w*body->w; - return (vsq ? vsq*body->m : 0.0f) + (wsq ? wsq*body->i : 0.0f); -} - -// Apply a damped spring force between two bodies. -// Warning: Large damping values can be unstable. Use a cpDampedSpring constraint for this instead. -void cpApplyDampedSpring(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat rlen, cpFloat k, cpFloat dmp, cpFloat dt); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpCollision.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpCollision.h deleted file mode 100644 index 1c886f713b..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpCollision.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -//TODO delete this header? - -// Collides two cpShape structures. -// Returns the number of contact points added to arr -// which should be at least CP_MAX_CONTACTS_PER_ARBITER in length. -// This function is very lonely in this header :( -int cpCollideShapes(const cpShape *a, const cpShape *b, cpContact *arr); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpHashSet.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpHashSet.h deleted file mode 100644 index cafdbf5129..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpHashSet.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// cpHashSet uses a chained hashtable implementation. -// Other than the transformation functions, there is nothing fancy going on. - -// cpHashSetBin's form the linked lists in the chained hash table. -typedef struct cpHashSetBin { - // Pointer to the element. - CP_PRIVATE(void *elt); - // Hash value of the element. - CP_PRIVATE(cpHashValue hash); - // Next element in the chain. - CP_PRIVATE(struct cpHashSetBin *next); -} cpHashSetBin; - -// Equality function. Returns true if ptr is equal to elt. -typedef cpBool (*cpHashSetEqlFunc)(void *ptr, void *elt); -// Used by cpHashSetInsert(). Called to transform the ptr into an element. -typedef void *(*cpHashSetTransFunc)(void *ptr, void *data); - -typedef struct cpHashSet { - // Number of elements stored in the table. - CP_PRIVATE(int entries); - // Number of cells in the table. - CP_PRIVATE(int size); - - CP_PRIVATE(cpHashSetEqlFunc eql); - CP_PRIVATE(cpHashSetTransFunc trans); - - // Default value returned by cpHashSetFind() when no element is found. - // Defaults to NULL. - CP_PRIVATE(void *default_value); - - // The table and recycled bins - CP_PRIVATE(cpHashSetBin **table); - CP_PRIVATE(cpHashSetBin *pooledBins); - - CP_PRIVATE(cpArray *allocatedBuffers); -} cpHashSet; - -// Basic allocation/destruction functions. -void cpHashSetDestroy(cpHashSet *set); -void cpHashSetFree(cpHashSet *set); - -cpHashSet *cpHashSetAlloc(void); -cpHashSet *cpHashSetInit(cpHashSet *set, int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans); -cpHashSet *cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans); - -// Insert an element into the set, returns the element. -// If it doesn't already exist, the transformation function is applied. -void *cpHashSetInsert(cpHashSet *set, cpHashValue hash, void *ptr, void *data); -// Remove and return an element from the set. -void *cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr); -// Find an element in the set. Returns the default value if the element isn't found. -void *cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr); - -// Iterate over a hashset. -typedef void (*cpHashSetIterFunc)(void *elt, void *data); -void cpHashSetEach(cpHashSet *set, cpHashSetIterFunc func, void *data); - -// Iterate over a hashset, drop the element if the func returns false. -typedef cpBool (*cpHashSetFilterFunc)(void *elt, void *data); -void cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpPolyShape.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpPolyShape.h deleted file mode 100644 index 12816ce56b..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpPolyShape.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// Axis structure used by cpPolyShape. -typedef struct cpPolyShapeAxis{ - // normal - cpVect n; - // distance from origin - cpFloat d; -} cpPolyShapeAxis; - -// Convex polygon shape structure. -typedef struct cpPolyShape{ - CP_PRIVATE(cpShape shape); - - // Vertex and axis lists. - CP_PRIVATE(int numVerts); - CP_PRIVATE(cpVect *verts); - CP_PRIVATE(cpPolyShapeAxis *axes); - - // Transformed vertex and axis lists. - CP_PRIVATE(cpVect *tVerts); - CP_PRIVATE(cpPolyShapeAxis *tAxes); -} cpPolyShape; - -// Basic allocation functions. -cpPolyShape *cpPolyShapeAlloc(void); -cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset); -cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset); - -cpPolyShape *cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height); -cpShape *cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height); - -// Check that a set of vertexes has a correct winding and that they are convex -cpBool cpPolyValidate(const cpVect *verts, const int numVerts); - -int cpPolyShapeGetNumVerts(cpShape *shape); -cpVect cpPolyShapeGetVert(cpShape *shape, int idx); - -// *** inlined utility functions - -// Returns the minimum distance of the polygon to the axis. -static inline cpFloat -cpPolyShapeValueOnAxis(const cpPolyShape *poly, const cpVect n, const cpFloat d) -{ - cpVect *verts = poly->CP_PRIVATE(tVerts); - cpFloat min = cpvdot(n, verts[0]); - - int i; - for(i=1; iCP_PRIVATE(numVerts); i++) - min = cpfmin(min, cpvdot(n, verts[i])); - - return min - d; -} - -// Returns true if the polygon contains the vertex. -static inline cpBool -cpPolyShapeContainsVert(const cpPolyShape *poly, const cpVect v) -{ - cpPolyShapeAxis *axes = poly->CP_PRIVATE(tAxes); - - int i; - for(i=0; iCP_PRIVATE(numVerts); i++){ - cpFloat dist = cpvdot(axes[i].n, v) - axes[i].d; - if(dist > 0.0f) return cpFalse; - } - - return cpTrue; -} - -// Same as cpPolyShapeContainsVert() but ignores faces pointing away from the normal. -static inline cpBool -cpPolyShapeContainsVertPartial(const cpPolyShape *poly, const cpVect v, const cpVect n) -{ - cpPolyShapeAxis *axes = poly->CP_PRIVATE(tAxes); - - int i; - for(i=0; iCP_PRIVATE(numVerts); i++){ - if(cpvdot(axes[i].n, n) < 0.0f) continue; - cpFloat dist = cpvdot(axes[i].n, v) - axes[i].d; - if(dist > 0.0f) return cpFalse; - } - - return cpTrue; -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpShape.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpShape.h deleted file mode 100644 index 5335642aad..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpShape.h +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// Forward declarations required for defining other structs. -struct cpShape; -struct cpShapeClass; - -typedef struct cpSegmentQueryInfo { - struct cpShape *shape; // shape that was hit, NULL if no collision - cpFloat t; // Distance along query segment, will always be in the range [0, 1]. - cpVect n; // normal of hit surface -} cpSegmentQueryInfo; - -// Enumeration of shape types. -typedef enum cpShapeType{ - CP_CIRCLE_SHAPE, - CP_SEGMENT_SHAPE, - CP_POLY_SHAPE, - CP_NUM_SHAPES -} cpShapeType; - -// Shape class. Holds function pointers and type data. -typedef struct cpShapeClass { - cpShapeType type; - - // Called by cpShapeCacheBB(). - cpBB (*cacheData)(struct cpShape *shape, cpVect p, cpVect rot); - // Called to by cpShapeDestroy(). - void (*destroy)(struct cpShape *shape); - - // called by cpShapePointQuery(). - cpBool (*pointQuery)(struct cpShape *shape, cpVect p); - - // called by cpShapeSegmentQuery() - void (*segmentQuery)(struct cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); -} cpShapeClass; - -// Basic shape struct that the others inherit from. -typedef struct cpShape{ - // The "class" of a shape as defined above - CP_PRIVATE(const cpShapeClass *klass); - - // cpBody that the shape is attached to. - cpBody *body; - - // Cached BBox for the shape. - cpBB bb; - - // Sensors invoke callbacks, but do not generate collisions - cpBool sensor; - - // *** Surface properties. - - // Coefficient of restitution. (elasticity) - cpFloat e; - // Coefficient of friction. - cpFloat u; - // Surface velocity used when solving for friction. - cpVect surface_v; - - // *** User Definable Fields - - // User defined data pointer for the shape. - cpDataPointer data; - - // User defined collision type for the shape. - cpCollisionType collision_type; - // User defined collision group for the shape. - cpGroup group; - // User defined layer bitmask for the shape. - cpLayers layers; - - // *** Internally Used Fields - - // Shapes form a linked list when added to space on a non-NULL body - CP_PRIVATE(struct cpShape *next); - - // Unique id used as the hash value. - CP_PRIVATE(cpHashValue hashid); -} cpShape; - -// Low level shape initialization func. -cpShape* cpShapeInit(cpShape *shape, const struct cpShapeClass *klass, cpBody *body); - -// Basic destructor functions. (allocation functions are not shared) -void cpShapeDestroy(cpShape *shape); -void cpShapeFree(cpShape *shape); - -// Cache the BBox of the shape. -cpBB cpShapeCacheBB(cpShape *shape); - -// Test if a point lies within a shape. -cpBool cpShapePointQuery(cpShape *shape, cpVect p); - -#define CP_DeclareShapeGetter(struct, type, name) type struct##Get##name(cpShape *shape) - -// Circle shape structure. -typedef struct cpCircleShape{ - CP_PRIVATE(cpShape shape); - - // Center in body space coordinates - CP_PRIVATE(cpVect c); - // Radius. - CP_PRIVATE(cpFloat r); - - // Transformed center. (world space coordinates) - CP_PRIVATE(cpVect tc); -} cpCircleShape; - -// Basic allocation functions for cpCircleShape. -cpCircleShape *cpCircleShapeAlloc(void); -cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset); -cpShape *cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset); - -CP_DeclareShapeGetter(cpCircleShape, cpVect, Offset); -CP_DeclareShapeGetter(cpCircleShape, cpFloat, Radius); - -// Segment shape structure. -typedef struct cpSegmentShape{ - CP_PRIVATE(cpShape shape); - - // Endpoints and normal of the segment. (body space coordinates) - cpVect CP_PRIVATE(a), CP_PRIVATE(b), CP_PRIVATE(n); - // Radius of the segment. (Thickness) - cpFloat CP_PRIVATE(r); - - // Transformed endpoints and normal. (world space coordinates) - cpVect CP_PRIVATE(ta), CP_PRIVATE(tb), CP_PRIVATE(tn); -} cpSegmentShape; - -// Basic allocation functions for cpSegmentShape. -cpSegmentShape* cpSegmentShapeAlloc(void); -cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius); -cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius); - -CP_DeclareShapeGetter(cpSegmentShape, cpVect, A); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, B); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, Normal); -CP_DeclareShapeGetter(cpSegmentShape, cpFloat, Radius); - -// For determinism, you can reset the shape id counter. -void cpResetShapeIdCounter(void); - -// Directed segment queries against individual shapes. -void cpSegmentQueryInfoPrint(cpSegmentQueryInfo *info); - -cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); - -static inline cpVect -cpSegmentQueryHitPoint(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvlerp(start, end, info.t); -} - -static inline cpFloat -cpSegmentQueryHitDist(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvdist(start, end)*info.t; -} diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpace.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpace.h deleted file mode 100644 index 2f6832a082..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpace.h +++ /dev/null @@ -1,206 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -struct cpSpace; - -// Number of frames that contact information should persist. -extern cpTimestamp cp_contact_persistence; - -// User collision handler function types. -typedef cpBool (*cpCollisionBeginFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef cpBool (*cpCollisionPreSolveFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, struct cpSpace *space, void *data); -typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, struct cpSpace *space, void *data); - -// Structure for holding collision pair function information. -// Used internally. -typedef struct cpCollisionHandler { - cpCollisionType a; - cpCollisionType b; - cpCollisionBeginFunc begin; - cpCollisionPreSolveFunc preSolve; - cpCollisionPostSolveFunc postSolve; - cpCollisionSeparateFunc separate; - void *data; -} cpCollisionHandler; - -typedef struct cpContactBufferHeader { - cpTimestamp stamp; - struct cpContactBufferHeader *next; - unsigned int numContacts; -} cpContactBufferHeader; - -typedef struct cpSpace{ - // *** User definable fields - - // Number of iterations to use in the impulse solver to solve contacts. - int iterations; - - // Number of iterations to use in the impulse solver to solve elastic collisions. - int elasticIterations; - - // Default gravity to supply when integrating rigid body motions. - cpVect gravity; - - // Default damping to supply when integrating rigid body motions. - cpFloat damping; - - // Speed threshold for a body to be considered idle. - // The default value of 0 means to let the space guess a good threshold based on gravity. - cpFloat idleSpeedThreshold; - - // Time a group of bodies must remain idle in order to fall asleep - // The default value of INFINITY disables the sleeping algorithm. - cpFloat sleepTimeThreshold; - - // *** Internally Used Fields - - // When the space lock count is non zero you cannot add or remove objects - CP_PRIVATE(int locked); - - // Time stamp. Is incremented on every call to cpSpaceStep(). - CP_PRIVATE(cpTimestamp stamp); - - // The static and active shape spatial hashes. - CP_PRIVATE(cpSpaceHash *staticShapes); - CP_PRIVATE(cpSpaceHash *activeShapes); - - // List of bodies in the system. - CP_PRIVATE(cpArray *bodies); - - // List of groups of sleeping bodies. - CP_PRIVATE(cpArray *sleepingComponents); - - // List of bodies that have been flagged to be awoken. - CP_PRIVATE(cpArray *rousedBodies); - - // List of active arbiters for the impulse solver. - CP_PRIVATE(cpArray *arbiters); - CP_PRIVATE(cpArray *pooledArbiters); - - // Linked list ring of contact buffers. - // Head is the newest buffer, and each buffer points to a newer buffer. - // Head wraps around and points to the oldest (tail) buffer. - CP_PRIVATE(cpContactBufferHeader *contactBuffersHead); - CP_PRIVATE(cpContactBufferHeader *_contactBuffersTail_Deprecated); - - // List of buffers to be free()ed when destroying the space. - CP_PRIVATE(cpArray *allocatedBuffers); - - // Persistant contact set. - CP_PRIVATE(cpHashSet *contactSet); - - // List of constraints in the system. - CP_PRIVATE(cpArray *constraints); - - // Set of collisionpair functions. - CP_PRIVATE(cpHashSet *collFuncSet); - // Default collision handler. - CP_PRIVATE(cpCollisionHandler defaultHandler); - - CP_PRIVATE(cpHashSet *postStepCallbacks); - - cpBody staticBody; -} cpSpace; - -// Basic allocation/destruction functions. -cpSpace* cpSpaceAlloc(void); -cpSpace* cpSpaceInit(cpSpace *space); -cpSpace* cpSpaceNew(void); - -void cpSpaceDestroy(cpSpace *space); -void cpSpaceFree(cpSpace *space); - -// Convenience function. Frees all referenced entities. (bodies, shapes and constraints) -void cpSpaceFreeChildren(cpSpace *space); - -// Collision handler management functions. -void cpSpaceSetDefaultCollisionHandler( - cpSpace *space, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); -void cpSpaceAddCollisionHandler( - cpSpace *space, - cpCollisionType a, cpCollisionType b, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); -void cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b); - -// Add and remove entities from the system. -cpShape *cpSpaceAddShape(cpSpace *space, cpShape *shape); -cpShape *cpSpaceAddStaticShape(cpSpace *space, cpShape *shape); -cpBody *cpSpaceAddBody(cpSpace *space, cpBody *body); -cpConstraint *cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint); - -void cpSpaceRemoveShape(cpSpace *space, cpShape *shape); -void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape); -void cpSpaceRemoveBody(cpSpace *space, cpBody *body); -void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint); - -// Post Step function definition -typedef void (*cpPostStepFunc)(cpSpace *space, void *obj, void *data); -// Register a post step function to be called after cpSpaceStep() has finished. -// obj is used a key, you can only register one callback per unique value for obj -void cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *obj, void *data); - -// Point query callback function -typedef void (*cpSpacePointQueryFunc)(cpShape *shape, void *data); -void cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data); -cpShape *cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group); - -// Segment query callback function -typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data); -void cpSpaceSegmentQuery(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryFunc func, void *data); -cpShape *cpSpaceSegmentQueryFirst(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSegmentQueryInfo *out); - -// BB query callback function -typedef void (*cpSpaceBBQueryFunc)(cpShape *shape, void *data); -void cpSpaceBBQuery(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryFunc func, void *data); - -// Shape query callback function -typedef void (*cpSpaceShapeQueryFunc)(cpShape *shape, cpContactPointSet *points, void *data); -cpBool cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data); - - -void cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape); - - -// Iterator function for iterating the bodies in a space. -typedef void (*cpSpaceBodyIterator)(cpBody *body, void *data); -void cpSpaceEachBody(cpSpace *space, cpSpaceBodyIterator func, void *data); - -// Spatial hash management functions. -void cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count); -void cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count); -void cpSpaceRehashStatic(cpSpace *space); - -void cpSpaceRehashShape(cpSpace *space, cpShape *shape); - -// Update the space. -void cpSpaceStep(cpSpace *space, cpFloat dt); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpaceHash.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpaceHash.h deleted file mode 100644 index dac38a371f..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpSpaceHash.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// The spatial hash is Chipmunk's default (and currently only) spatial index type. -// Based on a chained hash table. - -// Used internally to track objects added to the hash -typedef struct cpHandle{ - // Pointer to the object - void *obj; - // Retain count - int retain; - // Query stamp. Used to make sure two objects - // aren't identified twice in the same query. - cpTimestamp stamp; -} cpHandle; - -// Linked list element for in the chains. -typedef struct cpSpaceHashBin{ - cpHandle *handle; - struct cpSpaceHashBin *next; -} cpSpaceHashBin; - -// BBox callback. Called whenever the hash needs a bounding box from an object. -typedef cpBB (*cpSpaceHashBBFunc)(void *obj); - -typedef struct cpSpaceHash{ - // Number of cells in the table. - CP_PRIVATE(int numcells); - // Dimentions of the cells. - CP_PRIVATE(cpFloat celldim); - - // BBox callback. - CP_PRIVATE(cpSpaceHashBBFunc bbfunc); - - // Hashset of the handles and the recycled ones. - CP_PRIVATE(cpHashSet *handleSet); - CP_PRIVATE(cpArray *pooledHandles); - - // The table and the recycled bins. - CP_PRIVATE(cpSpaceHashBin **table); - CP_PRIVATE(cpSpaceHashBin *pooledBins); - - // list of buffers to free on destruction. - CP_PRIVATE(cpArray *allocatedBuffers); - - // Incremented on each query. See cpHandle.stamp. - CP_PRIVATE(cpTimestamp stamp); -} cpSpaceHash; - -//Basic allocation/destruction functions. -cpSpaceHash *cpSpaceHashAlloc(void); -cpSpaceHash *cpSpaceHashInit(cpSpaceHash *hash, cpFloat celldim, int cells, cpSpaceHashBBFunc bbfunc); -cpSpaceHash *cpSpaceHashNew(cpFloat celldim, int cells, cpSpaceHashBBFunc bbfunc); - -void cpSpaceHashDestroy(cpSpaceHash *hash); -void cpSpaceHashFree(cpSpaceHash *hash); - -// Resize the hashtable. (Does not rehash! You must call cpSpaceHashRehash() if needed.) -void cpSpaceHashResize(cpSpaceHash *hash, cpFloat celldim, int numcells); - -// Add an object to the hash. -void cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue id, cpBB _deprecated_ignored); -// Remove an object from the hash. -void cpSpaceHashRemove(cpSpaceHash *hash, void *obj, cpHashValue id); - -// Iterator function -typedef void (*cpSpaceHashIterator)(void *obj, void *data); -// Iterate over the objects in the hash. -void cpSpaceHashEach(cpSpaceHash *hash, cpSpaceHashIterator func, void *data); - -// Rehash the contents of the hash. -void cpSpaceHashRehash(cpSpaceHash *hash); -// Rehash only a specific object. -void cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, cpHashValue id); - -// Query callback. -typedef void (*cpSpaceHashQueryFunc)(void *obj1, void *obj2, void *data); -// Point query the hash. A reference to the query point is passed as obj1 to the query callback. -void cpSpaceHashPointQuery(cpSpaceHash *hash, cpVect point, cpSpaceHashQueryFunc func, void *data); -// Query the hash for a given BBox. -void cpSpaceHashQuery(cpSpaceHash *hash, void *obj, cpBB bb, cpSpaceHashQueryFunc func, void *data); -// Run a query for the object, then insert it. (Optimized case) -void cpSpaceHashQueryInsert(cpSpaceHash *hash, void *obj, cpBB bb, cpSpaceHashQueryFunc func, void *data); -// Rehashes while querying for each object. (Optimized case) -void cpSpaceHashQueryRehash(cpSpaceHash *hash, cpSpaceHashQueryFunc func, void *data); - -// Segment Query callback. -// Return value is uesd for early exits of the query. -// If while traversing the grid, the raytrace function detects that an entire grid cell is beyond the hit point, it will stop the trace. -typedef cpFloat (*cpSpaceHashSegmentQueryFunc)(void *obj1, void *obj2, void *data); -void cpSpaceHashSegmentQuery(cpSpaceHash *hash, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpaceHashSegmentQueryFunc func, void *data); diff --git a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpVect.h b/3rdparty/chipmunk-5.3.4/include/chipmunk/cpVect.h deleted file mode 100644 index 261cec522c..0000000000 --- a/3rdparty/chipmunk-5.3.4/include/chipmunk/cpVect.h +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/// Constant for the zero vector. -static const cpVect cpvzero = {0.0f,0.0f}; - -/// Convenience constructor for cpVect structs. -static inline cpVect -cpv(const cpFloat x, const cpFloat y) -{ - cpVect v = {x, y}; - return v; -} - -// non-inlined functions - -/// Returns the length of v. -cpFloat cpvlength(const cpVect v); - -/// Spherical linearly interpolate between v1 and v2. -cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t); - -/// Spherical linearly interpolate between v1 towards v2 by no more than angle a radians -cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a); - -/// Returns the unit length vector for the given angle (in radians). -cpVect cpvforangle(const cpFloat a); - -/// Returns the angular direction v is pointing in (in radians). -cpFloat cpvtoangle(const cpVect v); - -/** - Returns a string representation of v. Intended mostly for debugging purposes and not production use. - - @attention The string points to a static local and is reset every time the function is called. - If you want to print more than one vector you will have to split up your printing onto separate lines. -*/ -char *cpvstr(const cpVect v); - -/// Check if two vectors are equal. (Be careful when comparing floating point numbers!) -static inline cpBool -cpveql(const cpVect v1, const cpVect v2) -{ - return (v1.x == v2.x && v1.y == v2.y); -} - -/// Add two vectors -static inline cpVect -cpvadd(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x + v2.x, v1.y + v2.y); -} - -/// Negate a vector. -static inline cpVect -cpvneg(const cpVect v) -{ - return cpv(-v.x, -v.y); -} - -/// Subtract two vectors. -static inline cpVect -cpvsub(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x - v2.x, v1.y - v2.y); -} - -/// Scalar multiplication. -static inline cpVect -cpvmult(const cpVect v, const cpFloat s) -{ - return cpv(v.x*s, v.y*s); -} - -/// Vector dot product. -static inline cpFloat -cpvdot(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.x + v1.y*v2.y; -} - -/** - 2D vector cross product analog. - The cross product of 2D vectors results in a 3D vector with only a z component. - This function returns the magnitude of the z value. -*/ -static inline cpFloat -cpvcross(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.y - v1.y*v2.x; -} - -/// Returns a perpendicular vector. (90 degree rotation) -static inline cpVect -cpvperp(const cpVect v) -{ - return cpv(-v.y, v.x); -} - -/// Returns a perpendicular vector. (-90 degree rotation) -static inline cpVect -cpvrperp(const cpVect v) -{ - return cpv(v.y, -v.x); -} - -/// Returns the vector projection of v1 onto v2. -static inline cpVect -cpvproject(const cpVect v1, const cpVect v2) -{ - return cpvmult(v2, cpvdot(v1, v2)/cpvdot(v2, v2)); -} - -/// Uses complex number multiplication to rotate v1 by v2. Scaling will occur if v1 is not a unit vector. -static inline cpVect -cpvrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x - v1.y*v2.y, v1.x*v2.y + v1.y*v2.x); -} - -/// Inverse of cpvrotate(). -static inline cpVect -cpvunrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x + v1.y*v2.y, v1.y*v2.x - v1.x*v2.y); -} - -/// Returns the squared length of v. Faster than cpvlength() when you only need to compare lengths. -static inline cpFloat -cpvlengthsq(const cpVect v) -{ - return cpvdot(v, v); -} - -/// Linearly interpolate between v1 and v2. -static inline cpVect -cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t) -{ - return cpvadd(cpvmult(v1, 1.0f - t), cpvmult(v2, t)); -} - -/// Returns a normalized copy of v. -static inline cpVect -cpvnormalize(const cpVect v) -{ - return cpvmult(v, 1.0f/cpvlength(v)); -} - -/// Returns a normalized copy of v or cpvzero if v was already cpvzero. Protects against divide by zero errors. -static inline cpVect -cpvnormalize_safe(const cpVect v) -{ - return (v.x == 0.0f && v.y == 0.0f ? cpvzero : cpvnormalize(v)); -} - -/// Clamp v to length len. -static inline cpVect -cpvclamp(const cpVect v, const cpFloat len) -{ - return (cpvdot(v,v) > len*len) ? cpvmult(cpvnormalize(v), len) : v; -} - -/// Linearly interpolate between v1 towards v2 by distance d. -static inline cpVect -cpvlerpconst(cpVect v1, cpVect v2, cpFloat d) -{ - return cpvadd(v1, cpvclamp(cpvsub(v2, v1), d)); -} - -/// Returns the distance between v1 and v2. -static inline cpFloat -cpvdist(const cpVect v1, const cpVect v2) -{ - return cpvlength(cpvsub(v1, v2)); -} - -/// Returns the squared distance between v1 and v2. Faster than cpvdist() when you only need to compare distances. -static inline cpFloat -cpvdistsq(const cpVect v1, const cpVect v2) -{ - return cpvlengthsq(cpvsub(v1, v2)); -} - -/// Returns true if the distance between v1 and v2 is less than dist. -static inline cpBool -cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist) -{ - return cpvdistsq(v1, v2) < dist*dist; -} diff --git a/3rdparty/chipmunk-5.3.4/macosx/Chipmunk.xcodeproj/project.pbxproj b/3rdparty/chipmunk-5.3.4/macosx/Chipmunk.xcodeproj/project.pbxproj deleted file mode 100644 index 625b76b1ef..0000000000 --- a/3rdparty/chipmunk-5.3.4/macosx/Chipmunk.xcodeproj/project.pbxproj +++ /dev/null @@ -1,835 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - D3102B171119FD3000E77771 /* Tank.c in Sources */ = {isa = PBXBuildFile; fileRef = D3102B161119FD3000E77771 /* Tank.c */; }; - D31402950E9DD07E00EF79DB /* Springies.c in Sources */ = {isa = PBXBuildFile; fileRef = D31402940E9DD07E00EF79DB /* Springies.c */; }; - D31847750FC458FD00E30B0D /* Query.c in Sources */ = {isa = PBXBuildFile; fileRef = D31847740FC458FD00E30B0D /* Query.c */; }; - D3185D200EC5610A00E6BFCB /* TheoJansen.c in Sources */ = {isa = PBXBuildFile; fileRef = D3185D1F0EC5610A00E6BFCB /* TheoJansen.c */; }; - D3238F8210C1B5ED00C4BDC2 /* Joints.c in Sources */ = {isa = PBXBuildFile; fileRef = D3238F8110C1B5ED00C4BDC2 /* Joints.c */; }; - D329CC9C10BADC7200909DB1 /* Sensors.c in Sources */ = {isa = PBXBuildFile; fileRef = D329CC9B10BADC7200909DB1 /* Sensors.c */; }; - D34963C10B56CBA900CAD239 /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0C40AA75CC3004E361B /* chipmunk.h */; }; - D34963C20B56CBA900CAD239 /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0270AA32F16004E361B /* cpVect.h */; }; - D34963C30B56CBA900CAD239 /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2D90AAA5622004E361B /* cpBB.h */; }; - D34963C40B56CBA900CAD239 /* cpArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2DC0AAA562B004E361B /* cpArray.h */; }; - D34963C50B56CBA900CAD239 /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = D353B6480B059C5F0038D274 /* prime.h */; }; - D34963C60B56CBA900CAD239 /* cpHashSet.h in Headers */ = {isa = PBXBuildFile; fileRef = D30CE25E0B52535500427129 /* cpHashSet.h */; }; - D34963C70B56CBA900CAD239 /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0DD0AAA2273004E361B /* cpBody.h */; }; - D34963C80B56CBA900CAD239 /* cpSpaceHash.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2DE0AAA562B004E361B /* cpSpaceHash.h */; }; - D34963C90B56CBA900CAD239 /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0C10AA75CA9004E361B /* cpArbiter.h */; }; - D34963CA0B56CBA900CAD239 /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = D3BC99AC0AB381AF0025A2C0 /* cpPolyShape.h */; }; - D34963CB0B56CBA900CAD239 /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = D37E22FC0AAA63B800BB4C50 /* cpShape.h */; }; - D34963CC0B56CBA900CAD239 /* cpCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = D37E231E0AAA728A00BB4C50 /* cpCollision.h */; }; - D34963CD0B56CBA900CAD239 /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2CE0AAA5589004E361B /* cpSpace.h */; }; - D34963CE0B56CBBF00CAD239 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = D3B718E00AB2BC8900B500C9 /* chipmunk.c */; }; - D34963CF0B56CBBF00CAD239 /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0260AA32F15004E361B /* cpVect.c */; }; - D34963D00B56CBBF00CAD239 /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DA0AAA5622004E361B /* cpBB.c */; }; - D34963D10B56CBBF00CAD239 /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DD0AAA562B004E361B /* cpArray.c */; }; - D34963D20B56CBBF00CAD239 /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = D30CE25D0B52535500427129 /* cpHashSet.c */; }; - D34963D30B56CBBF00CAD239 /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0DE0AAA2273004E361B /* cpBody.c */; }; - D34963D40B56CBBF00CAD239 /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */; }; - D34963D50B56CBBF00CAD239 /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0C20AA75CA9004E361B /* cpArbiter.c */; }; - D34963D60B56CBBF00CAD239 /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BC99AB0AB381AF0025A2C0 /* cpPolyShape.c */; }; - D34963D70B56CBBF00CAD239 /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E22FD0AAA63B800BB4C50 /* cpShape.c */; }; - D34963D80B56CBBF00CAD239 /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E231F0AAA728A00BB4C50 /* cpCollision.c */; }; - D34963D90B56CBBF00CAD239 /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2CF0AAA5589004E361B /* cpSpace.c */; }; - D34E9E6712558100002C0FE5 /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9E6412558081002C0FE5 /* cpSpaceQuery.c */; }; - D34E9E681255810F002C0FE5 /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9E6412558081002C0FE5 /* cpSpaceQuery.c */; }; - D34E9E97125581DD002C0FE5 /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9E96125581DD002C0FE5 /* cpSpaceComponent.c */; }; - D34E9E98125581DD002C0FE5 /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9E96125581DD002C0FE5 /* cpSpaceComponent.c */; }; - D34E9EA312558A7C002C0FE5 /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9EA212558A7C002C0FE5 /* cpSpaceStep.c */; }; - D34E9EA412558A7C002C0FE5 /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = D34E9EA212558A7C002C0FE5 /* cpSpaceStep.c */; }; - D35420C00F4E1FD70017F4F7 /* chipmunk_unsafe.h in Headers */ = {isa = PBXBuildFile; fileRef = D35420BF0F4E1FD70017F4F7 /* chipmunk_unsafe.h */; }; - D35422EC0F4E769F0017F4F7 /* UnsafeOps.c in Sources */ = {isa = PBXBuildFile; fileRef = D35422EB0F4E769F0017F4F7 /* UnsafeOps.c */; }; - D365D90410B595CE0005A03B /* Simple.c in Sources */ = {isa = PBXBuildFile; fileRef = D365D90310B595CE0005A03B /* Simple.c */; }; - D36B19510EA13B6D0028A362 /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = D36B192D0EA1364E0028A362 /* cpDampedRotarySpring.c */; }; - D36D87831012D63600DB5078 /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D36D87811012D63600DB5078 /* cpRatchetJoint.c */; }; - D36D87841012D63600DB5078 /* cpRatchetJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = D36D87821012D63600DB5078 /* cpRatchetJoint.h */; }; - D37697200B50C53900BB33CC /* LogoSmash.c in Sources */ = {isa = PBXBuildFile; fileRef = D3CCDF460AE35D920080442F /* LogoSmash.c */; }; - D37BB76E0EAADA6300C70958 /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB76C0EAADA6300C70958 /* cpRotaryLimitJoint.c */; }; - D37BB76F0EAADA6300C70958 /* cpRotaryLimitJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = D37BB76D0EAADA6300C70958 /* cpRotaryLimitJoint.h */; }; - D37BB8B30EAB01E400C70958 /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB8B10EAB01E400C70958 /* cpGearJoint.c */; }; - D37BB8B40EAB01E400C70958 /* cpGearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = D37BB8B20EAB01E400C70958 /* cpGearJoint.h */; }; - D37BB8F10EAB06B600C70958 /* cpSimpleMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = D37BB8EF0EAB06B600C70958 /* cpSimpleMotor.h */; }; - D37BB8F20EAB06B600C70958 /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB8F00EAB06B600C70958 /* cpSimpleMotor.c */; }; - D3800E120E9815FC00A3D7FA /* cpConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = D3800E0F0E9815FC00A3D7FA /* cpConstraint.h */; }; - D3800E130E9815FC00A3D7FA /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800E100E9815FC00A3D7FA /* cpConstraint.c */; }; - D3800E1E0E98176F00A3D7FA /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800E1B0E98176F00A3D7FA /* cpPinJoint.c */; }; - D3800E1F0E98176F00A3D7FA /* cpPinJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = D3800E1C0E98176F00A3D7FA /* cpPinJoint.h */; }; - D38011620E984FA400A3D7FA /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = D380115F0E984FA400A3D7FA /* cpDampedSpring.c */; }; - D38011630E984FA400A3D7FA /* cpDampedSpring.h in Headers */ = {isa = PBXBuildFile; fileRef = D38011600E984FA400A3D7FA /* cpDampedSpring.h */; }; - D38687D30BAFC695008B7008 /* libChipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D34963BB0B56CAA300CAD239 /* libChipmunk.a */; }; - D393275C0EA02C710026F6A2 /* Pump.c in Sources */ = {isa = PBXBuildFile; fileRef = D393275B0EA02C710026F6A2 /* Pump.c */; }; - D3BACF8310B5DF8900376394 /* OneWay.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BACF8210B5DF8900376394 /* OneWay.c */; }; - D3BAD65810B8B52900376394 /* Player.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAD0C710B61AAD00376394 /* Player.c */; }; - D3BAF9C50E9C4F250039DD5C /* PyramidStack.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAF9C40E9C4F250039DD5C /* PyramidStack.c */; }; - D3BAFA040E9C52810039DD5C /* Plink.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAFA030E9C52810039DD5C /* Plink.c */; }; - D3BAFA360E9C53E50039DD5C /* Tumble.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAFA350E9C53E50039DD5C /* Tumble.c */; }; - D3BAFA510E9C549C0039DD5C /* PyramidTopple.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAFA500E9C549C0039DD5C /* PyramidTopple.c */; }; - D3BAFA870E9C5A230039DD5C /* Bounce.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAFA860E9C5A230039DD5C /* Bounce.c */; }; - D3BAFB8B0E9C7C150039DD5C /* Planet.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BAFB8A0E9C7C150039DD5C /* Planet.c */; }; - D3BC99C10AB381EE0025A2C0 /* ChipmunkDemo.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BC99C00AB381EE0025A2C0 /* ChipmunkDemo.c */; }; - D3C378F511063C57003EF1D9 /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800E100E9815FC00A3D7FA /* cpConstraint.c */; }; - D3C378F611063C57003EF1D9 /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800E1B0E98176F00A3D7FA /* cpPinJoint.c */; }; - D3C378F711063C57003EF1D9 /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA60E98260200A3D7FA /* cpSlideJoint.c */; }; - D3C378F811063C57003EF1D9 /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA40E98260200A3D7FA /* cpPivotJoint.c */; }; - D3C378F911063C57003EF1D9 /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA00E98260200A3D7FA /* cpGrooveJoint.c */; }; - D3C378FA11063C57003EF1D9 /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = D380115F0E984FA400A3D7FA /* cpDampedSpring.c */; }; - D3C378FB11063C57003EF1D9 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = D3B718E00AB2BC8900B500C9 /* chipmunk.c */; }; - D3C378FC11063C57003EF1D9 /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0260AA32F15004E361B /* cpVect.c */; }; - D3C378FD11063C57003EF1D9 /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DA0AAA5622004E361B /* cpBB.c */; }; - D3C378FE11063C57003EF1D9 /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DD0AAA562B004E361B /* cpArray.c */; }; - D3C378FF11063C57003EF1D9 /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = D30CE25D0B52535500427129 /* cpHashSet.c */; }; - D3C3790011063C57003EF1D9 /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0DE0AAA2273004E361B /* cpBody.c */; }; - D3C3790111063C57003EF1D9 /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */; }; - D3C3790211063C57003EF1D9 /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0C20AA75CA9004E361B /* cpArbiter.c */; }; - D3C3790311063C57003EF1D9 /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BC99AB0AB381AF0025A2C0 /* cpPolyShape.c */; }; - D3C3790411063C57003EF1D9 /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E22FD0AAA63B800BB4C50 /* cpShape.c */; }; - D3C3790511063C57003EF1D9 /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E231F0AAA728A00BB4C50 /* cpCollision.c */; }; - D3C3790611063C57003EF1D9 /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2CF0AAA5589004E361B /* cpSpace.c */; }; - D3C3790711063C57003EF1D9 /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = D36B192D0EA1364E0028A362 /* cpDampedRotarySpring.c */; }; - D3C3790811063C57003EF1D9 /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB76C0EAADA6300C70958 /* cpRotaryLimitJoint.c */; }; - D3C3790911063C57003EF1D9 /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB8B10EAB01E400C70958 /* cpGearJoint.c */; }; - D3C3790A11063C57003EF1D9 /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = D37BB8F00EAB06B600C70958 /* cpSimpleMotor.c */; }; - D3C3790B11063C57003EF1D9 /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D36D87811012D63600DB5078 /* cpRatchetJoint.c */; }; - D3E4A9C80E99683200EE08BA /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA60E98260200A3D7FA /* cpSlideJoint.c */; }; - D3E4A9CA0E99683200EE08BA /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA40E98260200A3D7FA /* cpPivotJoint.c */; }; - D3E4A9CC0E99683200EE08BA /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D3800EA00E98260200A3D7FA /* cpGrooveJoint.c */; }; - D3E5F0550AA3303F004E361B /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3E5F0530AA3303F004E361B /* GLUT.framework */; }; - D3E5F0560AA3303F004E361B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3E5F0540AA3303F004E361B /* OpenGL.framework */; }; - D3EDBC250ED935F40027D943 /* MagnetsElectric.c in Sources */ = {isa = PBXBuildFile; fileRef = D3EDBC240ED935F40027D943 /* MagnetsElectric.c */; }; - D3FBA1A70E9B1E0400950BCC /* drawSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = D3FBA1A60E9B1E0400950BCC /* drawSpace.c */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - D38687D10BAFC688008B7008 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D3E5F0190AA32EAC004E361B /* Project object */; - proxyType = 1; - remoteGlobalIDString = D34963BA0B56CAA300CAD239; - remoteInfo = ChipmunkStatic; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - D30CE25D0B52535500427129 /* cpHashSet.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpHashSet.c; sourceTree = ""; }; - D30CE25E0B52535500427129 /* cpHashSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpHashSet.h; path = ../include/chipmunk/cpHashSet.h; sourceTree = ""; }; - D3102B161119FD3000E77771 /* Tank.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Tank.c; sourceTree = ""; }; - D31402940E9DD07E00EF79DB /* Springies.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Springies.c; sourceTree = ""; }; - D31847740FC458FD00E30B0D /* Query.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Query.c; sourceTree = ""; }; - D3185D1F0EC5610A00E6BFCB /* TheoJansen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TheoJansen.c; sourceTree = ""; }; - D3238F8110C1B5ED00C4BDC2 /* Joints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Joints.c; sourceTree = ""; }; - D329CC9B10BADC7200909DB1 /* Sensors.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Sensors.c; sourceTree = ""; }; - D34963BB0B56CAA300CAD239 /* libChipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libChipmunk.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D34E9E6412558081002C0FE5 /* cpSpaceQuery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpSpaceQuery.c; path = ../src/cpSpaceQuery.c; sourceTree = ""; }; - D34E9E96125581DD002C0FE5 /* cpSpaceComponent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpSpaceComponent.c; path = ../src/cpSpaceComponent.c; sourceTree = ""; }; - D34E9EA212558A7C002C0FE5 /* cpSpaceStep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpSpaceStep.c; path = ../src/cpSpaceStep.c; sourceTree = ""; }; - D353B6480B059C5F0038D274 /* prime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = ""; }; - D35420BF0F4E1FD70017F4F7 /* chipmunk_unsafe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chipmunk_unsafe.h; path = ../include/chipmunk/chipmunk_unsafe.h; sourceTree = SOURCE_ROOT; }; - D35422EB0F4E769F0017F4F7 /* UnsafeOps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UnsafeOps.c; sourceTree = ""; }; - D365D90310B595CE0005A03B /* Simple.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Simple.c; sourceTree = ""; }; - D36B192D0EA1364E0028A362 /* cpDampedRotarySpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedRotarySpring.c; sourceTree = ""; }; - D36B192E0EA1364E0028A362 /* cpDampedRotarySpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpDampedRotarySpring.h; path = ../../include/chipmunk/constraints/cpDampedRotarySpring.h; sourceTree = ""; }; - D36C44DD10F53DEB003D48B5 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chipmunk_ffi.h; path = ../include/chipmunk/chipmunk_ffi.h; sourceTree = SOURCE_ROOT; }; - D36D87811012D63600DB5078 /* cpRatchetJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRatchetJoint.c; sourceTree = ""; }; - D36D87821012D63600DB5078 /* cpRatchetJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpRatchetJoint.h; path = ../../include/chipmunk/constraints/cpRatchetJoint.h; sourceTree = ""; }; - D37BB76C0EAADA6300C70958 /* cpRotaryLimitJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpRotaryLimitJoint.c; sourceTree = ""; }; - D37BB76D0EAADA6300C70958 /* cpRotaryLimitJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpRotaryLimitJoint.h; path = ../../include/chipmunk/constraints/cpRotaryLimitJoint.h; sourceTree = ""; }; - D37BB8B10EAB01E400C70958 /* cpGearJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGearJoint.c; sourceTree = ""; }; - D37BB8B20EAB01E400C70958 /* cpGearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpGearJoint.h; path = ../../include/chipmunk/constraints/cpGearJoint.h; sourceTree = ""; }; - D37BB8EF0EAB06B600C70958 /* cpSimpleMotor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpSimpleMotor.h; path = ../../include/chipmunk/constraints/cpSimpleMotor.h; sourceTree = ""; }; - D37BB8F00EAB06B600C70958 /* cpSimpleMotor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSimpleMotor.c; sourceTree = ""; }; - D37E22FC0AAA63B800BB4C50 /* cpShape.h */ = {isa = PBXFileReference; fileEncoding = 4; languageSpecificationIdentifier = c; lastKnownFileType = sourcecode.c.h; name = cpShape.h; path = ../include/chipmunk/cpShape.h; sourceTree = ""; }; - D37E22FD0AAA63B800BB4C50 /* cpShape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpShape.c; sourceTree = ""; }; - D37E231E0AAA728A00BB4C50 /* cpCollision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpCollision.h; path = ../include/chipmunk/cpCollision.h; sourceTree = ""; }; - D37E231F0AAA728A00BB4C50 /* cpCollision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpCollision.c; sourceTree = ""; }; - D3800E0F0E9815FC00A3D7FA /* cpConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpConstraint.h; path = ../../include/chipmunk/constraints/cpConstraint.h; sourceTree = ""; }; - D3800E100E9815FC00A3D7FA /* cpConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpConstraint.c; sourceTree = ""; }; - D3800E1B0E98176F00A3D7FA /* cpPinJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPinJoint.c; sourceTree = ""; }; - D3800E1C0E98176F00A3D7FA /* cpPinJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpPinJoint.h; path = ../../include/chipmunk/constraints/cpPinJoint.h; sourceTree = ""; }; - D3800E3A0E9820B900A3D7FA /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = util.h; path = ../../include/chipmunk/constraints/util.h; sourceTree = ""; }; - D3800EA00E98260200A3D7FA /* cpGrooveJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpGrooveJoint.c; sourceTree = ""; }; - D3800EA10E98260200A3D7FA /* cpGrooveJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpGrooveJoint.h; path = ../../include/chipmunk/constraints/cpGrooveJoint.h; sourceTree = ""; }; - D3800EA40E98260200A3D7FA /* cpPivotJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpPivotJoint.c; sourceTree = ""; }; - D3800EA50E98260200A3D7FA /* cpPivotJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpPivotJoint.h; path = ../../include/chipmunk/constraints/cpPivotJoint.h; sourceTree = ""; }; - D3800EA60E98260200A3D7FA /* cpSlideJoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpSlideJoint.c; sourceTree = ""; }; - D3800EA70E98260200A3D7FA /* cpSlideJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpSlideJoint.h; path = ../../include/chipmunk/constraints/cpSlideJoint.h; sourceTree = ""; }; - D380115F0E984FA400A3D7FA /* cpDampedSpring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpDampedSpring.c; sourceTree = ""; }; - D38011600E984FA400A3D7FA /* cpDampedSpring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpDampedSpring.h; path = ../../include/chipmunk/constraints/cpDampedSpring.h; sourceTree = ""; }; - D393275B0EA02C710026F6A2 /* Pump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Pump.c; sourceTree = ""; }; - D39F478A0FD4AB4E00B244CA /* chipmunk_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chipmunk_types.h; path = ../include/chipmunk/chipmunk_types.h; sourceTree = SOURCE_ROOT; }; - D3B718E00AB2BC8900B500C9 /* chipmunk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chipmunk.c; path = ../src/chipmunk.c; sourceTree = ""; }; - D3BACF8210B5DF8900376394 /* OneWay.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = OneWay.c; sourceTree = ""; }; - D3BAD0C710B61AAD00376394 /* Player.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Player.c; sourceTree = ""; }; - D3BAF9C40E9C4F250039DD5C /* PyramidStack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PyramidStack.c; sourceTree = ""; }; - D3BAFA030E9C52810039DD5C /* Plink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Plink.c; sourceTree = ""; }; - D3BAFA350E9C53E50039DD5C /* Tumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Tumble.c; sourceTree = ""; }; - D3BAFA500E9C549C0039DD5C /* PyramidTopple.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PyramidTopple.c; sourceTree = ""; }; - D3BAFA860E9C5A230039DD5C /* Bounce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Bounce.c; sourceTree = ""; }; - D3BAFB8A0E9C7C150039DD5C /* Planet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Planet.c; sourceTree = ""; }; - D3BC99AB0AB381AF0025A2C0 /* cpPolyShape.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpPolyShape.c; sourceTree = ""; }; - D3BC99AC0AB381AF0025A2C0 /* cpPolyShape.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpPolyShape.h; path = ../include/chipmunk/cpPolyShape.h; sourceTree = ""; }; - D3BC99C00AB381EE0025A2C0 /* ChipmunkDemo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ChipmunkDemo.c; sourceTree = ""; }; - D3C2B4581282178B0080A718 /* chipmunk_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chipmunk_private.h; path = ../include/chipmunk/chipmunk_private.h; sourceTree = ""; }; - D3C3787A11063B1B003EF1D9 /* libChipmunk-iPhone.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libChipmunk-iPhone.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - D3C517841279B38300C2AFEB /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TODO.txt; path = ../TODO.txt; sourceTree = SOURCE_ROOT; }; - D3CCDF460AE35D920080442F /* LogoSmash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LogoSmash.c; sourceTree = ""; }; - D3CCEAE60E9B346100161D40 /* ChipmunkDemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChipmunkDemo.h; sourceTree = ""; }; - D3E5F0260AA32F15004E361B /* cpVect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = ""; }; - D3E5F0270AA32F16004E361B /* cpVect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpVect.h; path = ../include/chipmunk/cpVect.h; sourceTree = ""; }; - D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChipmunkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - D3E5F04C0AA32FDE004E361B /* main-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "main-Info.plist"; sourceTree = ""; }; - D3E5F0530AA3303F004E361B /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = ""; }; - D3E5F0540AA3303F004E361B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - D3E5F0C10AA75CA9004E361B /* cpArbiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpArbiter.h; path = ../include/chipmunk/cpArbiter.h; sourceTree = ""; }; - D3E5F0C20AA75CA9004E361B /* cpArbiter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpArbiter.c; sourceTree = ""; }; - D3E5F0C40AA75CC3004E361B /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chipmunk.h; path = ../include/chipmunk/chipmunk.h; sourceTree = ""; }; - D3E5F0DD0AAA2273004E361B /* cpBody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpBody.h; path = ../include/chipmunk/cpBody.h; sourceTree = ""; }; - D3E5F0DE0AAA2273004E361B /* cpBody.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpBody.c; path = ../src/cpBody.c; sourceTree = ""; }; - D3E5F2CE0AAA5589004E361B /* cpSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cpSpace.h; path = ../include/chipmunk/cpSpace.h; sourceTree = ""; }; - D3E5F2CF0AAA5589004E361B /* cpSpace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpSpace.c; path = ../src/cpSpace.c; sourceTree = ""; }; - D3E5F2D90AAA5622004E361B /* cpBB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpBB.h; path = ../include/chipmunk/cpBB.h; sourceTree = ""; }; - D3E5F2DA0AAA5622004E361B /* cpBB.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpBB.c; sourceTree = ""; }; - D3E5F2DC0AAA562B004E361B /* cpArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpArray.h; path = ../include/chipmunk/cpArray.h; sourceTree = ""; }; - D3E5F2DD0AAA562B004E361B /* cpArray.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = ""; }; - D3E5F2DE0AAA562B004E361B /* cpSpaceHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpSpaceHash.h; path = ../include/chipmunk/cpSpaceHash.h; sourceTree = ""; }; - D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = ""; }; - D3EDBC240ED935F40027D943 /* MagnetsElectric.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MagnetsElectric.c; sourceTree = ""; }; - D3FBA1A60E9B1E0400950BCC /* drawSpace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = drawSpace.c; sourceTree = ""; }; - D3FBA1B80E9B1F6300950BCC /* drawSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = drawSpace.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D34963B90B56CAA300CAD239 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D3C3787811063B1B003EF1D9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D3E5F0470AA32FDE004E361B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D38687D30BAFC695008B7008 /* libChipmunk.a in Frameworks */, - D3E5F0550AA3303F004E361B /* GLUT.framework in Frameworks */, - D3E5F0560AA3303F004E361B /* OpenGL.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D34E9E5A12557FBF002C0FE5 /* Space */ = { - isa = PBXGroup; - children = ( - D3E5F2CE0AAA5589004E361B /* cpSpace.h */, - D3E5F2CF0AAA5589004E361B /* cpSpace.c */, - D34E9E6412558081002C0FE5 /* cpSpaceQuery.c */, - D34E9E96125581DD002C0FE5 /* cpSpaceComponent.c */, - D34E9EA212558A7C002C0FE5 /* cpSpaceStep.c */, - ); - name = Space; - sourceTree = ""; - }; - D37E24570AAAA48800BB4C50 /* Collision */ = { - isa = PBXGroup; - children = ( - D3E5F2DE0AAA562B004E361B /* cpSpaceHash.h */, - D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */, - D3E5F0C10AA75CA9004E361B /* cpArbiter.h */, - D3E5F0C20AA75CA9004E361B /* cpArbiter.c */, - D37E22FC0AAA63B800BB4C50 /* cpShape.h */, - D37E22FD0AAA63B800BB4C50 /* cpShape.c */, - D3BC99AC0AB381AF0025A2C0 /* cpPolyShape.h */, - D3BC99AB0AB381AF0025A2C0 /* cpPolyShape.c */, - D37E231E0AAA728A00BB4C50 /* cpCollision.h */, - D37E231F0AAA728A00BB4C50 /* cpCollision.c */, - ); - name = Collision; - path = ../src; - sourceTree = ""; - }; - D3800E0E0E9815FC00A3D7FA /* constraints */ = { - isa = PBXGroup; - children = ( - D3800E3A0E9820B900A3D7FA /* util.h */, - D3800E0F0E9815FC00A3D7FA /* cpConstraint.h */, - D3800E100E9815FC00A3D7FA /* cpConstraint.c */, - D3800E1C0E98176F00A3D7FA /* cpPinJoint.h */, - D3800E1B0E98176F00A3D7FA /* cpPinJoint.c */, - D3800EA70E98260200A3D7FA /* cpSlideJoint.h */, - D3800EA60E98260200A3D7FA /* cpSlideJoint.c */, - D3800EA50E98260200A3D7FA /* cpPivotJoint.h */, - D3800EA40E98260200A3D7FA /* cpPivotJoint.c */, - D3800EA10E98260200A3D7FA /* cpGrooveJoint.h */, - D3800EA00E98260200A3D7FA /* cpGrooveJoint.c */, - D38011600E984FA400A3D7FA /* cpDampedSpring.h */, - D380115F0E984FA400A3D7FA /* cpDampedSpring.c */, - D36B192E0EA1364E0028A362 /* cpDampedRotarySpring.h */, - D36B192D0EA1364E0028A362 /* cpDampedRotarySpring.c */, - D37BB76D0EAADA6300C70958 /* cpRotaryLimitJoint.h */, - D37BB76C0EAADA6300C70958 /* cpRotaryLimitJoint.c */, - D36D87821012D63600DB5078 /* cpRatchetJoint.h */, - D36D87811012D63600DB5078 /* cpRatchetJoint.c */, - D37BB8B20EAB01E400C70958 /* cpGearJoint.h */, - D37BB8B10EAB01E400C70958 /* cpGearJoint.c */, - D37BB8EF0EAB06B600C70958 /* cpSimpleMotor.h */, - D37BB8F00EAB06B600C70958 /* cpSimpleMotor.c */, - ); - name = constraints; - path = ../src/constraints; - sourceTree = SOURCE_ROOT; - }; - D3CCDF5B0AE35DA00080442F /* Demo */ = { - isa = PBXGroup; - children = ( - D3CCEAE60E9B346100161D40 /* ChipmunkDemo.h */, - D3BC99C00AB381EE0025A2C0 /* ChipmunkDemo.c */, - D3FBA1B80E9B1F6300950BCC /* drawSpace.h */, - D3FBA1A60E9B1E0400950BCC /* drawSpace.c */, - D3CCDF460AE35D920080442F /* LogoSmash.c */, - D365D90310B595CE0005A03B /* Simple.c */, - D3BAF9C40E9C4F250039DD5C /* PyramidStack.c */, - D3BAFA030E9C52810039DD5C /* Plink.c */, - D3BAFA350E9C53E50039DD5C /* Tumble.c */, - D3BAFA500E9C549C0039DD5C /* PyramidTopple.c */, - D3BAFA860E9C5A230039DD5C /* Bounce.c */, - D3BAFB8A0E9C7C150039DD5C /* Planet.c */, - D31402940E9DD07E00EF79DB /* Springies.c */, - D393275B0EA02C710026F6A2 /* Pump.c */, - D3185D1F0EC5610A00E6BFCB /* TheoJansen.c */, - D3EDBC240ED935F40027D943 /* MagnetsElectric.c */, - D35422EB0F4E769F0017F4F7 /* UnsafeOps.c */, - D31847740FC458FD00E30B0D /* Query.c */, - D3BACF8210B5DF8900376394 /* OneWay.c */, - D3BAD0C710B61AAD00376394 /* Player.c */, - D329CC9B10BADC7200909DB1 /* Sensors.c */, - D3238F8110C1B5ED00C4BDC2 /* Joints.c */, - D3102B161119FD3000E77771 /* Tank.c */, - ); - name = Demo; - path = ../Demo; - sourceTree = ""; - }; - D3E5F0170AA32EAC004E361B = { - isa = PBXGroup; - children = ( - D3C517841279B38300C2AFEB /* TODO.txt */, - D3CCDF5B0AE35DA00080442F /* Demo */, - D3E5F0C40AA75CC3004E361B /* chipmunk.h */, - D3C2B4581282178B0080A718 /* chipmunk_private.h */, - D39F478A0FD4AB4E00B244CA /* chipmunk_types.h */, - D35420BF0F4E1FD70017F4F7 /* chipmunk_unsafe.h */, - D36C44DD10F53DEB003D48B5 /* chipmunk_ffi.h */, - D3B718E00AB2BC8900B500C9 /* chipmunk.c */, - D3E5F2F30AAA575E004E361B /* Basics */, - D3E5F0DD0AAA2273004E361B /* cpBody.h */, - D3E5F0DE0AAA2273004E361B /* cpBody.c */, - D37E24570AAAA48800BB4C50 /* Collision */, - D3800E0E0E9815FC00A3D7FA /* constraints */, - D34E9E5A12557FBF002C0FE5 /* Space */, - D3E5F0520AA32FF5004E361B /* frameworks */, - D3E5F04A0AA32FDE004E361B /* Products */, - D3E5F04C0AA32FDE004E361B /* main-Info.plist */, - ); - sourceTree = ""; - }; - D3E5F04A0AA32FDE004E361B /* Products */ = { - isa = PBXGroup; - children = ( - D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */, - D34963BB0B56CAA300CAD239 /* libChipmunk.a */, - D3C3787A11063B1B003EF1D9 /* libChipmunk-iPhone.a */, - ); - name = Products; - sourceTree = ""; - }; - D3E5F0520AA32FF5004E361B /* frameworks */ = { - isa = PBXGroup; - children = ( - D3E5F0530AA3303F004E361B /* GLUT.framework */, - D3E5F0540AA3303F004E361B /* OpenGL.framework */, - ); - name = frameworks; - sourceTree = ""; - }; - D3E5F2F30AAA575E004E361B /* Basics */ = { - isa = PBXGroup; - children = ( - D3E5F0270AA32F16004E361B /* cpVect.h */, - D3E5F0260AA32F15004E361B /* cpVect.c */, - D3E5F2D90AAA5622004E361B /* cpBB.h */, - D3E5F2DA0AAA5622004E361B /* cpBB.c */, - D3E5F2DC0AAA562B004E361B /* cpArray.h */, - D3E5F2DD0AAA562B004E361B /* cpArray.c */, - D353B6480B059C5F0038D274 /* prime.h */, - D30CE25E0B52535500427129 /* cpHashSet.h */, - D30CE25D0B52535500427129 /* cpHashSet.c */, - ); - name = Basics; - path = ../src; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D34963B70B56CAA300CAD239 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D34963C10B56CBA900CAD239 /* chipmunk.h in Headers */, - D34963C20B56CBA900CAD239 /* cpVect.h in Headers */, - D34963C30B56CBA900CAD239 /* cpBB.h in Headers */, - D34963C40B56CBA900CAD239 /* cpArray.h in Headers */, - D34963C50B56CBA900CAD239 /* prime.h in Headers */, - D34963C60B56CBA900CAD239 /* cpHashSet.h in Headers */, - D34963C70B56CBA900CAD239 /* cpBody.h in Headers */, - D34963C80B56CBA900CAD239 /* cpSpaceHash.h in Headers */, - D34963C90B56CBA900CAD239 /* cpArbiter.h in Headers */, - D34963CA0B56CBA900CAD239 /* cpPolyShape.h in Headers */, - D34963CB0B56CBA900CAD239 /* cpShape.h in Headers */, - D34963CC0B56CBA900CAD239 /* cpCollision.h in Headers */, - D34963CD0B56CBA900CAD239 /* cpSpace.h in Headers */, - D3800E120E9815FC00A3D7FA /* cpConstraint.h in Headers */, - D3800E1F0E98176F00A3D7FA /* cpPinJoint.h in Headers */, - D38011630E984FA400A3D7FA /* cpDampedSpring.h in Headers */, - D37BB76F0EAADA6300C70958 /* cpRotaryLimitJoint.h in Headers */, - D37BB8B40EAB01E400C70958 /* cpGearJoint.h in Headers */, - D37BB8F10EAB06B600C70958 /* cpSimpleMotor.h in Headers */, - D35420C00F4E1FD70017F4F7 /* chipmunk_unsafe.h in Headers */, - D36D87841012D63600DB5078 /* cpRatchetJoint.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D3C3787611063B1B003EF1D9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D34963BA0B56CAA300CAD239 /* ChipmunkStatic */ = { - isa = PBXNativeTarget; - buildConfigurationList = D34963BE0B56CACA00CAD239 /* Build configuration list for PBXNativeTarget "ChipmunkStatic" */; - buildPhases = ( - D34963B70B56CAA300CAD239 /* Headers */, - D34963B80B56CAA300CAD239 /* Sources */, - D34963B90B56CAA300CAD239 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ChipmunkStatic; - productName = Chipmunk; - productReference = D34963BB0B56CAA300CAD239 /* libChipmunk.a */; - productType = "com.apple.product-type.library.static"; - }; - D3C3787911063B1B003EF1D9 /* ChipmunkStatic-iPhone */ = { - isa = PBXNativeTarget; - buildConfigurationList = D3C3787E11063BB5003EF1D9 /* Build configuration list for PBXNativeTarget "ChipmunkStatic-iPhone" */; - buildPhases = ( - D3C3787611063B1B003EF1D9 /* Headers */, - D3C3787711063B1B003EF1D9 /* Sources */, - D3C3787811063B1B003EF1D9 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "ChipmunkStatic-iPhone"; - productName = "ChipmunkStatic (iPhone)"; - productReference = D3C3787A11063B1B003EF1D9 /* libChipmunk-iPhone.a */; - productType = "com.apple.product-type.library.static"; - }; - D3E5F0480AA32FDE004E361B /* ChipmunkDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = D3E5F04D0AA32FDF004E361B /* Build configuration list for PBXNativeTarget "ChipmunkDemo" */; - buildPhases = ( - D3E5F0450AA32FDE004E361B /* Resources */, - D3E5F0460AA32FDE004E361B /* Sources */, - D3E5F0470AA32FDE004E361B /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - D38687D20BAFC688008B7008 /* PBXTargetDependency */, - ); - name = ChipmunkDemo; - productName = main; - productReference = D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D3E5F0190AA32EAC004E361B /* Project object */ = { - isa = PBXProject; - buildConfigurationList = D3E5F01A0AA32EAC004E361B /* Build configuration list for PBXProject "Chipmunk" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = D3E5F0170AA32EAC004E361B; - productRefGroup = D3E5F04A0AA32FDE004E361B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D3E5F0480AA32FDE004E361B /* ChipmunkDemo */, - D34963BA0B56CAA300CAD239 /* ChipmunkStatic */, - D3C3787911063B1B003EF1D9 /* ChipmunkStatic-iPhone */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D3E5F0450AA32FDE004E361B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D34963B80B56CAA300CAD239 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D34E9E6712558100002C0FE5 /* cpSpaceQuery.c in Sources */, - D3800E130E9815FC00A3D7FA /* cpConstraint.c in Sources */, - D3800E1E0E98176F00A3D7FA /* cpPinJoint.c in Sources */, - D3E4A9C80E99683200EE08BA /* cpSlideJoint.c in Sources */, - D3E4A9CA0E99683200EE08BA /* cpPivotJoint.c in Sources */, - D3E4A9CC0E99683200EE08BA /* cpGrooveJoint.c in Sources */, - D38011620E984FA400A3D7FA /* cpDampedSpring.c in Sources */, - D34963CE0B56CBBF00CAD239 /* chipmunk.c in Sources */, - D34963CF0B56CBBF00CAD239 /* cpVect.c in Sources */, - D34963D00B56CBBF00CAD239 /* cpBB.c in Sources */, - D34963D10B56CBBF00CAD239 /* cpArray.c in Sources */, - D34963D20B56CBBF00CAD239 /* cpHashSet.c in Sources */, - D34963D30B56CBBF00CAD239 /* cpBody.c in Sources */, - D34963D40B56CBBF00CAD239 /* cpSpaceHash.c in Sources */, - D34963D50B56CBBF00CAD239 /* cpArbiter.c in Sources */, - D34963D60B56CBBF00CAD239 /* cpPolyShape.c in Sources */, - D34963D70B56CBBF00CAD239 /* cpShape.c in Sources */, - D34963D80B56CBBF00CAD239 /* cpCollision.c in Sources */, - D34963D90B56CBBF00CAD239 /* cpSpace.c in Sources */, - D36B19510EA13B6D0028A362 /* cpDampedRotarySpring.c in Sources */, - D37BB76E0EAADA6300C70958 /* cpRotaryLimitJoint.c in Sources */, - D37BB8B30EAB01E400C70958 /* cpGearJoint.c in Sources */, - D37BB8F20EAB06B600C70958 /* cpSimpleMotor.c in Sources */, - D36D87831012D63600DB5078 /* cpRatchetJoint.c in Sources */, - D34E9E97125581DD002C0FE5 /* cpSpaceComponent.c in Sources */, - D34E9EA312558A7C002C0FE5 /* cpSpaceStep.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D3C3787711063B1B003EF1D9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D34E9E681255810F002C0FE5 /* cpSpaceQuery.c in Sources */, - D3C378F511063C57003EF1D9 /* cpConstraint.c in Sources */, - D3C378F611063C57003EF1D9 /* cpPinJoint.c in Sources */, - D3C378F711063C57003EF1D9 /* cpSlideJoint.c in Sources */, - D3C378F811063C57003EF1D9 /* cpPivotJoint.c in Sources */, - D3C378F911063C57003EF1D9 /* cpGrooveJoint.c in Sources */, - D3C378FA11063C57003EF1D9 /* cpDampedSpring.c in Sources */, - D3C378FB11063C57003EF1D9 /* chipmunk.c in Sources */, - D3C378FC11063C57003EF1D9 /* cpVect.c in Sources */, - D3C378FD11063C57003EF1D9 /* cpBB.c in Sources */, - D3C378FE11063C57003EF1D9 /* cpArray.c in Sources */, - D3C378FF11063C57003EF1D9 /* cpHashSet.c in Sources */, - D3C3790011063C57003EF1D9 /* cpBody.c in Sources */, - D3C3790111063C57003EF1D9 /* cpSpaceHash.c in Sources */, - D3C3790211063C57003EF1D9 /* cpArbiter.c in Sources */, - D3C3790311063C57003EF1D9 /* cpPolyShape.c in Sources */, - D3C3790411063C57003EF1D9 /* cpShape.c in Sources */, - D3C3790511063C57003EF1D9 /* cpCollision.c in Sources */, - D3C3790611063C57003EF1D9 /* cpSpace.c in Sources */, - D3C3790711063C57003EF1D9 /* cpDampedRotarySpring.c in Sources */, - D3C3790811063C57003EF1D9 /* cpRotaryLimitJoint.c in Sources */, - D3C3790911063C57003EF1D9 /* cpGearJoint.c in Sources */, - D3C3790A11063C57003EF1D9 /* cpSimpleMotor.c in Sources */, - D3C3790B11063C57003EF1D9 /* cpRatchetJoint.c in Sources */, - D34E9E98125581DD002C0FE5 /* cpSpaceComponent.c in Sources */, - D34E9EA412558A7C002C0FE5 /* cpSpaceStep.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D3E5F0460AA32FDE004E361B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D3BC99C10AB381EE0025A2C0 /* ChipmunkDemo.c in Sources */, - D37697200B50C53900BB33CC /* LogoSmash.c in Sources */, - D3FBA1A70E9B1E0400950BCC /* drawSpace.c in Sources */, - D3BAF9C50E9C4F250039DD5C /* PyramidStack.c in Sources */, - D3BAFA040E9C52810039DD5C /* Plink.c in Sources */, - D3BAFA360E9C53E50039DD5C /* Tumble.c in Sources */, - D3BAFA510E9C549C0039DD5C /* PyramidTopple.c in Sources */, - D3BAFA870E9C5A230039DD5C /* Bounce.c in Sources */, - D3BAFB8B0E9C7C150039DD5C /* Planet.c in Sources */, - D31402950E9DD07E00EF79DB /* Springies.c in Sources */, - D393275C0EA02C710026F6A2 /* Pump.c in Sources */, - D3185D200EC5610A00E6BFCB /* TheoJansen.c in Sources */, - D3EDBC250ED935F40027D943 /* MagnetsElectric.c in Sources */, - D35422EC0F4E769F0017F4F7 /* UnsafeOps.c in Sources */, - D31847750FC458FD00E30B0D /* Query.c in Sources */, - D365D90410B595CE0005A03B /* Simple.c in Sources */, - D3BACF8310B5DF8900376394 /* OneWay.c in Sources */, - D3BAD65810B8B52900376394 /* Player.c in Sources */, - D329CC9C10BADC7200909DB1 /* Sensors.c in Sources */, - D3238F8210C1B5ED00C4BDC2 /* Joints.c in Sources */, - D3102B171119FD3000E77771 /* Tank.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - D38687D20BAFC688008B7008 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D34963BA0B56CAA300CAD239 /* ChipmunkStatic */; - targetProxy = D38687D10BAFC688008B7008 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - D34963BF0B56CACA00CAD239 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - INSTALL_PATH = /usr/local/lib; - OTHER_CFLAGS = "-ffast-math"; - PREBINDING = NO; - PRODUCT_NAME = Chipmunk; - ZERO_LINK = YES; - }; - name = Debug; - }; - D34963C00B56CACA00CAD239 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRODUCT_NAME = Chipmunk; - ZERO_LINK = NO; - }; - name = Release; - }; - D3C3787B11063B1C003EF1D9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_THUMB_SUPPORT = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_CFLAGS = "-ffast-math"; - PREBINDING = NO; - PRODUCT_NAME = "Chipmunk-iPhone"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - D3C3787C11063B1C003EF1D9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_AUTO_VECTORIZATION = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_THUMB_SUPPORT = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-ffast-math", - ); - PREBINDING = NO; - PRODUCT_NAME = "Chipmunk-iPhone"; - SDKROOT = iphoneos4.1; - ZERO_LINK = NO; - }; - name = Release; - }; - D3E5F01B0AA32EAC004E361B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = com.apple.compilers.llvmgcc42; - HEADER_SEARCH_PATHS = ../include/chipmunk; - MACOSX_DEPLOYMENT_TARGET = 10.5; - SDKROOT = macosx10.5; - WARNING_CFLAGS = ( - "-Wall", - "-W", - "-Wno-unused-parameter", - "-Werror", - "-Wnewline-eof", - ); - }; - name = Debug; - }; - D3E5F01C0AA32EAC004E361B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = s; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = ../include/chipmunk; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = "-DNDEBUG"; - SDKROOT = macosx10.5; - WARNING_CFLAGS = ( - "-Wall", - "-W", - "-Wno-unused-parameter", - "-Werror", - "-Wnewline-eof", - ); - }; - name = Release; - }; - D3E5F04E0AA32FDF004E361B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - INFOPLIST_FILE = "main-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Release\""; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = ChipmunkDemo; - SHARED_PRECOMPS_DIR = ""; - WARNING_CFLAGS = "-Wall"; - WRAPPER_EXTENSION = app; - ZERO_LINK = NO; - }; - name = Debug; - }; - D3E5F04F0AA32FDF004E361B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; - COPY_PHASE_STRIP = YES; - GCC_AUTO_VECTORIZATION = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - INFOPLIST_FILE = "main-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Release\""; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = ChipmunkDemo; - SHARED_PRECOMPS_DIR = ""; - WARNING_CFLAGS = "-Wall"; - WRAPPER_EXTENSION = app; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D34963BE0B56CACA00CAD239 /* Build configuration list for PBXNativeTarget "ChipmunkStatic" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D34963BF0B56CACA00CAD239 /* Debug */, - D34963C00B56CACA00CAD239 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D3C3787E11063BB5003EF1D9 /* Build configuration list for PBXNativeTarget "ChipmunkStatic-iPhone" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D3C3787B11063B1C003EF1D9 /* Debug */, - D3C3787C11063B1C003EF1D9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D3E5F01A0AA32EAC004E361B /* Build configuration list for PBXProject "Chipmunk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D3E5F01B0AA32EAC004E361B /* Debug */, - D3E5F01C0AA32EAC004E361B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D3E5F04D0AA32FDF004E361B /* Build configuration list for PBXNativeTarget "ChipmunkDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D3E5F04E0AA32FDF004E361B /* Debug */, - D3E5F04F0AA32FDF004E361B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D3E5F0190AA32EAC004E361B /* Project object */; -} diff --git a/3rdparty/chipmunk-5.3.4/macosx/iphonestatic.command b/3rdparty/chipmunk-5.3.4/macosx/iphonestatic.command deleted file mode 100644 index a4ae55f22b..0000000000 --- a/3rdparty/chipmunk-5.3.4/macosx/iphonestatic.command +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -cd `dirname $0` - -# clean old -if [ -e Chipmunk-iPhone ]; then rm -rf Chipmunk-iPhone; fi - -mkdir Chipmunk-iPhone - -# build fat library -xcodebuild -project Chipmunk.xcodeproj -sdk iphoneos4.2 -configuration Release -target ChipmunkStatic-iPhone && \ -xcodebuild -project Chipmunk.xcodeproj -sdk iphonesimulator4.2 -configuration Debug -target ChipmunkStatic-iPhone && \ -lipo build/Debug-iphonesimulator/libChipmunk-iPhone.a build/Release-iphoneos/libChipmunk-iPhone.a -create -output Chipmunk-iPhone/libChipmunk-iPhone.a && \ - -# copy in headers -rsync -r --exclude=".*" ../include/chipmunk/ Chipmunk-iPhone/ && \ - -open Chipmunk-iPhone && \ -echo "Copy Chipmunk-iPhone into your project and enjoy." diff --git a/3rdparty/chipmunk-5.3.4/macosx/main-Info.plist b/3rdparty/chipmunk-5.3.4/macosx/main-Info.plist deleted file mode 100644 index 64e3841154..0000000000 --- a/3rdparty/chipmunk-5.3.4/macosx/main-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.yourcompany.main - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/3rdparty/chipmunk-5.3.4/msvc/glut/include/GL/glut.h b/3rdparty/chipmunk-5.3.4/msvc/glut/include/GL/glut.h deleted file mode 100644 index 0e6ddfbfec..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/glut/include/GL/glut.h +++ /dev/null @@ -1,716 +0,0 @@ -#ifndef __glut_h__ -#define __glut_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ - -/* This program is freely distributable without licensing fees and is - provided without guarantee or warrantee expressed or implied. This - program is -not- in the public domain. */ - -#if defined(_WIN32) - -/* GLUT 3.7 now tries to avoid including - to avoid name space pollution, but Win32's - needs APIENTRY and WINGDIAPI defined properly. */ -# if 0 - /* This would put tons of macros and crap in our clean name space. */ -# define WIN32_LEAN_AND_MEAN -# include -# else - /* XXX This is from Win32's */ -# ifndef APIENTRY -# define GLUT_APIENTRY_DEFINED -# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) -# define APIENTRY __stdcall -# else -# define APIENTRY -# endif -# endif - /* XXX This is from Win32's */ -# ifndef CALLBACK -# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__) -# define CALLBACK __stdcall -# else -# define CALLBACK -# endif -# endif - /* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */ -# if defined( __LCC__ ) -# undef WINGDIAPI -# define WINGDIAPI __stdcall -# else - /* XXX This is from Win32's and */ -# ifndef WINGDIAPI -# define GLUT_WINGDIAPI_DEFINED -# define WINGDIAPI __declspec(dllimport) -# endif -# endif - /* XXX This is from Win32's */ -# ifndef _WCHAR_T_DEFINED -typedef unsigned short wchar_t; -# define _WCHAR_T_DEFINED -# endif -# endif - -/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA - in your compile preprocessor options. */ -# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) -# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ -/* To enable automatic SGI OpenGL for Windows library usage for GLUT, - define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */ -# ifdef GLUT_USE_SGI_OPENGL -# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */ -# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */ -# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */ -# else -# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ -# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */ -# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ -# endif -# endif - -/* To disable supression of annoying warnings about floats being promoted - to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor - options. */ -# ifndef GLUT_NO_WARNING_DISABLE -# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */ -# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -# endif - -/* Win32 has an annoying issue where there are multiple C run-time - libraries (CRTs). If the executable is linked with a different CRT - from the GLUT DLL, the GLUT DLL will not share the same CRT static - data seen by the executable. In particular, atexit callbacks registered - in the executable will not be called if GLUT calls its (different) - exit routine). GLUT is typically built with the - "/MD" option (the CRT with multithreading DLL support), but the Visual - C++ linker default is "/ML" (the single threaded CRT). - - One workaround to this issue is requiring users to always link with - the same CRT as GLUT is compiled with. That requires users supply a - non-standard option. GLUT 3.7 has its own built-in workaround where - the executable's "exit" function pointer is covertly passed to GLUT. - GLUT then calls the executable's exit function pointer to ensure that - any "atexit" calls registered by the application are called if GLUT - needs to exit. - - Note that the __glut*WithExit routines should NEVER be called directly. - To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ - -/* XXX This is from Win32's */ -# if !defined(_MSC_VER) && !defined(__cdecl) - /* Define __cdecl for non-Microsoft compilers. */ -# define __cdecl -# define GLUT_DEFINED___CDECL -# endif -# ifndef _CRTIMP -# ifdef _NTSDK - /* Definition compatible with NT SDK */ -# define _CRTIMP -# else - /* Current definition */ -# ifdef _DLL -# define _CRTIMP __declspec(dllimport) -# else -# define _CRTIMP -# endif -# endif -# define GLUT_DEFINED__CRTIMP -# endif - -/* GLUT API entry point declarations for Win32. */ -# ifdef GLUT_BUILDING_LIB -# define GLUTAPI __declspec(dllexport) -# else -# ifdef _DLL -# define GLUTAPI __declspec(dllimport) -# else -# define GLUTAPI extern -# endif -# endif - -/* GLUT callback calling convention for Win32. */ -# define GLUTCALLBACK __cdecl - -#endif /* _WIN32 */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_WIN32) -# ifndef GLUT_BUILDING_LIB -extern _CRTIMP void __cdecl exit(int); -# endif -#else -/* non-Win32 case. */ -/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */ -# define APIENTRY -# define GLUT_APIENTRY_DEFINED -# define CALLBACK -/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */ -# define GLUTAPI extern -# define GLUTCALLBACK -/* Prototype exit for the non-Win32 case (see above). */ -extern void exit(int); -#endif - -/** - GLUT API revision history: - - GLUT_API_VERSION is updated to reflect incompatible GLUT - API changes (interface changes, semantic changes, deletions, - or additions). - - GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 - - GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, - extension. Supports new input devices like tablet, dial and button - box, and Spaceball. Easy to query OpenGL extensions. - - GLUT_API_VERSION=3 glutMenuStatus added. - - GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, - glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic - video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, - glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, - glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). -**/ -#ifndef GLUT_API_VERSION /* allow this to be overriden */ -#define GLUT_API_VERSION 3 -#endif - -/** - GLUT implementation revision history: - - GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT - API revisions and implementation revisions (ie, bug fixes). - - GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of - GLUT Xlib-based implementation. 11/29/94 - - GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of - GLUT Xlib-based implementation providing GLUT version 2 - interfaces. - - GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95 - - GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95 - - GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95 - - GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 - - GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner - and video resize. 1/3/97 - - GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines. - - GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. - - GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling. - - GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support. - - GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface. - - GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa -**/ -#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ -#define GLUT_XLIB_IMPLEMENTATION 15 -#endif - -/* Display mode bit masks. */ -#define GLUT_RGB 0 -#define GLUT_RGBA GLUT_RGB -#define GLUT_INDEX 1 -#define GLUT_SINGLE 0 -#define GLUT_DOUBLE 2 -#define GLUT_ACCUM 4 -#define GLUT_ALPHA 8 -#define GLUT_DEPTH 16 -#define GLUT_STENCIL 32 -#if (GLUT_API_VERSION >= 2) -#define GLUT_MULTISAMPLE 128 -#define GLUT_STEREO 256 -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_LUMINANCE 512 -#endif - -/* Mouse buttons. */ -#define GLUT_LEFT_BUTTON 0 -#define GLUT_MIDDLE_BUTTON 1 -#define GLUT_RIGHT_BUTTON 2 - -/* Mouse button state. */ -#define GLUT_DOWN 0 -#define GLUT_UP 1 - -#if (GLUT_API_VERSION >= 2) -/* function keys */ -#define GLUT_KEY_F1 1 -#define GLUT_KEY_F2 2 -#define GLUT_KEY_F3 3 -#define GLUT_KEY_F4 4 -#define GLUT_KEY_F5 5 -#define GLUT_KEY_F6 6 -#define GLUT_KEY_F7 7 -#define GLUT_KEY_F8 8 -#define GLUT_KEY_F9 9 -#define GLUT_KEY_F10 10 -#define GLUT_KEY_F11 11 -#define GLUT_KEY_F12 12 -/* directional keys */ -#define GLUT_KEY_LEFT 100 -#define GLUT_KEY_UP 101 -#define GLUT_KEY_RIGHT 102 -#define GLUT_KEY_DOWN 103 -#define GLUT_KEY_PAGE_UP 104 -#define GLUT_KEY_PAGE_DOWN 105 -#define GLUT_KEY_HOME 106 -#define GLUT_KEY_END 107 -#define GLUT_KEY_INSERT 108 -#endif - -/* Entry/exit state. */ -#define GLUT_LEFT 0 -#define GLUT_ENTERED 1 - -/* Menu usage state. */ -#define GLUT_MENU_NOT_IN_USE 0 -#define GLUT_MENU_IN_USE 1 - -/* Visibility state. */ -#define GLUT_NOT_VISIBLE 0 -#define GLUT_VISIBLE 1 - -/* Window status state. */ -#define GLUT_HIDDEN 0 -#define GLUT_FULLY_RETAINED 1 -#define GLUT_PARTIALLY_RETAINED 2 -#define GLUT_FULLY_COVERED 3 - -/* Color index component selection values. */ -#define GLUT_RED 0 -#define GLUT_GREEN 1 -#define GLUT_BLUE 2 - -#if defined(_WIN32) -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN ((void*)0) -#define GLUT_STROKE_MONO_ROMAN ((void*)1) - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 ((void*)2) -#define GLUT_BITMAP_8_BY_13 ((void*)3) -#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) -#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 ((void*)6) -#define GLUT_BITMAP_HELVETICA_12 ((void*)7) -#define GLUT_BITMAP_HELVETICA_18 ((void*)8) -#endif -#else -/* Stroke font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutStrokeRoman; -GLUTAPI void *glutStrokeMonoRoman; - -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN (&glutStrokeRoman) -#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) - -/* Bitmap font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutBitmap9By15; -GLUTAPI void *glutBitmap8By13; -GLUTAPI void *glutBitmapTimesRoman10; -GLUTAPI void *glutBitmapTimesRoman24; -GLUTAPI void *glutBitmapHelvetica10; -GLUTAPI void *glutBitmapHelvetica12; -GLUTAPI void *glutBitmapHelvetica18; - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) -#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) -#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) -#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) -#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) -#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) -#endif -#endif - -/* glutGet parameters. */ -#define GLUT_WINDOW_X ((GLenum) 100) -#define GLUT_WINDOW_Y ((GLenum) 101) -#define GLUT_WINDOW_WIDTH ((GLenum) 102) -#define GLUT_WINDOW_HEIGHT ((GLenum) 103) -#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104) -#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105) -#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106) -#define GLUT_WINDOW_RED_SIZE ((GLenum) 107) -#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108) -#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109) -#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110) -#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111) -#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112) -#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113) -#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114) -#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115) -#define GLUT_WINDOW_RGBA ((GLenum) 116) -#define GLUT_WINDOW_PARENT ((GLenum) 117) -#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118) -#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119) -#if (GLUT_API_VERSION >= 2) -#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120) -#define GLUT_WINDOW_STEREO ((GLenum) 121) -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_WINDOW_CURSOR ((GLenum) 122) -#endif -#define GLUT_SCREEN_WIDTH ((GLenum) 200) -#define GLUT_SCREEN_HEIGHT ((GLenum) 201) -#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202) -#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203) -#define GLUT_MENU_NUM_ITEMS ((GLenum) 300) -#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400) -#define GLUT_INIT_WINDOW_X ((GLenum) 500) -#define GLUT_INIT_WINDOW_Y ((GLenum) 501) -#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502) -#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503) -#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504) -#if (GLUT_API_VERSION >= 2) -#define GLUT_ELAPSED_TIME ((GLenum) 700) -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123) -#endif - -#if (GLUT_API_VERSION >= 2) -/* glutDeviceGet parameters. */ -#define GLUT_HAS_KEYBOARD ((GLenum) 600) -#define GLUT_HAS_MOUSE ((GLenum) 601) -#define GLUT_HAS_SPACEBALL ((GLenum) 602) -#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603) -#define GLUT_HAS_TABLET ((GLenum) 604) -#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605) -#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606) -#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607) -#define GLUT_NUM_DIALS ((GLenum) 608) -#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609) -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610) -#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611) -#define GLUT_HAS_JOYSTICK ((GLenum) 612) -#define GLUT_OWNS_JOYSTICK ((GLenum) 613) -#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614) -#define GLUT_JOYSTICK_AXES ((GLenum) 615) -#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616) -#endif - -#if (GLUT_API_VERSION >= 3) -/* glutLayerGet parameters. */ -#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800) -#define GLUT_LAYER_IN_USE ((GLenum) 801) -#define GLUT_HAS_OVERLAY ((GLenum) 802) -#define GLUT_TRANSPARENT_INDEX ((GLenum) 803) -#define GLUT_NORMAL_DAMAGED ((GLenum) 804) -#define GLUT_OVERLAY_DAMAGED ((GLenum) 805) - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* glutVideoResizeGet parameters. */ -#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900) -#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901) -#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902) -#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903) -#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904) -#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905) -#define GLUT_VIDEO_RESIZE_X ((GLenum) 906) -#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907) -#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908) -#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909) -#endif - -/* glutUseLayer parameters. */ -#define GLUT_NORMAL ((GLenum) 0) -#define GLUT_OVERLAY ((GLenum) 1) - -/* glutGetModifiers return mask. */ -#define GLUT_ACTIVE_SHIFT 1 -#define GLUT_ACTIVE_CTRL 2 -#define GLUT_ACTIVE_ALT 4 - -/* glutSetCursor parameters. */ -/* Basic arrows. */ -#define GLUT_CURSOR_RIGHT_ARROW 0 -#define GLUT_CURSOR_LEFT_ARROW 1 -/* Symbolic cursor shapes. */ -#define GLUT_CURSOR_INFO 2 -#define GLUT_CURSOR_DESTROY 3 -#define GLUT_CURSOR_HELP 4 -#define GLUT_CURSOR_CYCLE 5 -#define GLUT_CURSOR_SPRAY 6 -#define GLUT_CURSOR_WAIT 7 -#define GLUT_CURSOR_TEXT 8 -#define GLUT_CURSOR_CROSSHAIR 9 -/* Directional cursors. */ -#define GLUT_CURSOR_UP_DOWN 10 -#define GLUT_CURSOR_LEFT_RIGHT 11 -/* Sizing cursors. */ -#define GLUT_CURSOR_TOP_SIDE 12 -#define GLUT_CURSOR_BOTTOM_SIDE 13 -#define GLUT_CURSOR_LEFT_SIDE 14 -#define GLUT_CURSOR_RIGHT_SIDE 15 -#define GLUT_CURSOR_TOP_LEFT_CORNER 16 -#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 -#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 -#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 -/* Inherit from parent window. */ -#define GLUT_CURSOR_INHERIT 100 -/* Blank cursor. */ -#define GLUT_CURSOR_NONE 101 -/* Fullscreen crosshair (if available). */ -#define GLUT_CURSOR_FULL_CROSSHAIR 102 -#endif - -/* GLUT initialization sub-API. */ -GLUTAPI void APIENTRY glutInit(int *argcp, char **argv); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } -#define glutInit glutInit_ATEXIT_HACK -#endif -#endif -GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutInitDisplayString(const char *string); -#endif -GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y); -GLUTAPI void APIENTRY glutInitWindowSize(int width, int height); -GLUTAPI void APIENTRY glutMainLoop(void); - -/* GLUT window sub-API. */ -GLUTAPI int APIENTRY glutCreateWindow(const char *title); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } -#define glutCreateWindow glutCreateWindow_ATEXIT_HACK -#endif -#endif -GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); -GLUTAPI void APIENTRY glutDestroyWindow(int win); -GLUTAPI void APIENTRY glutPostRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void APIENTRY glutPostWindowRedisplay(int win); -#endif -GLUTAPI void APIENTRY glutSwapBuffers(void); -GLUTAPI int APIENTRY glutGetWindow(void); -GLUTAPI void APIENTRY glutSetWindow(int win); -GLUTAPI void APIENTRY glutSetWindowTitle(const char *title); -GLUTAPI void APIENTRY glutSetIconTitle(const char *title); -GLUTAPI void APIENTRY glutPositionWindow(int x, int y); -GLUTAPI void APIENTRY glutReshapeWindow(int width, int height); -GLUTAPI void APIENTRY glutPopWindow(void); -GLUTAPI void APIENTRY glutPushWindow(void); -GLUTAPI void APIENTRY glutIconifyWindow(void); -GLUTAPI void APIENTRY glutShowWindow(void); -GLUTAPI void APIENTRY glutHideWindow(void); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void APIENTRY glutFullScreen(void); -GLUTAPI void APIENTRY glutSetCursor(int cursor); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutWarpPointer(int x, int y); -#endif - -/* GLUT overlay sub-API. */ -GLUTAPI void APIENTRY glutEstablishOverlay(void); -GLUTAPI void APIENTRY glutRemoveOverlay(void); -GLUTAPI void APIENTRY glutUseLayer(GLenum layer); -GLUTAPI void APIENTRY glutPostOverlayRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win); -#endif -GLUTAPI void APIENTRY glutShowOverlay(void); -GLUTAPI void APIENTRY glutHideOverlay(void); -#endif - -/* GLUT menu sub-API. */ -GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int)); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); } -#define glutCreateMenu glutCreateMenu_ATEXIT_HACK -#endif -#endif -GLUTAPI void APIENTRY glutDestroyMenu(int menu); -GLUTAPI int APIENTRY glutGetMenu(void); -GLUTAPI void APIENTRY glutSetMenu(int menu); -GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value); -GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu); -GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); -GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); -GLUTAPI void APIENTRY glutRemoveMenuItem(int item); -GLUTAPI void APIENTRY glutAttachMenu(int button); -GLUTAPI void APIENTRY glutDetachMenu(int button); - -/* GLUT window callback sub-API. */ -GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); -GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); -GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state)); -#if (GLUT_API_VERSION >= 2) -GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value)); -GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y)); -GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void)); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state)); -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); -#endif -#endif -#endif - -/* GLUT color index sub-API. */ -GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); -GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component); -GLUTAPI void APIENTRY glutCopyColormap(int win); - -/* GLUT state retrieval sub-API. */ -GLUTAPI int APIENTRY glutGet(GLenum type); -GLUTAPI int APIENTRY glutDeviceGet(GLenum type); -#if (GLUT_API_VERSION >= 2) -/* GLUT extension support sub-API */ -GLUTAPI int APIENTRY glutExtensionSupported(const char *name); -#endif -#if (GLUT_API_VERSION >= 3) -GLUTAPI int APIENTRY glutGetModifiers(void); -GLUTAPI int APIENTRY glutLayerGet(GLenum type); -#endif - -/* GLUT font sub-API */ -GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character); -GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character); -GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character); -GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string); -GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string); -#endif - -/* GLUT pre-built models sub-API */ -GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCube(GLdouble size); -GLUTAPI void APIENTRY glutSolidCube(GLdouble size); -GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutWireDodecahedron(void); -GLUTAPI void APIENTRY glutSolidDodecahedron(void); -GLUTAPI void APIENTRY glutWireTeapot(GLdouble size); -GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size); -GLUTAPI void APIENTRY glutWireOctahedron(void); -GLUTAPI void APIENTRY glutSolidOctahedron(void); -GLUTAPI void APIENTRY glutWireTetrahedron(void); -GLUTAPI void APIENTRY glutSolidTetrahedron(void); -GLUTAPI void APIENTRY glutWireIcosahedron(void); -GLUTAPI void APIENTRY glutSolidIcosahedron(void); - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* GLUT video resize sub-API. */ -GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param); -GLUTAPI void APIENTRY glutSetupVideoResizing(void); -GLUTAPI void APIENTRY glutStopVideoResizing(void); -GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height); -GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height); - -/* GLUT debugging sub-API. */ -GLUTAPI void APIENTRY glutReportErrors(void); -#endif - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -/* GLUT device control sub-API. */ -/* glutSetKeyRepeat modes. */ -#define GLUT_KEY_REPEAT_OFF 0 -#define GLUT_KEY_REPEAT_ON 1 -#define GLUT_KEY_REPEAT_DEFAULT 2 - -/* Joystick button masks. */ -#define GLUT_JOYSTICK_BUTTON_A 1 -#define GLUT_JOYSTICK_BUTTON_B 2 -#define GLUT_JOYSTICK_BUTTON_C 4 -#define GLUT_JOYSTICK_BUTTON_D 8 - -GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore); -GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode); -GLUTAPI void APIENTRY glutForceJoystickFunc(void); - -/* GLUT game mode sub-API. */ -/* glutGameModeGet. */ -#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0) -#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1) -#define GLUT_GAME_MODE_WIDTH ((GLenum) 2) -#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3) -#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4) -#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5) -#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6) - -GLUTAPI void APIENTRY glutGameModeString(const char *string); -GLUTAPI int APIENTRY glutEnterGameMode(void); -GLUTAPI void APIENTRY glutLeaveGameMode(void); -GLUTAPI int APIENTRY glutGameModeGet(GLenum mode); -#endif - -#ifdef __cplusplus -} - -#endif - -#ifdef GLUT_APIENTRY_DEFINED -# undef GLUT_APIENTRY_DEFINED -# undef APIENTRY -#endif - -#ifdef GLUT_WINGDIAPI_DEFINED -# undef GLUT_WINGDIAPI_DEFINED -# undef WINGDIAPI -#endif - -#ifdef GLUT_DEFINED___CDECL -# undef GLUT_DEFINED___CDECL -# undef __cdecl -#endif - -#ifdef GLUT_DEFINED__CRTIMP -# undef GLUT_DEFINED__CRTIMP -# undef _CRTIMP -#endif - -#endif /* __glut_h__ */ diff --git a/3rdparty/chipmunk-5.3.4/msvc/glut/lib/glut32.lib b/3rdparty/chipmunk-5.3.4/msvc/glut/lib/glut32.lib deleted file mode 100644 index c25583d44b..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/msvc/glut/lib/glut32.lib and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/msvc/glut/runtime/glut32.dll b/3rdparty/chipmunk-5.3.4/msvc/glut/runtime/glut32.dll deleted file mode 100644 index 106646ff71..0000000000 Binary files a/3rdparty/chipmunk-5.3.4/msvc/glut/runtime/glut32.dll and /dev/null differ diff --git a/3rdparty/chipmunk-5.3.4/msvc/readme.txt b/3rdparty/chipmunk-5.3.4/msvc/readme.txt deleted file mode 100644 index 244f7ac7de..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/readme.txt +++ /dev/null @@ -1,23 +0,0 @@ -This subdirectory contains project and solution files for building -the Chipmunk Physics library and its demo suite with Microsoft Visual C++. - -There are separate directories for each compiler version. The Developer -Studio program likes to refer to itself with a year but it also has a version -number. Here are the correspondences: - - MSVC 2008: vc9 - MSVC 2010: vc10 - -The demo suite uses the external GLUT (OpenGL Utility Toolkit) library for -rendering. A copy is included in the glut subdirectory. The demo program -will look for glut.dll at load time, so you'll need to ensure it is findable. -One way to do this is to set the working directory (found under Debugging -configuration properties in Developer Studio) to "../../glut/runtime". This -will launch the demo in that directory, enabling Windows to find the required -DLL. - -The DLL/non-DLL project configurations refer not to whether Chipmunk is a -DLL, but to whether the project is built to link with the C runtime library -statically or at runtime. Using the DLL version results in a smaller -executable, but you have to ship the CRT DLL (msvcr*.dll) with your -application if you want to guarantee that people will be able to use it. diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk.sln b/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk.sln deleted file mode 100644 index 26740f8d71..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk.sln +++ /dev/null @@ -1,36 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo\demo.vcxproj", "{659CE82A-959E-46C0-ACCC-A3BE0A0CB860}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "chipmunk\chipmunk.vcxproj", "{C1ACE86E-5A14-490A-9678-104BA2546723}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug DLL|Win32 = Debug DLL|Win32 - Debug|Win32 = Debug|Win32 - Release DLL|Win32 = Release DLL|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Debug|Win32.ActiveCfg = Debug|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Debug|Win32.Build.0 = Debug|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Release DLL|Win32.Build.0 = Release DLL|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Release|Win32.ActiveCfg = Release|Win32 - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860}.Release|Win32.Build.0 = Release|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Debug|Win32.ActiveCfg = Debug|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Debug|Win32.Build.0 = Debug|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Release DLL|Win32.Build.0 = Release DLL|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Release|Win32.ActiveCfg = Release|Win32 - {C1ACE86E-5A14-490A-9678-104BA2546723}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.def b/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.def deleted file mode 100644 index 83f91b8f7c..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.def +++ /dev/null @@ -1,190 +0,0 @@ -LIBRARY chipmunk - -EXPORTS - cpInitCollisionFuncs - - cpInitChipmunk - cpMomentForCircle - cpMomentForSegment - cpMomentForPoly - cpMomentForBox - - cpContactInit - cpArbiterInit - cpArbiterUpdate - cpArbiterPreStep - cpArbiterApplyCachedImpulse - cpArbiterApplyImpulse - cpArbiterTotalImpulse - cpArbiterTotalImpulseWithFriction - cpArbiterIgnore - - cpArrayAlloc - cpArrayInit - cpArrayNew - cpArrayDestroy - cpArrayFree - cpArrayPush - cpArrayPop - cpArrayDeleteIndex - cpArrayDeleteObj - cpArrayAppend - cpArrayEach - cpArrayContains - - cpBBClampVect - cpBBWrapVect - - cpBodyAlloc - cpBodyInit - cpBodyNew - cpBodyDestroy - cpBodyFree - cpBodyActivate - cpBodySleep - cpBodySetMass - cpBodySetMoment - cpBodySetAngle - cpBodySlew - cpBodyUpdateVelocity - cpBodyUpdatePosition - cpBodyResetForces - cpBodyApplyForce - cpApplyDampedSpring - - cpCollideShapes - - cpHashSetDestroy - cpHashSetFree - cpHashSetAlloc - cpHashSetInit - cpHashSetNew - cpHashSetInsert - cpHashSetRemove - cpHashSetFind - cpHashSetEach - cpHashSetFilter - - cpPolyShapeAlloc - cpPolyShapeInit - cpPolyShapeNew - cpBoxShapeInit - cpBoxShapeNew - cpPolyValidate - cpPolyShapeGetNumVerts - cpPolyShapeGetVert - - cpShapeInit - cpShapeDestroy - cpShapeFree - cpShapeCacheBB - cpShapePointQuery - cpCircleShapeAlloc - cpCircleShapeInit - cpCircleShapeNew - cpSegmentShapeAlloc - cpSegmentShapeInit - cpSegmentShapeNew - cpResetShapeIdCounter - cpSegmentQueryInfoPrint - cpShapeSegmentQuery - - cpSpaceAlloc - cpSpaceInit - cpSpaceNew - cpSpaceDestroy - cpSpaceFree - cpSpaceFreeChildren - cpSpaceSetDefaultCollisionHandler - cpSpaceAddCollisionHandler - cpSpaceRemoveCollisionHandler - cpSpaceAddShape - cpSpaceAddStaticShape - cpSpaceAddBody - cpSpaceAddConstraint - cpSpaceRemoveShape - cpSpaceRemoveStaticShape - cpSpaceRemoveBody - cpSpaceRemoveConstraint - cpSpaceAddPostStepCallback - cpSpacePointQuery - cpSpacePointQueryFirst - cpSpaceSegmentQuery - cpSpaceSegmentQueryFirst - cpSpaceBBQuery - cpSpaceEachBody - cpSpaceResizeStaticHash - cpSpaceResizeActiveHash - cpSpaceRehashStatic - cpSpaceRehashShape - cpSpaceStep - - cpSpaceHashAlloc - cpSpaceHashInit - cpSpaceHashNew - cpSpaceHashDestroy - cpSpaceHashFree - cpSpaceHashResize - cpSpaceHashInsert - cpSpaceHashRemove - cpSpaceHashEach - cpSpaceHashRehash - cpSpaceHashRehashObject - cpSpaceHashPointQuery - cpSpaceHashQuery - cpSpaceHashQueryRehash - cpSpaceHashSegmentQuery - - cpvlength - cpvslerp - cpvslerpconst - cpvforangle - cpvtoangle - cpvstr - - cpConstraintDestroy - cpConstraintFree - - cpDampedRotarySpringAlloc - cpDampedRotarySpringInit - cpDampedRotarySpringNew - - cpDampedSpringAlloc - cpDampedSpringInit - cpDampedSpringNew - - cpGearJointAlloc - cpGearJointInit - cpGearJointNew - cpGearJointSetRatio - - cpGrooveJointAlloc - cpGrooveJointInit - cpGrooveJointNew - cpGrooveJointSetGrooveA - cpGrooveJointSetGrooveB - - cpPinJointAlloc - cpPinJointInit - cpPinJointNew - - cpPivotJointAlloc - cpPivotJointInit - cpPivotJointNew - cpPivotJointNew2 - - cpRatchetJointAlloc - cpRatchetJointInit - cpRatchetJointNew - - cpRotaryLimitJointAlloc - cpRotaryLimitJointInit - cpRotaryLimitJointNew - - cpSimpleMotorAlloc - cpSimpleMotorInit - cpSimpleMotorNew - - cpSlideJointAlloc - cpSlideJointInit - cpSlideJointNew diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj b/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj deleted file mode 100644 index 42674b9cc2..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Debug DLL - Win32 - - - Debug - Win32 - - - Release DLL - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {C1ACE86E-5A14-490A-9678-104BA2546723} - Win32Proj - chipmunk - - - - StaticLibrary - true - Unicode - - - DynamicLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - DynamicLibrary - false - true - Unicode - - - - - - - - - - - - - - - - - - - $(Configuration)\ - - - $(Configuration)\ - - - $(Configuration)\ - - - $(Configuration)\ - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk - CompileAsCpp - 4068 - MultiThreadedDebug - - - Windows - true - - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk - CompileAsCpp - 4068 - - - Windows - true - chipmunk.def - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk - CompileAsCpp - 4068 - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk - CompileAsCpp - 4068 - - - Windows - true - true - true - chipmunk.def - - - - - - \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj.filters b/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj.filters deleted file mode 100644 index b5bd396d09..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/chipmunk/chipmunk.vcxproj.filters +++ /dev/null @@ -1,190 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - - - - - {2af6495e-94a8-4200-8b69-e531cfdb9518} - - - {23a179d1-3a41-426c-8528-edba78d4969c} - - - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src - - - src - - - src - - - - - - \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj b/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj deleted file mode 100644 index 2eb4180ef2..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Debug DLL - Win32 - - - Debug - Win32 - - - Release DLL - Win32 - - - Release - Win32 - - - - {659CE82A-959E-46C0-ACCC-A3BE0A0CB860} - Win32Proj - demo - - - - Application - true - Unicode - - - Application - true - Unicode - - - Application - false - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - - - - true - $(Configuration)\ - - - true - $(Configuration)\ - - - false - $(Configuration)\ - - - false - $(Configuration)\ - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk;..\..\glut\include - CompileAsCpp - MultiThreadedDebug - - - Console - true - ..\..\glut\lib - - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk;..\..\glut\include - CompileAsCpp - - - Console - true - ..\..\glut\lib - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk;..\..\glut\include - CompileAsCpp - MultiThreaded - - - Console - true - true - true - ..\..\glut\lib - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\include\chipmunk;..\..\glut\include - CompileAsCpp - - - Console - true - true - true - ..\..\glut\lib - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {c1ace86e-5a14-490a-9678-104ba2546723} - - - - - - \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj.filters b/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj.filters deleted file mode 100644 index cc6ca91e92..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc10/demo/demo.vcxproj.filters +++ /dev/null @@ -1,86 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk.sln b/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk.sln deleted file mode 100644 index ed91574a1f..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk.sln +++ /dev/null @@ -1,39 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "chipmunk\chipmunk.vcproj", "{49585540-F16D-48EF-8374-0C66B10BA956}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo\demo.vcproj", "{974C8A5E-7C72-4968-B0FC-3F35CDE22075}" - ProjectSection(ProjectDependencies) = postProject - {49585540-F16D-48EF-8374-0C66B10BA956} = {49585540-F16D-48EF-8374-0C66B10BA956} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug DLL|Win32 = Debug DLL|Win32 - Debug|Win32 = Debug|Win32 - Release DLL|Win32 = Release DLL|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {49585540-F16D-48EF-8374-0C66B10BA956}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Debug|Win32.ActiveCfg = Debug|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Debug|Win32.Build.0 = Debug|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Release DLL|Win32.Build.0 = Release DLL|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Release|Win32.ActiveCfg = Release|Win32 - {49585540-F16D-48EF-8374-0C66B10BA956}.Release|Win32.Build.0 = Release|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Debug|Win32.ActiveCfg = Debug|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Debug|Win32.Build.0 = Debug|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Release DLL|Win32.Build.0 = Release DLL|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Release|Win32.ActiveCfg = Release|Win32 - {974C8A5E-7C72-4968-B0FC-3F35CDE22075}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.def b/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.def deleted file mode 100644 index 83f91b8f7c..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.def +++ /dev/null @@ -1,190 +0,0 @@ -LIBRARY chipmunk - -EXPORTS - cpInitCollisionFuncs - - cpInitChipmunk - cpMomentForCircle - cpMomentForSegment - cpMomentForPoly - cpMomentForBox - - cpContactInit - cpArbiterInit - cpArbiterUpdate - cpArbiterPreStep - cpArbiterApplyCachedImpulse - cpArbiterApplyImpulse - cpArbiterTotalImpulse - cpArbiterTotalImpulseWithFriction - cpArbiterIgnore - - cpArrayAlloc - cpArrayInit - cpArrayNew - cpArrayDestroy - cpArrayFree - cpArrayPush - cpArrayPop - cpArrayDeleteIndex - cpArrayDeleteObj - cpArrayAppend - cpArrayEach - cpArrayContains - - cpBBClampVect - cpBBWrapVect - - cpBodyAlloc - cpBodyInit - cpBodyNew - cpBodyDestroy - cpBodyFree - cpBodyActivate - cpBodySleep - cpBodySetMass - cpBodySetMoment - cpBodySetAngle - cpBodySlew - cpBodyUpdateVelocity - cpBodyUpdatePosition - cpBodyResetForces - cpBodyApplyForce - cpApplyDampedSpring - - cpCollideShapes - - cpHashSetDestroy - cpHashSetFree - cpHashSetAlloc - cpHashSetInit - cpHashSetNew - cpHashSetInsert - cpHashSetRemove - cpHashSetFind - cpHashSetEach - cpHashSetFilter - - cpPolyShapeAlloc - cpPolyShapeInit - cpPolyShapeNew - cpBoxShapeInit - cpBoxShapeNew - cpPolyValidate - cpPolyShapeGetNumVerts - cpPolyShapeGetVert - - cpShapeInit - cpShapeDestroy - cpShapeFree - cpShapeCacheBB - cpShapePointQuery - cpCircleShapeAlloc - cpCircleShapeInit - cpCircleShapeNew - cpSegmentShapeAlloc - cpSegmentShapeInit - cpSegmentShapeNew - cpResetShapeIdCounter - cpSegmentQueryInfoPrint - cpShapeSegmentQuery - - cpSpaceAlloc - cpSpaceInit - cpSpaceNew - cpSpaceDestroy - cpSpaceFree - cpSpaceFreeChildren - cpSpaceSetDefaultCollisionHandler - cpSpaceAddCollisionHandler - cpSpaceRemoveCollisionHandler - cpSpaceAddShape - cpSpaceAddStaticShape - cpSpaceAddBody - cpSpaceAddConstraint - cpSpaceRemoveShape - cpSpaceRemoveStaticShape - cpSpaceRemoveBody - cpSpaceRemoveConstraint - cpSpaceAddPostStepCallback - cpSpacePointQuery - cpSpacePointQueryFirst - cpSpaceSegmentQuery - cpSpaceSegmentQueryFirst - cpSpaceBBQuery - cpSpaceEachBody - cpSpaceResizeStaticHash - cpSpaceResizeActiveHash - cpSpaceRehashStatic - cpSpaceRehashShape - cpSpaceStep - - cpSpaceHashAlloc - cpSpaceHashInit - cpSpaceHashNew - cpSpaceHashDestroy - cpSpaceHashFree - cpSpaceHashResize - cpSpaceHashInsert - cpSpaceHashRemove - cpSpaceHashEach - cpSpaceHashRehash - cpSpaceHashRehashObject - cpSpaceHashPointQuery - cpSpaceHashQuery - cpSpaceHashQueryRehash - cpSpaceHashSegmentQuery - - cpvlength - cpvslerp - cpvslerpconst - cpvforangle - cpvtoangle - cpvstr - - cpConstraintDestroy - cpConstraintFree - - cpDampedRotarySpringAlloc - cpDampedRotarySpringInit - cpDampedRotarySpringNew - - cpDampedSpringAlloc - cpDampedSpringInit - cpDampedSpringNew - - cpGearJointAlloc - cpGearJointInit - cpGearJointNew - cpGearJointSetRatio - - cpGrooveJointAlloc - cpGrooveJointInit - cpGrooveJointNew - cpGrooveJointSetGrooveA - cpGrooveJointSetGrooveB - - cpPinJointAlloc - cpPinJointInit - cpPinJointNew - - cpPivotJointAlloc - cpPivotJointInit - cpPivotJointNew - cpPivotJointNew2 - - cpRatchetJointAlloc - cpRatchetJointInit - cpRatchetJointNew - - cpRotaryLimitJointAlloc - cpRotaryLimitJointInit - cpRotaryLimitJointNew - - cpSimpleMotorAlloc - cpSimpleMotorInit - cpSimpleMotorNew - - cpSlideJointAlloc - cpSlideJointInit - cpSlideJointNew diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.vcproj b/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.vcproj deleted file mode 100644 index 5a5b6a5fc2..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc9/chipmunk/chipmunk.vcproj +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3rdparty/chipmunk-5.3.4/msvc/vc9/demo/demo.vcproj b/3rdparty/chipmunk-5.3.4/msvc/vc9/demo/demo.vcproj deleted file mode 100644 index a92b1e495e..0000000000 --- a/3rdparty/chipmunk-5.3.4/msvc/vc9/demo/demo.vcproj +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3rdparty/chipmunk-5.3.4/ruby/chipmunk_object.rb b/3rdparty/chipmunk-5.3.4/ruby/chipmunk_object.rb deleted file mode 100644 index 2974d116b7..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/chipmunk_object.rb +++ /dev/null @@ -1,133 +0,0 @@ -module CP - # Chipmunk Object - # Makes it easier to manage complex objects that reference many primitive Chipmunk objects such as bodies shapes and constraints. - # New composite objects simply need to include CP::Object and call #init_chipmunk_object(*objects) with the - # composite and primitive Chipmunk objects that make up itself. - module Object - # Returns the list of primitive Chipmunk objects (bodies, shapes and constraints) - # that this composite object references directly and indirectly. - def chipmunk_objects - if @chipmunk_objects - return @chipmunk_objects - else - raise "This CP::Object (#{self.class}) did not call #init_chipmunk_object." - end - end - - private - # Should be called during initialization of a CP::Object to set what primitive - # and composite Chipmunk objects this object references. - def init_chipmunk_object(*objs) - bad_objs = objs.reject{|obj| obj.is_a?(CP::Object)} - raise(ArgumentError, "The following objects: #{bad_objs.inspect} are not CP::Objects") unless bad_objs.empty? - - @chipmunk_objects = objs.inject([]){|sum, obj| sum + obj.chipmunk_objects}.uniq - end - end - - class Body - include CP::Object - - def chipmunk_objects - [self] - end - - def add_to_space(space) - space.add_body(self) - end - - def remove_from_space(space) - space.remove_body(self) - end - end - - module Shape - include CP::Object - - def chipmunk_objects - [self] - end - - def add_to_space(space) - space.add_shape(self) - end - - def remove_from_space(space) - space.remove_shape(self) - end - end - - module Constraint - include CP::Object - - def chipmunk_objects - [self] - end - - def add_to_space(space) - space.add_constraint(self) - end - - def remove_from_space(space) - space.remove_constraint(self) - end - end - - class Space - def add_object(obj) - obj.chipmunk_objects.each{|elt| elt.add_to_space(self)} - end - - def add_objects(*objs) - objs.each{|obj| add_object(obj)} - end - - def remove_object(obj) - obj.chipmunk_objects.each{|elt| elt.remove_from_space(self)} - end - - def remove_objects(*objs) - objs.each{|obj| remove_object(obj)} - end - end -end - -require 'chipmunk' - -# Create derived static objects that know to add themselves as static. -module CP - class StaticBody < Body - def initialize - super(Float::INFINITY, Float::INFINITY) - end - - def chipmunk_objects - # return [] instead of [self] so the static body will not be added. - [] - end - end - - module StaticShape - include Shape - - class Circle < Shape::Circle - include StaticShape - end - - class Segment < Shape::Segment - include StaticShape - end - - class Poly < Shape::Poly - include StaticShape - end - - def add_to_space(space) - space.add_static_shape(self) - end - - def remove_from_space(space) - space.remove_static_shape(self) - end - end -end diff --git a/3rdparty/chipmunk-5.3.4/ruby/doc_dummy.rb b/3rdparty/chipmunk-5.3.4/ruby/doc_dummy.rb deleted file mode 100644 index 6443762739..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/doc_dummy.rb +++ /dev/null @@ -1,479 +0,0 @@ - -class Float - # Normal floating point infinity. For your convenience. - INFINITY = 1.0/0.0 -end - -# Convenience method for CP::Vec2.new(x, y) -def vec2(x, y); end - -# Chipmunk Game Dynamics. Provides fast, easy to use, robust physics. -module CP - # The bias coefficient used for resolving penetrations. Setting 0.0 effectively disables - # penetration resolution. Setting 1.0 will try to resolve the penetration in a single step. - # (not recommended) The default is 0.1 - attr_accessor :bias_coef - - # The maximum allowed penetration distance. If an object penetrates by more than this - # value, they will be pushed apart. Setting a non zero value helps to prevent - # oscillating contacts. Defaults to 0.1, and can be any positive value. - attr_accessor :collision_slop - - # Calculate the moment of inertia for a circle with the given mass, - # inner and outer radii, and offset. _offset_ should be a CP::Vect. - # - # Various other formulas for moments of inertia can be found here: - # http://en.wikipedia.org/wiki/List_of_moments_of_inertia - def moment_for_circle(m, r1, r2, offset); end - - # Calculate the moment of inertia for a polygon with the given mass, - # vertexes, and offset. _verts_ should be an Array of CP::Vect with - # a counterclockwise winding, _offset_ should be a CP::Vect. - # - # Various other formulas for moments of inertia can be found here: - # http://en.wikipedia.org/wiki/List_of_moments_of_inertia - def moment_for_poly(m, verts, offset); end - - # Basic 2D vector class. - class Vec2 - attr_accessor :x, :y - - # Given an angle in radians, it returns a unit length vector. - def self.for_angle(a); end - - def initialize(x, y); end - - # Return the vector as an array. - def to_a; end - - def to_s; end - - # Get the angle (in radians) the vector is pointing in. - def to_angle; end - - # Vector negation. - def -@; end - - # Vector addition. - def +(vect); end - - # Vector subtraction. - def -(vect); end - - # Scalar multiplication. - def *(scalar); end - - # Scalar division. - def /(scalar); end - - # Vector dot product. - def dot(vect); end - - # 2D cross product analog. Z component of the 3D cross product. - def cross(vect); end - - # Length of the vector. - def length(vect); end - - # Squared length of the vector. Faster to calculate than the length, and - # may be used in comparisons. - def lengthsq(vect); end - - # Normalize a vector. - def normalize; end - - # Normalize a vector in place. - def normalize!; end - - # Get the perpendicular vector. - def perp; end - - # Vector projection of self onto vect. - def project(vect); end - - # Rotate and scale self by vect using complex multiplication. - def rotate(vect); end - - # Inverse of Vect#rotate. - def unrotate(vect); end - - # Returns true if self and vect are within dist. - def near?(vect, dist); end - end - - # Basic 2D bounding box class. - class BB - # Left. - attr_accessor :l - - # Bottom. - attr_accessor :b - - # Right. - attr_accessor :r - - # Top. - attr_accessor :t - - # Left, bottom, right and top. - def initialize(l, b, r, t); end - - # Test if the BBs intersect. - def intersect?(other); end - - # Clamps vector _v_ to the nearest point inside bounding box _self_. - def clamp_vect(v); end - - # Wraps vector _v_ to be inside bounding box _self_. - def wrap_vect(v); end - - def to_s; end - end - - # The Chipmunk rigid body class. A rigid body holds the physical properties of an object. - # (mass, position, rotation, velocity, etc.) It does not have a shape by itself. - # If youÕve done physics with particles before, rigid bodies differ mostly in that - # they are able to rotate. - class Body - # Mass. Replaces the now deprecated body.m. - attr_accessor :mass - - # Moment of inertia. Replaces the now deprecated body.i. - attr_accessor :moment - - # Position. Replaces the now deprecated body.p. - attr_accessor :pos - - # Velocity. Replaces the now deprecated body.v. - attr_accessor :vel - - # Force. Replaces the now deprecated body.f. - attr_accessor :force - - # Angle. (in radians) Replaces the now deprecated body.a. - attr_accessor :angle - - # Angular Velocity. (in radians/second) Replaces the now deprecated body.w. - attr_accessor :ang_vel - - # Torque. Replaces the now deprecated body.t. - attr_accessor :torque - - # Rotation expressed unit length vector. - attr_reader :rot - - # Covnverts vector _v_ from body local coordinates to world space coordinates. - def local2world(v); end - - # Covnvert vector _v_ from world space coordinates to body local coordinates. - def world2local(v); end - - # Create a body with the given mass and moment of inertia. - def initialize(m, i); end - - # Zero the accumulated forces and torques. - def reset_forces; end - - # Accumulate a force as applied at the offset in world - # coordinates. - def apply_force(force, offset); end - - # Apply an impulse as applied at the offset in world coordinates. - def apply_impulse(j, r); end - - # Integrate the velocity of the body for the given gravity, - # damping and time step. (Uses Euler integration) - def update_velocity(gravity, damping, dt); end - - # Integrate the position of the body for the given time - # step. (Uses Euler integration) - def update_position(dt); end - end - - # Collision shapes module. By attaching shapes to bodies, you can define the a - # bodyÕs shape. You can attach many shapes to a single body to define a complex - # shape, or none if it doesnÕt require a shape. - module Shape - # The CP::Body the shape is connected to. - attr_accessor :body - - # The collision type for the shape. The actual collision type used - # is the object id of the object you pass as the collision type, - # meaning you can use any Ruby object as an identifier. Symbols work well. - attr_accessor :collision_type - - # Shapes in the same non-nil collision group do not create collisions. - # Any object can be used as a collision identifier. - attr_accessor :group - - # A 32bit bitmask to set which layers the shape should collide in. - # Shapes only collide with other shapes that share a layer. Each layer - # is represented by a bit, and the default layer is all of them. - attr_accessor :layers - - # The elasticity of the shape. Using a value of 1.0 or higher is not - # recommended. The final elasticity value is the product of the two shapes. - attr_accessor :e - - # The frictional coefficient of the shape. A value of 1.0 represents - # an object that will not slide on a 45 degree angle. The final frictional - # coefficient is the product of the two shapes. - attr_accessor :u - - # The surface velocity is used by the friction calculations. - # You can use this to make conveyour belts or characters that walk. - # Interpreted in world space. - attr_accessor :surface_v - - # Delegate object. Useful from within collision pair functions. - # Meant as a convenience so that you don't need to subclass the - # shape classes for trivial uses. - attr_accessor :obj - - # Circle collision shape. - class Circle - include Shape - - # Create a circle collision shape attached to the given body at - # the given offset with the given radius. - def initialize(body, radius, offset); end - end - - # Segment collision shape. - class Segment - include Shape - - # Create a segment collision shape attached to the given body - # with endpoints _a_ and _b. - def initialize(body, a, b); end - end - - # Poly collision shape. - class Poly - include Shape - - # Create a poly collision shape attached to the given body at - # the given offset with the given vertexes. _verts_ must be an - # Array of CP::Vect with a counterclockwise winding. - def initialize(body, verts, offset); end - end - end - - # Constraints module. Defined herein are numerous joints, gears, and other - # constraints that act on pairs of bodies to constrain their motion. - module Constraint - - # Read the first body used in the constraint - attr_reader :body_a - - # Read the first body used in the constraint - attr_reader :body_b - - # The maximum amount of force that can be applied to correct the bodies in the joint. - # Defaults to infinity. - attr_accessor :max_force - - # The percentage of deformation that is being corrected per tick. Defaults to 0.1 - attr_accessor :bias_coef - - # The rate at which the deformation is corrected per unit time. For example - # a value of 100 will move the objects up to 100 units per unit time. - # Defaults to infinity. - attr_accessor :max_bias - - # A solid pin or rod connecting two rigid bodies. - class PinJoint - # Creates a joint between the given bodies with the given - # anchors. Anchor points are in body relative coordinates, where - # anchor1 is relative to body1, and anchor2 is relative to body2. - # The joint length defaults to the distance between the - # anchors at creation time. - def initialize(body1, body2, anchor1, anchor2); end - - attr_accessor :anchr1 - attr_accessor :anchr2 - attr_accessor :dist - end - - # Like a pin joint, but with a variable length. - class SlideJoint - # Creates a joint between the given bodies with the given - # anchors and minimum and maximum anchor distances. - def initialize(body1, body2, anchor1, anchor2, min, max); end - - attr_accessor :anchr1 - attr_accessor :anchr2 - attr_accessor :min - attr_accessor :max - end - - # The bodies pivot about a single point. - class PivotJoint - # Creates a pivot between the given bodies at the given anchor - # point. _pivot_ should be in world coordinates. - def initialize(body1, body2, pivot); end - - attr_accessor :anchr1 - attr_accessor :anchr2 - end - - # One body has a pivot that connects to a linear groove in the other. - class GrooveJoint - # _grv_a_ and _grv_b_ define the groove on body1_ and _anchr2_ - # defines the anchor on body2. All coordinates in body local coordinates. - def initialize(body1, body2, grv_a, grv_b, anchr2); end - end - - # Like a torsion spring. http://en.wikipedia.org/wiki/Torsion_spring - class DampedRotarySpring - - # Rest angle is the desired angular offset between body1 and body2 - # calculated as body2.angle - body1.angle. - # Stiffness is similar to Young's modulus but uses torque instead of force - # Damping is described here: http://en.wikipedia.org/wiki/Damping - def initialize(body1, body2, restAngle, stiffness, damping); end - - attr_accessor :rest_angle - attr_accessor :stiffness - attr_accessor :damping - end - - # A normal spring. Seeks to be at a certain length. - class DampedSpring - - # Rest length is the desired length of the spring. - # Stiffness is similar to Young's modulus but uses torque instead of force - # Damping is described here: http://en.wikipedia.org/wiki/Damping - def initialize(body1, body2, anchor1, anchor2, restLength, stiffness, damping); end - - attr_accessor :anchr1 - attr_accessor :anchr2 - attr_accessor :restLength - attr_accessor :stiffness - attr_accessor :damping - end - - # Defines direct relationships between rotation of two bodies. Has - # many relationships beyond just simple gears, by adjusting the - # default parameters. - class GearJoint - # Phase represents angular offset of the body2 from body1 when - # body1 is at an angle of 0. - # Ratio represents the gear ratio between the two. - def initialize(body1, body2, phase, ratio); end - - attr_accessor :phase - attr_accessor :ratio - end - - # Limits the rotation of one body relative to another. Min and max - # ranges can be less than zero or greater than 2*Pi, if you want - # an object to rotate several times before hitting the angular limit - class RotaryLimitJoint - # The min and max rotation is specified in radians. - def initialize(body1, body2, min, max); end - - attr_accessor :min - attr_accessor :max - end - - # Causes the bodies to rotate at a specified rate, relative to eachother. - # This applies whatever torque needed to cause that rotation, so you'll - # likely limit it with max_force. - class SimpleMotor - # Create a motor with the specified rate in radians per unit time. - def initialize(body1, body2, rate); end - - attr_accessor :rate - end - end - - # The Chipmunk space class. Spaces are the basic simulation unit in Chipmunk. - # You add bodies, shapes and joints to a space, and then update the space as a whole. - class Space - # The number of iterations to use when solving - # constraints. (collisions and joints) - attr_accessor :iterations - - # The amount of damping to apply to the system when updating. - attr_accessor :damping - - # The amount of gravity in the system. Must be a CP::Vect. - attr_accessor :gravity - - # Iterations used when solving for elasticity. - attr_accessor :elastic_iterations - - def initialize; end - - # Add a block to be called when a collision between a shape with a - # _collision_type_ of _type_a_ and a shape with a _collision_type_ - # of _type_b_ is found. Supplying no block or _&nil_ will reject - # any collision between the two given collision types. - def add_collision_func(type_a, type_b, &block); end - - # Remove a block added with _add_collision_func(). - def remove_collision_func(type_a, type_b); end - - # Set the default collision function to be used when no specifid - # function is found. Normally this simply accepts all - # collisions. Supplying no block or _&nil_ will reject collisions - # by default. Keep in mind that the default func will handle a lot - # of collisions, and you don't want 100,000 block calls a second! - def set_default_collision_func(&block); end - - # Set the default collision function. This block will be called - # whenever an unhandled collision pair is found. The default - # behavior is to accept all collisions, passing no block or _&nil_ - # will reject all collisions by default. - - # Add the given shape to the space's active spatial hash. Shapes - # attached to moving bodies should be added here as they will be - # rehashed on every call to Space#step - def add_shape(shape); end - - # Add the given shape to the space's static spatial hash. Static - # shapes are only rehashed when Space#rehash_static is called, so - # they should not move. - def add_static_shape(shape); end - - # Add the given rigid body to the space. - def add_body(body); end - - # Add the given constraint to the space. - def add_constraint(constraint); end - - # Remove the given joint from the space's static spatial hash. - def remove_shape(shape); end - - # Remove the given shape from the space's active spatial hash. - def remove_static_shape(shape); end - - # Remove the given body from the space. - def remove_body(body); end - - # Remove the given constraint from the space. - def remove_constraint(constraint); end - - # Resize the static spatial hash. - def resize_static_hash(dim, count); end - - # Resize the active spatial hash. - def resize_active_hash(dim, count); end - - # Calls the block for every shape that contains the point. - def shape_point_query(point); yield(shape); end - - # Calls the block for every static shape that contains the point. - def static_shape_point_query(point); yield(shape); end - - # Rehash the static spatial hash. - def rehash_static; end - - # Move the space forward by _dt_ seconds. Using a fixed size time - # step is highly recommended for efficiency of the contact - # persistence algorithm. - def step(dt); end - end -end - diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_chipmunk.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_chipmunk.c deleted file mode 100644 index 5185826f83..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_chipmunk.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -VALUE m_Chipmunk; - -ID id_parent; - -static VALUE -rb_get_cp_bias_coef(VALUE self) -{ - return rb_float_new(cp_bias_coef); -} - -static VALUE -rb_set_cp_bias_coef(VALUE self, VALUE num) -{ - cp_bias_coef = NUM2DBL(num); - return num; -} - -static VALUE -rb_get_cp_collision_slop(VALUE self) -{ - return rb_float_new(cp_collision_slop); -} - -static VALUE -rb_set_cp_collision_slop(VALUE self, VALUE num) -{ - cp_collision_slop = NUM2DBL(num); - return num; -} - -static VALUE -rb_momentForCircle(VALUE self, VALUE m, VALUE r1, VALUE r2, VALUE offset) -{ - cpFloat i = cpMomentForCircle(NUM2DBL(m), NUM2DBL(r1), NUM2DBL(r2), *VGET(offset)); - return rb_float_new(i); -} - -static VALUE -rb_momentForPoly(VALUE self, VALUE m, VALUE arr, VALUE offset) -{ - Check_Type(arr, T_ARRAY); - int numVerts = RARRAY_LEN(arr); - VALUE *ary_ptr = RARRAY_PTR(arr); - cpVect verts[numVerts]; - - for(int i=0; i -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -VALUE c_cpBB; - -static VALUE -rb_cpBBAlloc(VALUE klass) -{ - cpBB *bb = malloc(sizeof(cpBB)); - return Data_Wrap_Struct(klass, NULL, free, bb); -} - -static VALUE -rb_cpBBInitialize(VALUE self, VALUE l, VALUE b, VALUE r, VALUE t) -{ - cpBB *bb = BBGET(self); - bb->l = NUM2DBL(l); - bb->b = NUM2DBL(b); - bb->r = NUM2DBL(r); - bb->t = NUM2DBL(t); - - return self; -} - -static VALUE -rb_cpBBintersects(VALUE self, VALUE other) -{ - int value = cpBBintersects(*BBGET(self), *BBGET(other)); - return value ? Qtrue : Qfalse; -} - -static VALUE -rb_cpBBClampVect(VALUE self, VALUE v) -{ - return VNEW(cpBBClampVect(*BBGET(self), *VGET(v))); -} - -static VALUE -rb_cpBBWrapVect(VALUE self, VALUE v) -{ - return VNEW(cpBBWrapVect(*BBGET(self), *VGET(v))); -} - -static VALUE -rb_cpBBGetL(VALUE self) -{ - return rb_float_new(BBGET(self)->l); -} - -static VALUE -rb_cpBBGetB(VALUE self) -{ - return rb_float_new(BBGET(self)->b); -} - -static VALUE -rb_cpBBGetR(VALUE self) -{ - return rb_float_new(BBGET(self)->r); -} - -static VALUE -rb_cpBBGetT(VALUE self) -{ - return rb_float_new(BBGET(self)->t); -} - -static VALUE -rb_cpBBSetL(VALUE self, VALUE val) -{ - BBGET(self)->l = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBBSetB(VALUE self, VALUE val) -{ - BBGET(self)->b = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBBSetR(VALUE self, VALUE val) -{ - BBGET(self)->r = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBBSetT(VALUE self, VALUE val) -{ - BBGET(self)->t = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBBToString(VALUE self) -{ - char str[256]; - cpBB *bb = BBGET(self); - - sprintf(str, "# (% .3f, % .3f)>", bb->l, bb->b, bb->r, bb->t); - - return rb_str_new2(str); -} - -void -Init_cpBB(void) -{ - c_cpBB = rb_define_class_under(m_Chipmunk, "BB", rb_cObject); - rb_define_alloc_func(c_cpBB, rb_cpBBAlloc); - rb_define_method(c_cpBB, "initialize", rb_cpBBInitialize, 4); - - rb_define_method(c_cpBB, "l", rb_cpBBGetL, 0); - rb_define_method(c_cpBB, "b", rb_cpBBGetB, 0); - rb_define_method(c_cpBB, "r", rb_cpBBGetR, 0); - rb_define_method(c_cpBB, "t", rb_cpBBGetT, 0); - - rb_define_method(c_cpBB, "l=", rb_cpBBSetL, 1); - rb_define_method(c_cpBB, "b=", rb_cpBBSetB, 1); - rb_define_method(c_cpBB, "r=", rb_cpBBSetR, 1); - rb_define_method(c_cpBB, "t=", rb_cpBBSetT, 1); - - rb_define_method(c_cpBB, "intersect?", rb_cpBBintersects, 1); - //containsBB - //containsVect - rb_define_method(c_cpBB, "clamp_vect", rb_cpBBClampVect, 1); - rb_define_method(c_cpBB, "wrap_vect", rb_cpBBWrapVect, 1); - - rb_define_method(c_cpBB, "to_s", rb_cpBBToString, 0); -} diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpBody.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpBody.c deleted file mode 100644 index 1762672877..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpBody.c +++ /dev/null @@ -1,261 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -VALUE c_cpBody; - -static VALUE -rb_cpBodyAlloc(VALUE klass) -{ - cpBody *body = cpBodyNew(1.0f, 1.0f); - return Data_Wrap_Struct(klass, NULL, cpBodyFree, body); -} - -static VALUE -rb_cpBodyInitialize(VALUE self, VALUE m, VALUE i) -{ - cpBody *body = BODY(self); - cpBodyInit(body, NUM2DBL(m), NUM2DBL(i)); - - return self; -} - -static VALUE -rb_cpBodyGetMass(VALUE self) -{ - return rb_float_new(BODY(self)->m); -} - -static VALUE -rb_cpBodyGetMoment(VALUE self) -{ - return rb_float_new(BODY(self)->i); -} - -static VALUE -rb_cpBodyGetPos(VALUE self) -{ - return VWRAP(self, &BODY(self)->p); -} - -static VALUE -rb_cpBodyGetVel(VALUE self) -{ - return VWRAP(self, &BODY(self)->v); -} - -static VALUE -rb_cpBodyGetForce(VALUE self) -{ - return VWRAP(self, &BODY(self)->f); -} - -static VALUE -rb_cpBodyGetAngle(VALUE self) -{ - return rb_float_new(BODY(self)->a); -} - -static VALUE -rb_cpBodyGetAVel(VALUE self) -{ - return rb_float_new(BODY(self)->w); -} - -static VALUE -rb_cpBodyGetTorque(VALUE self) -{ - return rb_float_new(BODY(self)->t); -} - -static VALUE -rb_cpBodyGetRot(VALUE self) -{ - return VWRAP(self, &BODY(self)->rot); -} - - -static VALUE -rb_cpBodySetMass(VALUE self, VALUE val) -{ - cpBodySetMass(BODY(self), NUM2DBL(val)); - return val; -} - -static VALUE -rb_cpBodySetMoment(VALUE self, VALUE val) -{ - cpBodySetMoment(BODY(self), NUM2DBL(val)); - return val; -} - -static VALUE -rb_cpBodySetPos(VALUE self, VALUE val) -{ - BODY(self)->p = *VGET(val); - return val; -} - -static VALUE -rb_cpBodySetVel(VALUE self, VALUE val) -{ - BODY(self)->v = *VGET(val); - return val; -} - -static VALUE -rb_cpBodySetForce(VALUE self, VALUE val) -{ - BODY(self)->f = *VGET(val); - return val; -} - -static VALUE -rb_cpBodySetAngle(VALUE self, VALUE val) -{ - cpBodySetAngle(BODY(self), NUM2DBL(val)); - return val; -} - -static VALUE -rb_cpBodySetAVel(VALUE self, VALUE val) -{ - BODY(self)->w = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBodySetTorque(VALUE self, VALUE val) -{ - BODY(self)->t = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpBodyLocal2World(VALUE self, VALUE v) -{ - return VNEW(cpBodyLocal2World(BODY(self), *VGET(v))); -} - -static VALUE -rb_cpBodyWorld2Local(VALUE self, VALUE v) -{ - return VNEW(cpBodyWorld2Local(BODY(self), *VGET(v))); -} - -static VALUE -rb_cpBodyResetForces(VALUE self) -{ - cpBodyResetForces(BODY(self)); - return Qnil; -} - -static VALUE -rb_cpBodyApplyForce(VALUE self, VALUE f, VALUE r) -{ - cpBodyApplyForce(BODY(self), *VGET(f), *VGET(r)); - return Qnil; -} - -static VALUE -rb_cpBodyApplyImpulse(VALUE self, VALUE j, VALUE r) -{ - cpBodyApplyImpulse(BODY(self), *VGET(j), *VGET(r)); - return Qnil; -} - -static VALUE -rb_cpBodyUpdateVelocity(VALUE self, VALUE g, VALUE dmp, VALUE dt) -{ - cpBodyUpdateVelocity(BODY(self), *VGET(g), NUM2DBL(dmp), NUM2DBL(dt)); - return Qnil; -} - -static VALUE -rb_cpBodyUpdatePosition(VALUE self, VALUE dt) -{ - cpBodyUpdatePosition(BODY(self), NUM2DBL(dt)); - return Qnil; -} - - -void -Init_cpBody(void) -{ - c_cpBody = rb_define_class_under(m_Chipmunk, "Body", rb_cObject); - rb_define_alloc_func(c_cpBody, rb_cpBodyAlloc); - rb_define_method(c_cpBody, "initialize", rb_cpBodyInitialize, 2); - - rb_define_method(c_cpBody, "m" , rb_cpBodyGetMass, 0); - rb_define_method(c_cpBody, "i" , rb_cpBodyGetMoment, 0); - rb_define_method(c_cpBody, "p" , rb_cpBodyGetPos, 0); - rb_define_method(c_cpBody, "v" , rb_cpBodyGetVel, 0); - rb_define_method(c_cpBody, "f" , rb_cpBodyGetForce, 0); - rb_define_method(c_cpBody, "a" , rb_cpBodyGetAngle, 0); - rb_define_method(c_cpBody, "w" , rb_cpBodyGetAVel, 0); - rb_define_method(c_cpBody, "t" , rb_cpBodyGetTorque, 0); - rb_define_method(c_cpBody, "rot", rb_cpBodyGetRot, 0); - - rb_define_method(c_cpBody, "m=", rb_cpBodySetMass, 1); - rb_define_method(c_cpBody, "i=", rb_cpBodySetMoment, 1); - rb_define_method(c_cpBody, "p=", rb_cpBodySetPos, 1); - rb_define_method(c_cpBody, "v=", rb_cpBodySetVel, 1); - rb_define_method(c_cpBody, "f=", rb_cpBodySetForce, 1); - rb_define_method(c_cpBody, "a=", rb_cpBodySetAngle, 1); - rb_define_method(c_cpBody, "w=", rb_cpBodySetAVel, 1); - rb_define_method(c_cpBody, "t=", rb_cpBodySetTorque, 1); - - rb_define_method(c_cpBody, "mass" , rb_cpBodyGetMass, 0); - rb_define_method(c_cpBody, "moment" , rb_cpBodyGetMoment, 0); - rb_define_method(c_cpBody, "pos" , rb_cpBodyGetPos, 0); - rb_define_method(c_cpBody, "vel" , rb_cpBodyGetVel, 0); - rb_define_method(c_cpBody, "force" , rb_cpBodyGetForce, 0); - rb_define_method(c_cpBody, "angle" , rb_cpBodyGetAngle, 0); - rb_define_method(c_cpBody, "ang_vel" , rb_cpBodyGetAVel, 0); - rb_define_method(c_cpBody, "torque" , rb_cpBodyGetTorque, 0); - rb_define_method(c_cpBody, "rot", rb_cpBodyGetRot, 0); - - rb_define_method(c_cpBody, "mass=", rb_cpBodySetMass, 1); - rb_define_method(c_cpBody, "moment=", rb_cpBodySetMoment, 1); - rb_define_method(c_cpBody, "pos=", rb_cpBodySetPos, 1); - rb_define_method(c_cpBody, "vel=", rb_cpBodySetVel, 1); - rb_define_method(c_cpBody, "force=", rb_cpBodySetForce, 1); - rb_define_method(c_cpBody, "angle=", rb_cpBodySetAngle, 1); - rb_define_method(c_cpBody, "ang_vel=", rb_cpBodySetAVel, 1); - rb_define_method(c_cpBody, "torque=", rb_cpBodySetTorque, 1); - - rb_define_method(c_cpBody, "local2world", rb_cpBodyLocal2World, 1); - rb_define_method(c_cpBody, "world2local", rb_cpBodyWorld2Local, 1); - - rb_define_method(c_cpBody, "reset_forces", rb_cpBodyResetForces, 0); - rb_define_method(c_cpBody, "apply_force", rb_cpBodyApplyForce, 2); - rb_define_method(c_cpBody, "apply_impulse", rb_cpBodyApplyImpulse, 2); - - rb_define_method(c_cpBody, "update_velocity", rb_cpBodyUpdateVelocity, 3); - rb_define_method(c_cpBody, "update_position", rb_cpBodyUpdatePosition, 1); - - // TODO integration functions? -} diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpConstraint.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpConstraint.c deleted file mode 100644 index 08833b670f..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpConstraint.c +++ /dev/null @@ -1,301 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -*/ - -#include -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -VALUE m_cpConstraint; - -#define CONSTRAINT_GETSET_FUNCS(member) \ -static VALUE rb_cpConstraint_get_##member(VALUE self) \ -{return rb_float_new(CONSTRAINT(self)->member);} \ -static VALUE rb_cpConstraint_set_##member(VALUE self, VALUE value) \ -{CONSTRAINT(self)->member = NUM2DBL(value); return value;} - -CONSTRAINT_GETSET_FUNCS(maxForce) -CONSTRAINT_GETSET_FUNCS(biasCoef) -CONSTRAINT_GETSET_FUNCS(maxBias) - - -#define MAKE_FLT_GETTER(func) \ -static VALUE rb_##func(VALUE self) \ -{return rb_float_new(func(CONSTRAINT(self)));} - -#define MAKE_FLT_SETTER(func) \ -static VALUE rb_##func(VALUE self, VALUE value) \ -{func(CONSTRAINT(self), NUM2DBL(value)); return value;} \ - -#define MAKE_FLT_ACCESSORS(s, m) \ -MAKE_FLT_GETTER(s##Get##m) \ -MAKE_FLT_SETTER(s##Set##m) - -#define MAKE_VEC_GETTER(func) \ -static VALUE rb_##func(VALUE self) \ -{return VNEW(func(CONSTRAINT(self)));} - -#define MAKE_VEC_SETTER(func) \ -static VALUE rb_##func(VALUE self, VALUE value) \ -{func(CONSTRAINT(self), *VGET(value)); return value;} \ - -#define MAKE_VEC_ACCESSORS(s, m) \ -MAKE_VEC_GETTER(s##Get##m) \ -MAKE_VEC_SETTER(s##Set##m) - - -#define ALLOC_TEMPLATE(s, alloc) \ -static VALUE rb_##s##_alloc(VALUE klass) \ -{return Data_Wrap_Struct(klass, NULL, cpConstraintFree, alloc);} - -ALLOC_TEMPLATE(cpPinJoint, cpPinJointAlloc()) - -static VALUE -rb_cpPinJoint_init(VALUE self, VALUE a, VALUE b, VALUE anchr1, VALUE anchr2) -{ - cpPinJoint *joint = (cpPinJoint *)CONSTRAINT(self); - cpPinJointInit(joint, BODY(a), BODY(b), *VGET(anchr1), *VGET(anchr2)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_FLT_ACCESSORS(cpPinJoint, Dist) -MAKE_VEC_ACCESSORS(cpPinJoint, Anchr1) -MAKE_VEC_ACCESSORS(cpPinJoint, Anchr2) - - -ALLOC_TEMPLATE(cpDampedRotarySpring, cpDampedRotarySpringAlloc()) - -static VALUE -rb_cpDampedRotarySpring_init(VALUE self, VALUE a, VALUE b, VALUE restAngle, VALUE stiffness, VALUE damping) -{ - cpDampedRotarySpring *spring = (cpDampedRotarySpring *)CONSTRAINT(self); - cpDampedRotarySpringInit(spring, BODY(a), BODY(b), NUM2DBL(restAngle), NUM2DBL(stiffness), NUM2DBL(damping)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_FLT_ACCESSORS(cpDampedRotarySpring, RestAngle); -MAKE_FLT_ACCESSORS(cpDampedRotarySpring, Stiffness); -MAKE_FLT_ACCESSORS(cpDampedRotarySpring, Damping); - - -ALLOC_TEMPLATE(cpDampedSpring, cpDampedSpringAlloc()) - -static VALUE -rb_cpDampedSpring_init(VALUE self, VALUE a, VALUE b, VALUE anchr1, VALUE anchr2, VALUE restLength, VALUE stiffness, VALUE damping) -{ - cpDampedSpring *spring = (cpDampedSpring *)CONSTRAINT(self); - cpDampedSpringInit(spring, BODY(a), BODY(b), *VGET(anchr1), *VGET(anchr2), NUM2DBL(restLength), NUM2DBL(stiffness), NUM2DBL(damping)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_VEC_ACCESSORS(cpDampedSpring, Anchr1) -MAKE_VEC_ACCESSORS(cpDampedSpring, Anchr2) -MAKE_FLT_ACCESSORS(cpDampedSpring, RestLength); -MAKE_FLT_ACCESSORS(cpDampedSpring, Stiffness); -MAKE_FLT_ACCESSORS(cpDampedSpring, Damping); - - -ALLOC_TEMPLATE(cpGearJoint, cpGearJointAlloc()) - -static VALUE -rb_cpGearJoint_init(VALUE self, VALUE a, VALUE b, VALUE phase, VALUE ratio) -{ - cpGearJoint *joint = (cpGearJoint *)CONSTRAINT(self); - cpGearJointInit(joint, BODY(a), BODY(b), NUM2DBL(phase), NUM2DBL(ratio)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_FLT_ACCESSORS(cpGearJoint, Phase); -MAKE_FLT_ACCESSORS(cpGearJoint, Ratio); - - -ALLOC_TEMPLATE(cpPivotJoint, cpPivotJointAlloc()) - -static VALUE -rb_cpPivotJoint_init(VALUE self, VALUE a, VALUE b, VALUE anchr1, VALUE anchr2) -{ - cpPivotJoint *joint = (cpPivotJoint *)CONSTRAINT(self); - cpPivotJointInit(joint, BODY(a), BODY(b), *VGET(anchr1), *VGET(anchr2)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_VEC_ACCESSORS(cpPivotJoint, Anchr1); -MAKE_VEC_ACCESSORS(cpPivotJoint, Anchr2); - - -ALLOC_TEMPLATE(cpRotaryLimitJoint, cpRotaryLimitJointAlloc()) - -static VALUE -rb_cpRotaryLimitJoint_init(VALUE self, VALUE a, VALUE b, VALUE min, VALUE max) -{ - cpRotaryLimitJoint *joint = (cpRotaryLimitJoint *)CONSTRAINT(self); - cpRotaryLimitJointInit(joint, BODY(a), BODY(b), NUM2DBL(min), NUM2DBL(max)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_FLT_ACCESSORS(cpRotaryLimitJoint, Min); -MAKE_FLT_ACCESSORS(cpRotaryLimitJoint, Max); - - -ALLOC_TEMPLATE(cpSimpleMotor, cpSimpleMotorAlloc()) - -static VALUE -rb_cpSimpleMotor_init(VALUE self, VALUE a, VALUE b, VALUE rate) -{ - cpSimpleMotor *motor = (cpSimpleMotor *)CONSTRAINT(self); - cpSimpleMotorInit(motor, BODY(a), BODY(b), NUM2DBL(rate)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_FLT_ACCESSORS(cpSimpleMotor, Rate); - - -ALLOC_TEMPLATE(cpSlideJoint, cpSlideJointAlloc()) - -static VALUE -rb_cpSlideJoint_init(VALUE self, VALUE a, VALUE b, VALUE anchr1, VALUE anchr2, VALUE min, VALUE max) -{ - cpSlideJoint *joint = (cpSlideJoint *)CONSTRAINT(self); - cpSlideJointInit(joint, BODY(a), BODY(b), *VGET(anchr1), *VGET(anchr2), NUM2DBL(min), NUM2DBL(max)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_VEC_ACCESSORS(cpSlideJoint, Anchr1) -MAKE_VEC_ACCESSORS(cpSlideJoint, Anchr2) -MAKE_FLT_ACCESSORS(cpSlideJoint, Min); -MAKE_FLT_ACCESSORS(cpSlideJoint, Max); - - -ALLOC_TEMPLATE(cpGrooveJoint, cpGrooveJointAlloc()) - -static VALUE -rb_cpGrooveJoint_init(VALUE self, VALUE a, VALUE b, VALUE grv_a, VALUE grv_b, VALUE anchr2) -{ - cpGrooveJoint *joint = (cpGrooveJoint *)CONSTRAINT(self); - cpGrooveJointInit(joint, BODY(a), BODY(b), *VGET(grv_a), *VGET(grv_b), *VGET(anchr2)); - rb_iv_set(self, "@body_a", a); - rb_iv_set(self, "@body_b", b); - - return self; -} - -MAKE_VEC_ACCESSORS(cpGrooveJoint, Anchr2) -// TODO more accessors - - -#define STRINGIFY(v) #v -#define ACCESSOR_METHODS(s, m, name) \ -rb_define_method(c_##s, STRINGIFY(name), rb_##s##Get##m, 0); \ -rb_define_method(c_##s, STRINGIFY(name=), rb_##s##Set##m, 1); - -static VALUE -make_class(char *name, void *alloc_func, void *init_func, int init_params) -{ - VALUE klass = rb_define_class_under(m_cpConstraint, name, rb_cObject); - rb_include_module(klass, m_cpConstraint); - rb_define_alloc_func(klass, alloc_func); - rb_define_method(klass, "initialize", init_func, init_params); - - return klass; -} - -void -Init_cpConstraint(void) -{ - m_cpConstraint = rb_define_module_under(m_Chipmunk, "Constraint"); - rb_define_attr(m_cpConstraint, "body_a", 1, 0); - rb_define_attr(m_cpConstraint, "body_b", 1, 0); - rb_define_method(m_cpConstraint, "max_force", rb_cpConstraint_get_maxForce, 0); - rb_define_method(m_cpConstraint, "max_force=", rb_cpConstraint_set_maxForce, 1); - rb_define_method(m_cpConstraint, "bias_coef", rb_cpConstraint_get_biasCoef, 0); - rb_define_method(m_cpConstraint, "bias_coef=", rb_cpConstraint_set_biasCoef, 1); - rb_define_method(m_cpConstraint, "max_bias", rb_cpConstraint_get_maxBias, 0); - rb_define_method(m_cpConstraint, "max_bias=", rb_cpConstraint_set_maxBias, 1); - - VALUE c_cpPinJoint = make_class("PinJoint", rb_cpPinJoint_alloc, rb_cpPinJoint_init, 4); - ACCESSOR_METHODS(cpPinJoint, Anchr1, anchr1) - ACCESSOR_METHODS(cpPinJoint, Anchr2, anchr2) - ACCESSOR_METHODS(cpPinJoint, Dist, dist) - - VALUE c_cpDampedRotarySpring = make_class("DampedRotarySpring", rb_cpDampedRotarySpring_alloc, rb_cpDampedRotarySpring_init, 5); - ACCESSOR_METHODS(cpDampedRotarySpring, RestAngle, rest_angle) - ACCESSOR_METHODS(cpDampedRotarySpring, Stiffness, stiffness) - ACCESSOR_METHODS(cpDampedRotarySpring, Damping, damping) - - VALUE c_cpDampedSpring = make_class("DampedSpring", rb_cpDampedSpring_alloc, rb_cpDampedSpring_init, 7); - ACCESSOR_METHODS(cpDampedSpring, Anchr1, anchr1) - ACCESSOR_METHODS(cpDampedSpring, Anchr2, anchr2) - ACCESSOR_METHODS(cpDampedSpring, RestLength, rest_length) - ACCESSOR_METHODS(cpDampedSpring, Stiffness, stiffness) - ACCESSOR_METHODS(cpDampedSpring, Damping, damping) - - VALUE c_cpGearJoint = make_class("GearJoint", rb_cpGearJoint_alloc, rb_cpGearJoint_init, 4); - ACCESSOR_METHODS(cpGearJoint, Phase, phase) - ACCESSOR_METHODS(cpGearJoint, Ratio, ratio) - - VALUE c_cpPivotJoint = make_class("PivotJoint", rb_cpPivotJoint_alloc, rb_cpPivotJoint_init, 4); - ACCESSOR_METHODS(cpPivotJoint, Anchr1, anchr1) - ACCESSOR_METHODS(cpPivotJoint, Anchr2, anchr2) - - VALUE c_cpRotaryLimitJoint = make_class("RotaryLimitJoint", rb_cpRotaryLimitJoint_alloc, rb_cpRotaryLimitJoint_init, 4); - ACCESSOR_METHODS(cpRotaryLimitJoint, Min, min) - ACCESSOR_METHODS(cpRotaryLimitJoint, Max, max) - - VALUE c_cpSimpleMotor = make_class("SimpleMotor", rb_cpSimpleMotor_alloc, rb_cpSimpleMotor_init, 3); - ACCESSOR_METHODS(cpSimpleMotor, Rate, rate); - - VALUE c_cpSlideJoint = make_class("SlideJoint", rb_cpSlideJoint_alloc, rb_cpSlideJoint_init, 6); - ACCESSOR_METHODS(cpSlideJoint, Anchr1, anchr1) - ACCESSOR_METHODS(cpSlideJoint, Anchr2, anchr2) - ACCESSOR_METHODS(cpSlideJoint, Min, min) - ACCESSOR_METHODS(cpSlideJoint, Max, max) - - VALUE c_cpGrooveJoint = make_class("GrooveJoint", rb_cpGrooveJoint_alloc, rb_cpGrooveJoint_init, 5); - ACCESSOR_METHODS(cpGrooveJoint, Anchr2, anchr2) -// TODO groove joint accessors - - // TODO breakable joint -} diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpShape.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpShape.c deleted file mode 100644 index c2ca191227..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpShape.c +++ /dev/null @@ -1,294 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -ID id_body; - -VALUE m_cpShape; -VALUE c_cpCircleShape; -VALUE c_cpSegmentShape; -VALUE c_cpPolyShape; - - - -static VALUE -rb_cpShapeGetBody(VALUE self) -{ - return rb_ivar_get(self, id_body); -} - -static VALUE -rb_cpShapeSetBody(VALUE self, VALUE body) -{ - SHAPE(self)->body = BODY(body); - rb_ivar_set(self, id_body, body); - - return body; -} - -static VALUE -rb_cpShapeGetCollType(VALUE self) -{ - return rb_iv_get(self, "collType"); -} - -static VALUE -rb_cpShapeSetCollType(VALUE self, VALUE val) -{ - VALUE col_type = rb_obj_id(val); - rb_iv_set(self, "collType", val); - SHAPE(self)->collision_type = NUM2UINT(col_type); - - return val; -} - -static VALUE -rb_cpShapeGetGroup(VALUE self) -{ - return rb_iv_get(self, "group"); -} - -static VALUE -rb_cpShapeSetGroup(VALUE self, VALUE val) -{ - VALUE col_type = rb_obj_id(val); - rb_iv_set(self, "group", val); - SHAPE(self)->group = NUM2UINT(col_type); - - return val; -} - -static VALUE -rb_cpShapeGetLayers(VALUE self) -{ - return UINT2NUM(SHAPE(self)->layers); -} - -static VALUE -rb_cpShapeSetLayers(VALUE self, VALUE layers) -{ - SHAPE(self)->layers = NUM2UINT(layers); - - return layers; -} - -static VALUE -rb_cpShapeGetBB(VALUE self) -{ - cpBB *bb = malloc(sizeof(cpBB)); - *bb = SHAPE(self)->bb; - return Data_Wrap_Struct(c_cpBB, NULL, free, bb); -} - -static VALUE -rb_cpShapeCacheBB(VALUE self) -{ - cpShape *shape = SHAPE(self); - cpShapeCacheBB(shape); - - return rb_cpShapeGetBB(self); -} - -static VALUE -rb_cpShapeGetElasticity(VALUE self) -{ - return rb_float_new(SHAPE(self)->e); -} - -static VALUE -rb_cpShapeGetFriction(VALUE self) -{ - return rb_float_new(SHAPE(self)->u); -} - -static VALUE -rb_cpShapeSetElasticity(VALUE self, VALUE val) -{ - SHAPE(self)->e = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpShapeSetFriction(VALUE self, VALUE val) -{ - SHAPE(self)->u = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpShapeGetSurfaceV(VALUE self) -{ - return VWRAP(self, &SHAPE(self)->surface_v); -} - -static VALUE -rb_cpShapeSetSurfaceV(VALUE self, VALUE val) -{ - SHAPE(self)->surface_v = *VGET(val); - return val; -} - -static VALUE -rb_cpShapeResetIdCounter(VALUE self) -{ - cpResetShapeIdCounter(); - return Qnil; -} - - - -//cpCircle -static VALUE -rb_cpCircleAlloc(VALUE klass) -{ - cpCircleShape *circle = cpCircleShapeAlloc(); - return Data_Wrap_Struct(klass, NULL, cpShapeFree, circle); -} - -static VALUE -rb_cpCircleInitialize(VALUE self, VALUE body, VALUE radius, VALUE offset) -{ - cpCircleShape *circle = (cpCircleShape *)SHAPE(self); - - cpCircleShapeInit(circle, BODY(body), NUM2DBL(radius), *VGET(offset)); - circle->shape.data = (void *)self; - circle->shape.collision_type = Qnil; - - rb_ivar_set(self, id_body, body); - - return self; -} - - - -//cpSegment -static VALUE -rb_cpSegmentAlloc(VALUE klass) -{ - cpSegmentShape *seg = cpSegmentShapeAlloc(); - return Data_Wrap_Struct(klass, NULL, cpShapeFree, seg); -} - -static VALUE -rb_cpSegmentInitialize(VALUE self, VALUE body, VALUE a, VALUE b, VALUE r) -{ - cpSegmentShape *seg = (cpSegmentShape *)SHAPE(self); - - cpSegmentShapeInit(seg, BODY(body), *VGET(a), *VGET(b), NUM2DBL(r)); - seg->shape.data = (void *)self; - seg->shape.collision_type = Qnil; - - rb_ivar_set(self, id_body, body); - - return self; -} - - - -//cpPoly -static VALUE -rb_cpPolyAlloc(VALUE klass) -{ - cpPolyShape *poly = cpPolyShapeAlloc(); - return Data_Wrap_Struct(klass, NULL, cpShapeFree, poly); -} - -static VALUE -rb_cpPolyInitialize(VALUE self, VALUE body, VALUE arr, VALUE offset) -{ - cpPolyShape *poly = (cpPolyShape *)SHAPE(self); - - Check_Type(arr, T_ARRAY); - int numVerts = RARRAY_LEN(arr); - VALUE *ary_ptr = RARRAY_PTR(arr); - cpVect verts[numVerts]; - - for(int i=0; ishape.data = (void *)self; - poly->shape.collision_type = Qnil; - - rb_ivar_set(self, id_body, body); - - return self; -} - - - -void -Init_cpShape(void) -{ - id_body = rb_intern("body"); - - m_cpShape = rb_define_module_under(m_Chipmunk, "Shape"); - rb_define_attr(m_cpShape, "obj", 1, 1); - - rb_define_method(m_cpShape, "body", rb_cpShapeGetBody, 0); - rb_define_method(m_cpShape, "body=", rb_cpShapeSetBody, 1); - - rb_define_method(m_cpShape, "collision_type", rb_cpShapeGetCollType, 0); - rb_define_method(m_cpShape, "collision_type=", rb_cpShapeSetCollType, 1); - - rb_define_method(m_cpShape, "group", rb_cpShapeGetGroup, 0); - rb_define_method(m_cpShape, "group=", rb_cpShapeSetGroup, 1); - - rb_define_method(m_cpShape, "layers", rb_cpShapeGetLayers, 0); - rb_define_method(m_cpShape, "layers=", rb_cpShapeSetLayers, 1); - - rb_define_method(m_cpShape, "bb", rb_cpShapeGetBB, 0); - rb_define_method(m_cpShape, "cache_bb", rb_cpShapeCacheBB, 0); - - rb_define_method(m_cpShape, "e", rb_cpShapeGetElasticity, 0); - rb_define_method(m_cpShape, "u", rb_cpShapeGetFriction, 0); - - rb_define_method(m_cpShape, "e=", rb_cpShapeSetElasticity, 1); - rb_define_method(m_cpShape, "u=", rb_cpShapeSetFriction, 1); - - rb_define_method(m_cpShape, "surface_v", rb_cpShapeGetSurfaceV, 0); - rb_define_method(m_cpShape, "surface_v=", rb_cpShapeSetSurfaceV, 1); - - rb_define_singleton_method(m_cpShape, "reset_id_counter", rb_cpShapeResetIdCounter, 0); - - - c_cpCircleShape = rb_define_class_under(m_cpShape, "Circle", rb_cObject); - rb_include_module(c_cpCircleShape, m_cpShape); - rb_define_alloc_func(c_cpCircleShape, rb_cpCircleAlloc); - rb_define_method(c_cpCircleShape, "initialize", rb_cpCircleInitialize, 3); - - - c_cpSegmentShape = rb_define_class_under(m_cpShape, "Segment", rb_cObject); - rb_include_module(c_cpSegmentShape, m_cpShape); - rb_define_alloc_func(c_cpSegmentShape, rb_cpSegmentAlloc); - rb_define_method(c_cpSegmentShape, "initialize", rb_cpSegmentInitialize, 4); - - - c_cpPolyShape = rb_define_class_under(m_cpShape, "Poly", rb_cObject); - rb_include_module(c_cpPolyShape, m_cpShape); - rb_define_alloc_func(c_cpPolyShape, rb_cpPolyAlloc); - rb_define_method(c_cpPolyShape, "initialize", rb_cpPolyInitialize, 3); -} diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpSpace.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpSpace.c deleted file mode 100644 index 73d9e377e8..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpSpace.c +++ /dev/null @@ -1,486 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -static ID id_call; -static ID id_begin; -static ID id_pre_solve; -static ID id_post_solve; -static ID id_separate; - - -VALUE c_cpSpace; - -static VALUE -rb_cpSpaceAlloc(VALUE klass) -{ - cpSpace *space = cpSpaceAlloc(); - return Data_Wrap_Struct(klass, NULL, cpSpaceFree, space); -} - -static VALUE -rb_cpSpaceInitialize(VALUE self) -{ - cpSpace *space = SPACE(self); - cpSpaceInit(space); - - // These might as well be in one shared hash. - rb_iv_set(self, "static_shapes", rb_ary_new()); - rb_iv_set(self, "active_shapes", rb_ary_new()); - rb_iv_set(self, "bodies", rb_ary_new()); - rb_iv_set(self, "constraints", rb_ary_new()); - rb_iv_set(self, "blocks", rb_hash_new()); - - return self; -} - -static VALUE -rb_cpSpaceGetIterations(VALUE self) -{ - return INT2NUM(SPACE(self)->iterations); -} - -static VALUE -rb_cpSpaceSetIterations(VALUE self, VALUE val) -{ - SPACE(self)->iterations = NUM2INT(val); - return val; -} - -static VALUE -rb_cpSpaceGetElasticIterations(VALUE self) -{ - return INT2NUM(SPACE(self)->elasticIterations); -} - -static VALUE -rb_cpSpaceSetElasticIterations(VALUE self, VALUE val) -{ - SPACE(self)->elasticIterations = NUM2INT(val); - return val; -} - -static VALUE -rb_cpSpaceGetDamping(VALUE self) -{ - return rb_float_new(SPACE(self)->damping); -} - -static VALUE -rb_cpSpaceSetDamping(VALUE self, VALUE val) -{ - SPACE(self)->damping = NUM2DBL(val); - return val; -} - -static VALUE -rb_cpSpaceGetGravity(VALUE self) -{ - return VWRAP(self, &SPACE(self)->gravity); -} - -static VALUE -rb_cpSpaceSetGravity(VALUE self, VALUE val) -{ - SPACE(self)->gravity = *VGET(val); - return val; -} - -static int -doNothingCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - return 0; -} - -static int -compatibilityCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - return rb_funcall((VALUE)data, id_call, 2, (VALUE)a->data, (VALUE)b->data); -} - -static int -beginCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - return rb_funcall((VALUE)data, id_begin, 2, (VALUE)a->data, (VALUE)b->data); -} - -static int -preSolveCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - return rb_funcall((VALUE)data, id_pre_solve, 2, (VALUE)a->data, (VALUE)b->data); -} - -static void -postSolveCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - rb_funcall((VALUE)data, id_post_solve, 2, (VALUE)a->data, (VALUE)b->data); -} - -static void -separateCallback(cpArbiter *arb, cpSpace *space, void *data) -{ - CP_ARBITER_GET_SHAPES(arb, a, b); - rb_funcall((VALUE)data, id_separate, 2, (VALUE)a->data, (VALUE)b->data); -} - -static int -respondsTo(VALUE obj, ID method) -{ - VALUE value = rb_funcall(obj, rb_intern("respond_to?"), 1, ID2SYM(method)); - return RTEST(value); -} - -static int -isBlock(VALUE obj) -{ - return respondsTo(obj, id_call); -} - -static VALUE -rb_cpSpaceAddCollisionHandler(int argc, VALUE *argv, VALUE self) -{ - VALUE a, b, obj, block; - obj = 0; - rb_scan_args(argc, argv, "21&", &a, &b, &obj, &block); - - VALUE id_a = rb_obj_id(a); - VALUE id_b = rb_obj_id(b); - VALUE blocks = rb_iv_get(self, "blocks"); - - if(RTEST(obj) && RTEST(block)){ - rb_raise(rb_eArgError, "Cannot specify both a handler object and a block."); - } else if(RTEST(block)){ - cpSpaceAddCollisionHandler( - SPACE(self), NUM2UINT(id_a), NUM2UINT(id_b), - NULL, - compatibilityCallback, - NULL, - NULL, - (void *)block - ); - - rb_hash_aset(blocks, rb_ary_new3(2, id_a, id_b), block); - } else if(RTEST(obj)) { - rb_notimplement(); // need to make it pass arbiters and crap - cpSpaceAddCollisionHandler( - SPACE(self), NUM2UINT(id_a), NUM2UINT(id_b), - (respondsTo(obj, id_begin) ? beginCallback : NULL), - (respondsTo(obj, id_pre_solve) ? preSolveCallback : NULL), - (respondsTo(obj, id_post_solve) ? postSolveCallback : NULL), - (respondsTo(obj, id_separate) ? separateCallback : NULL), - (void *)obj - ); - - rb_hash_aset(blocks, rb_ary_new3(2, id_a, id_b), obj); - } else { - cpSpaceAddCollisionHandler( - SPACE(self), NUM2UINT(id_a), NUM2UINT(id_b), - NULL, doNothingCallback, NULL, NULL, NULL - ); - } - - return Qnil; -} - -static VALUE -rb_cpSpaceRemoveCollisionHandler(VALUE self, VALUE a, VALUE b) -{ - VALUE id_a = rb_obj_id(a); - VALUE id_b = rb_obj_id(b); - cpSpaceRemoveCollisionHandler(SPACE(self), NUM2UINT(id_a), NUM2UINT(id_b)); - - VALUE blocks = rb_iv_get(self, "blocks"); - rb_hash_delete(blocks, rb_ary_new3(2, id_a, id_b)); - - return Qnil; -} - -static VALUE -rb_cpSpaceSetDefaultCollisionHandler(int argc, VALUE *argv, VALUE self) -{ - VALUE obj, block; - rb_scan_args(argc, argv, "01&", &obj, &block); - - if(RTEST(obj) && RTEST(block)){ - rb_raise(rb_eArgError, "Cannot specify both a handler object and a block."); - } else if(RTEST(block)){ - rb_notimplement(); // need to make it pass arbiters and crap - cpSpaceSetDefaultCollisionHandler( - SPACE(self), - NULL, - compatibilityCallback, - NULL, - NULL, - (void *)block - ); - - rb_hash_aset(rb_iv_get(self, "blocks"), ID2SYM(rb_intern("default")), block); - } else if(RTEST(obj)) { - cpSpaceSetDefaultCollisionHandler( - SPACE(self), - (respondsTo(obj, id_begin) ? beginCallback : NULL), - (respondsTo(obj, id_pre_solve) ? preSolveCallback : NULL), - (respondsTo(obj, id_post_solve) ? postSolveCallback : NULL), - (respondsTo(obj, id_separate) ? separateCallback : NULL), - (void *)obj - ); - - rb_hash_aset(rb_iv_get(self, "blocks"), ID2SYM(rb_intern("default")), obj); - } else { - cpSpaceSetDefaultCollisionHandler( - SPACE(self), NULL, doNothingCallback, NULL, NULL, NULL - ); - } - - return Qnil; -} - -static VALUE -rb_cpSpaceAddShape(VALUE self, VALUE shape) -{ - cpSpaceAddShape(SPACE(self), SHAPE(shape)); - rb_ary_push(rb_iv_get(self, "active_shapes"), shape); - return shape; -} - -static VALUE -rb_cpSpaceAddStaticShape(VALUE self, VALUE shape) -{ - cpSpaceAddStaticShape(SPACE(self), SHAPE(shape)); - rb_ary_push(rb_iv_get(self, "static_shapes"), shape); - return shape; -} - -static VALUE -rb_cpSpaceAddBody(VALUE self, VALUE body) -{ - cpSpaceAddBody(SPACE(self), BODY(body)); - rb_ary_push(rb_iv_get(self, "bodies"), body); - return body; -} - -static VALUE -rb_cpSpaceAddConstraint(VALUE self, VALUE constraint) -{ - cpSpaceAddConstraint(SPACE(self), CONSTRAINT(constraint)); - rb_ary_push(rb_iv_get(self, "constraints"), constraint); - return constraint; -} - -static VALUE -rb_cpSpaceRemoveShape(VALUE self, VALUE shape) -{ - cpSpaceRemoveShape(SPACE(self), SHAPE(shape)); - return rb_ary_delete(rb_iv_get(self, "active_shapes"), shape); -} - -static VALUE -rb_cpSpaceRemoveStaticShape(VALUE self, VALUE shape) -{ - cpSpaceRemoveStaticShape(SPACE(self), SHAPE(shape)); - return rb_ary_delete(rb_iv_get(self, "static_shapes"), shape); -} - -static VALUE -rb_cpSpaceRemoveBody(VALUE self, VALUE body) -{ - cpSpaceRemoveBody(SPACE(self), BODY(body)); - return rb_ary_delete(rb_iv_get(self, "bodies"), body); -} - -static VALUE -rb_cpSpaceRemoveConstraint(VALUE self, VALUE constraint) -{ - cpSpaceRemoveConstraint(SPACE(self), CONSTRAINT(constraint)); - return rb_ary_delete(rb_iv_get(self, "constraints"), constraint); -} - -static VALUE -rb_cpSpaceResizeStaticHash(VALUE self, VALUE dim, VALUE count) -{ - cpSpaceResizeStaticHash(SPACE(self), NUM2DBL(dim), NUM2INT(count)); - return Qnil; -} - -static VALUE -rb_cpSpaceResizeActiveHash(VALUE self, VALUE dim, VALUE count) -{ - cpSpaceResizeActiveHash(SPACE(self), NUM2DBL(dim), NUM2INT(count)); - return Qnil; -} - -static VALUE -rb_cpSpaceRehashStatic(VALUE self) -{ - cpSpaceRehashStatic(SPACE(self)); - return Qnil; -} - -static void -pointQueryCallback(cpShape *shape, VALUE block) -{ - rb_funcall(block, id_call, 1, (VALUE)shape->data); -} - -static VALUE -rb_cpSpacePointQuery(int argc, VALUE *argv, VALUE self) -{ - VALUE point, layers, group, block; - rb_scan_args(argc, argv, "12&", &point, &layers, &group, &block); - - cpSpacePointQuery( - SPACE(self), *VGET(point), - (NIL_P(layers) ? ~0 : NUM2UINT(layers)), - (NIL_P(group) ? 0 : NUM2UINT(rb_obj_id(group))), - (cpSpacePointQueryFunc)pointQueryCallback, (void *)block - ); - - return Qnil; -} - -static VALUE -rb_cpSpacePointQueryFirst(int argc, VALUE *argv, VALUE self) -{ - VALUE point, layers, group; - rb_scan_args(argc, argv, "12", &point, &layers, &group); - - cpShape *shape = cpSpacePointQueryFirst( - SPACE(self), *VGET(point), - (NIL_P(layers) ? ~0 : NUM2UINT(layers)), - (NIL_P(group) ? 0 : NUM2UINT(rb_obj_id(group))) - ); - - return (shape ? (VALUE)shape->data : Qnil); -} - -static void -segmentQueryCallback(cpShape *shape, cpFloat t, cpVect n, VALUE block) -{ - rb_funcall(block, id_call, 1, (VALUE)shape->data, rb_float_new(t), VNEW(n)); -} - -static VALUE -rb_cpSpaceSegmentQuery(int argc, VALUE *argv, VALUE self) -{ - VALUE a, b, layers, group, block; - rb_scan_args(argc, argv, "22&", &a, &b, &layers, &group, &block); - - cpSpaceSegmentQuery( - SPACE(self), *VGET(a), *VGET(b), - (NIL_P(layers) ? ~0 : NUM2UINT(layers)), - (NIL_P(group) ? 0 : NUM2UINT(rb_obj_id(group))), - (cpSpaceSegmentQueryFunc)segmentQueryCallback, (void *)block - ); - - return Qnil; -} - -static VALUE -rb_cpSpaceSegmentQueryFirst(int argc, VALUE *argv, VALUE self) -{ - VALUE a, b, layers, group, block; - rb_scan_args(argc, argv, "22&", &a, &b, &layers, &group, &block); - - cpSegmentQueryInfo info = {NULL, 1.0f, cpvzero}; - - cpSpaceSegmentQueryFirst( - SPACE(self), *VGET(a), *VGET(b), - (NIL_P(layers) ? ~0 : NUM2UINT(layers)), - (NIL_P(group) ? 0 : NUM2UINT(rb_obj_id(group))), - &info - ); - - if(info.shape){ - return rb_ary_new3(3, (VALUE)info.shape->data, rb_float_new(info.t), VNEW(info.n)); - } else { - return Qnil; - } -} - -static VALUE -rb_cpSpaceStep(VALUE self, VALUE dt) -{ - cpSpaceStep(SPACE(self), NUM2DBL(dt)); - return Qnil; -} - - - -void -Init_cpSpace(void) -{ - id_call = rb_intern("call"); - id_begin = rb_intern("begin"); - id_pre_solve = rb_intern("pre_solve"); - id_post_solve = rb_intern("post_solve"); - id_separate = rb_intern("separate"); - - c_cpSpace = rb_define_class_under(m_Chipmunk, "Space", rb_cObject); - rb_define_alloc_func(c_cpSpace, rb_cpSpaceAlloc); - rb_define_method(c_cpSpace, "initialize", rb_cpSpaceInitialize, 0); - - rb_define_method(c_cpSpace, "iterations", rb_cpSpaceGetIterations, 0); - rb_define_method(c_cpSpace, "iterations=", rb_cpSpaceSetIterations, 1); - - rb_define_method(c_cpSpace, "elastic_iterations", rb_cpSpaceGetElasticIterations, 0); - rb_define_method(c_cpSpace, "elastic_iterations=", rb_cpSpaceSetElasticIterations, 1); - - rb_define_method(c_cpSpace, "damping", rb_cpSpaceGetDamping, 0); - rb_define_method(c_cpSpace, "damping=", rb_cpSpaceSetDamping, 1); - - rb_define_method(c_cpSpace, "gravity", rb_cpSpaceGetGravity, 0); - rb_define_method(c_cpSpace, "gravity=", rb_cpSpaceSetGravity, 1); - - rb_define_method(c_cpSpace, "add_collision_func", rb_cpSpaceAddCollisionHandler, -1); - rb_define_method(c_cpSpace, "remove_collision_func", rb_cpSpaceRemoveCollisionHandler, 2); - rb_define_method(c_cpSpace, "set_default_collision_func", rb_cpSpaceSetDefaultCollisionHandler, -1); - - rb_define_method(c_cpSpace, "add_shape", rb_cpSpaceAddShape, 1); - rb_define_method(c_cpSpace, "add_static_shape", rb_cpSpaceAddStaticShape, 1); - rb_define_method(c_cpSpace, "add_body", rb_cpSpaceAddBody, 1); - rb_define_method(c_cpSpace, "add_constraint", rb_cpSpaceAddConstraint, 1); - - rb_define_method(c_cpSpace, "remove_shape", rb_cpSpaceRemoveShape, 1); - rb_define_method(c_cpSpace, "remove_static_shape", rb_cpSpaceRemoveStaticShape, 1); - rb_define_method(c_cpSpace, "remove_body", rb_cpSpaceRemoveBody, 1); - rb_define_method(c_cpSpace, "remove_constraint", rb_cpSpaceRemoveConstraint, 1); - - rb_define_method(c_cpSpace, "resize_static_hash", rb_cpSpaceResizeStaticHash, 2); - rb_define_method(c_cpSpace, "resize_active_hash", rb_cpSpaceResizeActiveHash, 2); - rb_define_method(c_cpSpace, "rehash_static", rb_cpSpaceRehashStatic, 0); - - rb_define_method(c_cpSpace, "point_query", rb_cpSpacePointQuery, -1); - rb_define_method(c_cpSpace, "point_query_first", rb_cpSpacePointQueryFirst, -1); - - rb_define_method(c_cpSpace, "segment_query", rb_cpSpaceSegmentQuery, -1); - rb_define_method(c_cpSpace, "segment_query_first", rb_cpSpaceSegmentQueryFirst, -1); - - rb_define_method(c_cpSpace, "step", rb_cpSpaceStep, 1); -} diff --git a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpVect.c b/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpVect.c deleted file mode 100644 index 9126524310..0000000000 --- a/3rdparty/chipmunk-5.3.4/ruby/ext/rb_cpVect.c +++ /dev/null @@ -1,251 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include "chipmunk.h" - -#include "ruby.h" -#include "rb_chipmunk.h" - -VALUE c_cpVect; - -static VALUE -rb_cpVectForAngle(VALUE self, VALUE angle) -{ - return VNEW(cpvforangle(NUM2DBL(angle))); -} - -static VALUE -rb_cpVectAlloc(VALUE klass) -{ - cpVect *v = malloc(sizeof(cpVect)); - return Data_Wrap_Struct(klass, NULL, free, v); -} - -static VALUE -rb_cpVectInitialize(VALUE self, VALUE x, VALUE y) -{ - cpVect *v = VGET(self); - v->x = NUM2DBL(x); - v->y = NUM2DBL(y); - - return self; -} - -static VALUE -rb_cpVectGetX(VALUE self) -{ - return rb_float_new(VGET(self)->x); -} - -static VALUE -rb_cpVectGetY(VALUE self) -{ - return rb_float_new(VGET(self)->y); -} - -static VALUE -rb_cpVectSetX(VALUE self, VALUE x) -{ - VGET(self)->x = NUM2DBL(x); - return self; -} - -static VALUE -rb_cpVectSetY(VALUE self, VALUE y) -{ - VGET(self)->y = NUM2DBL(y); - return self; -} - -static VALUE -rb_cpVectToString(VALUE self) -{ - char str[256]; - cpVect *v = VGET(self); - - sprintf(str, "(% .3f, % .3f)", v->x, v->y); - - return rb_str_new2(str); -} - -static VALUE -rb_cpVectToArray(VALUE self) -{ - cpVect *v = VGET(self); - return rb_ary_new3(2, rb_float_new(v->x), rb_float_new(v->y)); -} - -static VALUE -rb_cpVectToAngle(VALUE self) -{ - return rb_float_new(cpvtoangle(*VGET(self))); -} - - -static VALUE -rb_cpVectNegate(VALUE self) -{ - return VNEW(cpvneg(*VGET(self))); -} - -static VALUE -rb_cpVectAdd(VALUE self, VALUE v) -{ - return VNEW(cpvadd(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectSub(VALUE self, VALUE v) -{ - return VNEW(cpvsub(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectSMult(VALUE self, VALUE s) -{ - return VNEW(cpvmult(*VGET(self), NUM2DBL(s))); -} - -static VALUE -rb_cpVectSDiv(VALUE self, VALUE s) -{ - cpFloat factor = 1.0f/(float)NUM2DBL(s); - return VNEW(cpvmult(*VGET(self), factor)); -} - -static VALUE -rb_cpVectDot(VALUE self, VALUE v) -{ - return rb_float_new(cpvdot(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectCross(VALUE self, VALUE v) -{ - return rb_float_new(cpvcross(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectLength(VALUE self) -{ - cpVect *v; - Data_Get_Struct(self, cpVect, v); - return rb_float_new(cpvlength(*v)); -} - -static VALUE -rb_cpVectLengthsq(VALUE self) -{ - cpVect *v; - Data_Get_Struct(self, cpVect, v); - return rb_float_new(cpvlengthsq(*v)); -} - -static VALUE -rb_cpVectNorm(VALUE self) -{ - return VNEW(cpvnormalize(*VGET(self))); -} - -static VALUE -rb_cpVectNormBang(VALUE self) -{ - cpVect *v = VGET(self); - *v = cpvnormalize(*v); - return self; -} - -static VALUE -rb_cpVectPerp(VALUE self) -{ - return VNEW(cpvperp(*VGET(self))); -} - -static VALUE -rb_cpVectProject(VALUE self, VALUE v) -{ - return VNEW(cpvproject(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectRotate(VALUE self, VALUE v) -{ - return VNEW(cpvrotate(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectUnRotate(VALUE self, VALUE v) -{ - return VNEW(cpvunrotate(*VGET(self), *VGET(v))); -} - -static VALUE -rb_cpVectNear(VALUE self, VALUE v, VALUE d) -{ - cpFloat dist = NUM2DBL(d); - cpVect delta = cpvsub(*VGET(self), *VGET(v)); - return (cpvdot(delta, delta) <= dist*dist) ? Qtrue : Qfalse; -} - -static VALUE -rb_vec2(VALUE self, VALUE x, VALUE y) -{ - return VNEW(cpv(NUM2DBL(x), NUM2DBL(y))); -} - -void -Init_cpVect(void) -{ - c_cpVect = rb_define_class_under(m_Chipmunk, "Vec2", rb_cObject); - rb_define_singleton_method(c_cpVect, "for_angle", rb_cpVectForAngle, 1); - - rb_define_alloc_func(c_cpVect, rb_cpVectAlloc); - rb_define_method(c_cpVect, "initialize", rb_cpVectInitialize, 2); - - rb_define_method(c_cpVect, "x", rb_cpVectGetX, 0); - rb_define_method(c_cpVect, "y", rb_cpVectGetY, 0); - rb_define_method(c_cpVect, "x=", rb_cpVectSetX, 1); - rb_define_method(c_cpVect, "y=", rb_cpVectSetY, 1); - - rb_define_method(c_cpVect, "to_s", rb_cpVectToString, 0); - rb_define_method(c_cpVect, "to_a", rb_cpVectToArray, 0); - rb_define_method(c_cpVect, "to_angle", rb_cpVectToAngle, 0); - - rb_define_method(c_cpVect, "-@", rb_cpVectNegate, 0); - rb_define_method(c_cpVect, "+", rb_cpVectAdd, 1); - rb_define_method(c_cpVect, "-", rb_cpVectSub, 1); - rb_define_method(c_cpVect, "*", rb_cpVectSMult, 1); - rb_define_method(c_cpVect, "/", rb_cpVectSDiv, 1); - rb_define_method(c_cpVect, "dot", rb_cpVectDot, 1); - rb_define_method(c_cpVect, "cross", rb_cpVectCross, 1); - rb_define_method(c_cpVect, "length", rb_cpVectLength, 0); - rb_define_method(c_cpVect, "lengthsq", rb_cpVectLengthsq, 0); - rb_define_method(c_cpVect, "normalize", rb_cpVectNorm, 0); - rb_define_method(c_cpVect, "normalize!", rb_cpVectNormBang, 0); - rb_define_method(c_cpVect, "perp", rb_cpVectPerp, 0); - rb_define_method(c_cpVect, "project", rb_cpVectProject, 1); - rb_define_method(c_cpVect, "rotate", rb_cpVectRotate, 1); - rb_define_method(c_cpVect, "unrotate", rb_cpVectUnRotate, 1); - rb_define_method(c_cpVect, "near?", rb_cpVectNear, 2); - - rb_define_global_function("vec2", rb_vec2, 2); -} diff --git a/3rdparty/chipmunk-5.3.4/src/chipmunk.c b/3rdparty/chipmunk-5.3.4/src/chipmunk.c deleted file mode 100644 index 1862e78288..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/chipmunk.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#define _USE_MATH_DEFINES -#include - -#include "chipmunk.h" - -#ifdef __cplusplus -extern "C" { -#endif - void cpInitCollisionFuncs(void); -#ifdef __cplusplus -} -#endif - -void -cpMessage(const char *message, const char *condition, const char *file, int line, int isError) -{ - fprintf(stderr, (isError ? "Aborting due to Chipmunk error: %s\n" : "Chipmunk warning: %s\n"), message); - fprintf(stderr, "\tFailed condition: %s\n", condition); - fprintf(stderr, "\tSource:%s:%d\n", file, line); - - if(isError) abort(); -} - - -const char *cpVersionString = "5.3.4"; - -void -cpInitChipmunk(void) -{ -#ifndef NDEBUG - printf("Initializing Chipmunk v%s (Debug Enabled)\n", cpVersionString); - printf("Compile with -DNDEBUG defined to disable debug mode and runtime assertion checks\n"); -#endif - - cpInitCollisionFuncs(); -} - -cpFloat -cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset) -{ - return m*(0.5f*(r1*r1 + r2*r2) + cpvlengthsq(offset)); -} - -cpFloat -cpAreaForCircle(cpFloat r1, cpFloat r2) -{ - return 2.0f*(cpFloat)M_PI*cpfabs(r1*r1 - r2*r2); -} - -cpFloat -cpMomentForSegment(cpFloat m, cpVect a, cpVect b) -{ - cpFloat length = cpvlength(cpvsub(b, a)); - cpVect offset = cpvmult(cpvadd(a, b), 1.0f/2.0f); - - return m*(length*length/12.0f + cpvlengthsq(offset)); -} - -cpFloat -cpAreaForSegment(cpVect a, cpVect b, cpFloat r) -{ - return 2.0f*r*((cpFloat)M_PI*r + cpvdist(a, b)); -} - -cpFloat -cpMomentForPoly(cpFloat m, const int numVerts, const cpVect *verts, cpVect offset) -{ - cpFloat sum1 = 0.0f; - cpFloat sum2 = 0.0f; - for(int i=0; i - -#include "chipmunk_private.h" -#include "constraints/util.h" - -// TODO: Comment me! - -cpFloat cp_constraint_bias_coef = 0.1f; - -void cpConstraintDestroy(cpConstraint *constraint){} - -void -cpConstraintFree(cpConstraint *constraint) -{ - if(constraint){ - cpConstraintDestroy(constraint); - cpfree(constraint); - } -} - -// *** defined in util.h - -void -cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b) -{ - constraint->klass = klass; - constraint->a = a; - constraint->b = b; - - constraint->maxForce = (cpFloat)INFINITY; - constraint->biasCoef = cp_constraint_bias_coef; - constraint->maxBias = (cpFloat)INFINITY; -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedRotarySpring.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedRotarySpring.c deleted file mode 100644 index 499103dbaf..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedRotarySpring.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static cpFloat -defaultSpringTorque(cpDampedRotarySpring *spring, cpFloat relativeAngle){ - return (relativeAngle - spring->restAngle)*spring->stiffness; -} - -static void -preStep(cpDampedRotarySpring *spring, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(spring, a, b); - - cpFloat moment = a->i_inv + b->i_inv; - spring->iSum = 1.0f/moment; - - spring->w_coef = 1.0f - cpfexp(-spring->damping*dt*moment); - spring->target_wrn = 0.0f; - - // apply spring torque - cpFloat j_spring = spring->springTorqueFunc((cpConstraint *)spring, a->a - b->a)*dt; - a->w -= j_spring*a->i_inv; - b->w += j_spring*b->i_inv; -} - -static void -applyImpulse(cpDampedRotarySpring *spring) -{ - CONSTRAINT_BEGIN(spring, a, b); - - // compute relative velocity - cpFloat wrn = a->w - b->w;//normal_relative_velocity(a, b, r1, r2, n) - spring->target_vrn; - - // compute velocity loss from drag - // not 100% certain this is derived correctly, though it makes sense - cpFloat w_damp = wrn*spring->w_coef; - spring->target_wrn = wrn - w_damp; - - //apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, v_damp*spring->nMass)); - cpFloat j_damp = w_damp*spring->iSum; - a->w -= j_damp*a->i_inv; - b->w += j_damp*b->i_inv; -} - -static cpFloat -getImpulse(cpConstraint *constraint) -{ - return 0.0f; -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpDampedRotarySpring) - -cpDampedRotarySpring * -cpDampedRotarySpringAlloc(void) -{ - return (cpDampedRotarySpring *)cpmalloc(sizeof(cpDampedRotarySpring)); -} - -cpDampedRotarySpring * -cpDampedRotarySpringInit(cpDampedRotarySpring *spring, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping) -{ - cpConstraintInit((cpConstraint *)spring, &klass, a, b); - - spring->restAngle = restAngle; - spring->stiffness = stiffness; - spring->damping = damping; - spring->springTorqueFunc = (cpDampedRotarySpringTorqueFunc)defaultSpringTorque; - - return spring; -} - -cpConstraint * -cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping) -{ - return (cpConstraint *)cpDampedRotarySpringInit(cpDampedRotarySpringAlloc(), a, b, restAngle, stiffness, damping); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedSpring.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedSpring.c deleted file mode 100644 index 406af3af63..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpDampedSpring.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static cpFloat -defaultSpringForce(cpDampedSpring *spring, cpFloat dist){ - return (spring->restLength - dist)*spring->stiffness; -} - -static void -preStep(cpDampedSpring *spring, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(spring, a, b); - - spring->r1 = cpvrotate(spring->anchr1, a->rot); - spring->r2 = cpvrotate(spring->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, spring->r2), cpvadd(a->p, spring->r1)); - cpFloat dist = cpvlength(delta); - spring->n = cpvmult(delta, 1.0f/(dist ? dist : INFINITY)); - - cpFloat k = k_scalar(a, b, spring->r1, spring->r2, spring->n); - spring->nMass = 1.0f/k; - - spring->target_vrn = 0.0f; - spring->v_coef = 1.0f - cpfexp(-spring->damping*dt*k); - - // apply spring force - cpFloat f_spring = spring->springForceFunc((cpConstraint *)spring, dist); - apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, f_spring*dt)); -} - -static void -applyImpulse(cpDampedSpring *spring) -{ - CONSTRAINT_BEGIN(spring, a, b); - - cpVect n = spring->n; - cpVect r1 = spring->r1; - cpVect r2 = spring->r2; - - // compute relative velocity - cpFloat vrn = normal_relative_velocity(a, b, r1, r2, n) - spring->target_vrn; - - // compute velocity loss from drag - // not 100% certain this is derived correctly, though it makes sense - cpFloat v_damp = -vrn*spring->v_coef; - spring->target_vrn = vrn + v_damp; - - apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, v_damp*spring->nMass)); -} - -static cpFloat -getImpulse(cpConstraint *constraint) -{ - return 0.0f; -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpDampedSpring) - -cpDampedSpring * -cpDampedSpringAlloc(void) -{ - return (cpDampedSpring *)cpmalloc(sizeof(cpDampedSpring)); -} - -cpDampedSpring * -cpDampedSpringInit(cpDampedSpring *spring, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping) -{ - cpConstraintInit((cpConstraint *)spring, cpDampedSpringGetClass(), a, b); - - spring->anchr1 = anchr1; - spring->anchr2 = anchr2; - - spring->restLength = restLength; - spring->stiffness = stiffness; - spring->damping = damping; - spring->springForceFunc = (cpDampedSpringForceFunc)defaultSpringForce; - - return spring; -} - -cpConstraint * -cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping) -{ - return (cpConstraint *)cpDampedSpringInit(cpDampedSpringAlloc(), a, b, anchr1, anchr2, restLength, stiffness, damping); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpGearJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpGearJoint.c deleted file mode 100644 index dd694d35b9..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpGearJoint.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpGearJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv*joint->ratio_inv + joint->ratio*b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*(b->a*joint->ratio - a->a - joint->phase), -maxBias, maxBias); - - // compute max impulse - joint->jMax = J_MAX(joint, dt); - - // apply joint torque - cpFloat j = joint->jAcc; - a->w -= j*a->i_inv*joint->ratio_inv; - b->w += j*b->i_inv; -} - -static void -applyImpulse(cpGearJoint *joint) -{ - CONSTRAINT_BEGIN(joint, a, b); - - // compute relative rotational velocity - cpFloat wr = b->w*joint->ratio - a->w; - - // compute normal impulse - cpFloat j = (joint->bias - wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp(jOld + j, -joint->jMax, joint->jMax); - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv*joint->ratio_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpGearJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpGearJoint) - -cpGearJoint * -cpGearJointAlloc(void) -{ - return (cpGearJoint *)cpmalloc(sizeof(cpGearJoint)); -} - -cpGearJoint * -cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->phase = phase; - joint->ratio = ratio; - joint->ratio_inv = 1.0f/ratio; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio) -{ - return (cpConstraint *)cpGearJointInit(cpGearJointAlloc(), a, b, phase, ratio); -} - -void -cpGearJointSetRatio(cpConstraint *constraint, cpFloat value) -{ - cpConstraintCheckCast(constraint, cpGearJoint); - ((cpGearJoint *)constraint)->ratio = value; - ((cpGearJoint *)constraint)->ratio_inv = 1.0f/value; - cpConstraintActivateBodies(constraint); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpGrooveJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpGrooveJoint.c deleted file mode 100644 index 4a067ef929..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpGrooveJoint.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpGrooveJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - // calculate endpoints in worldspace - cpVect ta = cpBodyLocal2World(a, joint->grv_a); - cpVect tb = cpBodyLocal2World(a, joint->grv_b); - - // calculate axis - cpVect n = cpvrotate(joint->grv_n, a->rot); - cpFloat d = cpvdot(ta, n); - - joint->grv_tn = n; - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - // calculate tangential distance along the axis of r2 - cpFloat td = cpvcross(cpvadd(b->p, joint->r2), n); - // calculate clamping factor and r2 - if(td <= cpvcross(ta, n)){ - joint->clamp = 1.0f; - joint->r1 = cpvsub(ta, a->p); - } else if(td >= cpvcross(tb, n)){ - joint->clamp = -1.0f; - joint->r1 = cpvsub(tb, a->p); - } else { - joint->clamp = 0.0f; - joint->r1 = cpvsub(cpvadd(cpvmult(cpvperp(n), -td), cpvmult(n, d)), a->p); - } - - // Calculate mass tensor - k_tensor(a, b, joint->r1, joint->r2, &joint->k1, &joint->k2); - - // compute max impulse - joint->jMaxLen = J_MAX(joint, dt); - - // calculate bias velocity - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias); - - // apply accumulated impulse - apply_impulses(a, b, joint->r1, joint->r2, joint->jAcc); -} - -static inline cpVect -grooveConstrain(cpGrooveJoint *joint, cpVect j){ - cpVect n = joint->grv_tn; - cpVect jClamp = (joint->clamp*cpvcross(j, n) > 0.0f) ? j : cpvproject(j, n); - return cpvclamp(jClamp, joint->jMaxLen); -} - -static void -applyImpulse(cpGrooveJoint *joint) -{ - CONSTRAINT_BEGIN(joint, a, b); - - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute impulse - cpVect vr = relative_velocity(a, b, r1, r2); - - cpVect j = mult_k(cpvsub(joint->bias, vr), joint->k1, joint->k2); - cpVect jOld = joint->jAcc; - joint->jAcc = grooveConstrain(joint, cpvadd(jOld, j)); - j = cpvsub(joint->jAcc, jOld); - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static cpFloat -getImpulse(cpGrooveJoint *joint) -{ - return cpvlength(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpGrooveJoint) - -cpGrooveJoint * -cpGrooveJointAlloc(void) -{ - return (cpGrooveJoint *)cpmalloc(sizeof(cpGrooveJoint)); -} - -cpGrooveJoint * -cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->grv_a = groove_a; - joint->grv_b = groove_b; - joint->grv_n = cpvperp(cpvnormalize(cpvsub(groove_b, groove_a))); - joint->anchr2 = anchr2; - - joint->jAcc = cpvzero; - - return joint; -} - -cpConstraint * -cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2) -{ - return (cpConstraint *)cpGrooveJointInit(cpGrooveJointAlloc(), a, b, groove_a, groove_b, anchr2); -} - -void -cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value) -{ - cpGrooveJoint *g = (cpGrooveJoint *)constraint; - cpConstraintCheckCast(constraint, cpGrooveJoint); - - g->grv_a = value; - g->grv_n = cpvperp(cpvnormalize(cpvsub(g->grv_b, value))); - - cpConstraintActivateBodies(constraint); -} - -void -cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value) -{ - cpGrooveJoint *g = (cpGrooveJoint *)constraint; - cpConstraintCheckCast(constraint, cpGrooveJoint); - - g->grv_b = value; - g->grv_n = cpvperp(cpvnormalize(cpvsub(value, g->grv_a))); - - cpConstraintActivateBodies(constraint); -} - diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpPinJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpPinJoint.c deleted file mode 100644 index 3955143ff5..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpPinJoint.c +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -//#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpPinJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - cpFloat dist = cpvlength(delta); - joint->n = cpvmult(delta, 1.0f/(dist ? dist : (cpFloat)INFINITY)); - - // calculate mass normal - joint->nMass = 1.0f/k_scalar(a, b, joint->r1, joint->r2, joint->n); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*(dist - joint->dist), -maxBias, maxBias); - - // compute max impulse - joint->jnMax = J_MAX(joint, dt); - - // apply accumulated impulse - cpVect j = cpvmult(joint->n, joint->jnAcc); - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static void -applyImpulse(cpPinJoint *joint) -{ - CONSTRAINT_BEGIN(joint, a, b); - cpVect n = joint->n; - - // compute relative velocity - cpFloat vrn = normal_relative_velocity(a, b, joint->r1, joint->r2, n); - - // compute normal impulse - cpFloat jn = (joint->bias - vrn)*joint->nMass; - cpFloat jnOld = joint->jnAcc; - joint->jnAcc = cpfclamp(jnOld + jn, -joint->jnMax, joint->jnMax); - jn = joint->jnAcc - jnOld; - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(n, jn)); -} - -static cpFloat -getImpulse(cpPinJoint *joint) -{ - return cpfabs(joint->jnAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpPinJoint); - - -cpPinJoint * -cpPinJointAlloc(void) -{ - return (cpPinJoint *)cpmalloc(sizeof(cpPinJoint)); -} - -cpPinJoint * -cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - - // STATIC_BODY_CHECK - cpVect p1 = (a ? cpvadd(a->p, cpvrotate(anchr1, a->rot)) : anchr1); - cpVect p2 = (b ? cpvadd(b->p, cpvrotate(anchr2, b->rot)) : anchr2); - joint->dist = cpvlength(cpvsub(p2, p1)); - - joint->jnAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - return (cpConstraint *)cpPinJointInit(cpPinJointAlloc(), a, b, anchr1, anchr2); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpPivotJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpPivotJoint.c deleted file mode 100644 index 634bd02336..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpPivotJoint.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpPivotJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - // Calculate mass tensor - k_tensor(a, b, joint->r1, joint->r2, &joint->k1, &joint->k2); - - // compute max impulse - joint->jMaxLen = J_MAX(joint, dt); - - // calculate bias velocity - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias); - - // apply accumulated impulse - apply_impulses(a, b, joint->r1, joint->r2, joint->jAcc); -} - -static void -applyImpulse(cpPivotJoint *joint) -{ - CONSTRAINT_BEGIN(joint, a, b); - - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute relative velocity - cpVect vr = relative_velocity(a, b, r1, r2); - - // compute normal impulse - cpVect j = mult_k(cpvsub(joint->bias, vr), joint->k1, joint->k2); - cpVect jOld = joint->jAcc; - joint->jAcc = cpvclamp(cpvadd(joint->jAcc, j), joint->jMaxLen); - j = cpvsub(joint->jAcc, jOld); - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static cpFloat -getImpulse(cpConstraint *joint) -{ - return cpvlength(((cpPivotJoint *)joint)->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpPivotJoint) - -cpPivotJoint * -cpPivotJointAlloc(void) -{ - return (cpPivotJoint *)cpmalloc(sizeof(cpPivotJoint)); -} - -cpPivotJoint * -cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - - joint->jAcc = cpvzero; - - return joint; -} - -cpConstraint * -cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - return (cpConstraint *)cpPivotJointInit(cpPivotJointAlloc(), a, b, anchr1, anchr2); -} - -cpConstraint * -cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot) -{ - cpVect anchr1 = (a ? cpBodyWorld2Local(a, pivot) : pivot); - cpVect anchr2 = (b ? cpBodyWorld2Local(b, pivot) : pivot); - return cpPivotJointNew2(a, b, anchr1, anchr2); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpRatchetJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpRatchetJoint.c deleted file mode 100644 index a7103c7f01..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpRatchetJoint.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpRatchetJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - cpFloat angle = joint->angle; - cpFloat phase = joint->phase; - cpFloat ratchet = joint->ratchet; - - cpFloat delta = b->a - a->a; - cpFloat diff = angle - delta; - cpFloat pdist = 0.0f; - - if(diff*ratchet > 0.0f){ - pdist = diff; - } else { - joint->angle = cpffloor((delta - phase)/ratchet)*ratchet + phase; - } - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*pdist, -maxBias, maxBias); - - // compute max impulse - joint->jMax = J_MAX(joint, dt); - - // If the bias is 0, the joint is not at a limit. Reset the impulse. - if(!joint->bias) - joint->jAcc = 0.0f; - - // apply joint torque - a->w -= joint->jAcc*a->i_inv; - b->w += joint->jAcc*b->i_inv; -} - -static void -applyImpulse(cpRatchetJoint *joint) -{ - if(!joint->bias) return; // early exit - - CONSTRAINT_BEGIN(joint, a, b); - - // compute relative rotational velocity - cpFloat wr = b->w - a->w; - cpFloat ratchet = joint->ratchet; - - // compute normal impulse - cpFloat j = -(joint->bias + wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp((jOld + j)*ratchet, 0.0f, joint->jMax*cpfabs(ratchet))/ratchet; - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpRatchetJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpRatchetJoint) - -cpRatchetJoint * -cpRatchetJointAlloc(void) -{ - return (cpRatchetJoint *)cpmalloc(sizeof(cpRatchetJoint)); -} - -cpRatchetJoint * -cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->angle = 0.0f; - joint->phase = phase; - joint->ratchet = ratchet; - - // STATIC_BODY_CHECK - joint->angle = (b ? b->a : 0.0f) - (a ? a->a : 0.0f); - - return joint; -} - -cpConstraint * -cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet) -{ - return (cpConstraint *)cpRatchetJointInit(cpRatchetJointAlloc(), a, b, phase, ratchet); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpRotaryLimitJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpRotaryLimitJoint.c deleted file mode 100644 index 9bfa1ea708..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpRotaryLimitJoint.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpRotaryLimitJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - cpFloat dist = b->a - a->a; - cpFloat pdist = 0.0f; - if(dist > joint->max) { - pdist = joint->max - dist; - } else if(dist < joint->min) { - pdist = joint->min - dist; - } - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*(pdist), -maxBias, maxBias); - - // compute max impulse - joint->jMax = J_MAX(joint, dt); - - // If the bias is 0, the joint is not at a limit. Reset the impulse. - if(!joint->bias) - joint->jAcc = 0.0f; - - // apply joint torque - a->w -= joint->jAcc*a->i_inv; - b->w += joint->jAcc*b->i_inv; -} - -static void -applyImpulse(cpRotaryLimitJoint *joint) -{ - if(!joint->bias) return; // early exit - - CONSTRAINT_BEGIN(joint, a, b); - - // compute relative rotational velocity - cpFloat wr = b->w - a->w; - - // compute normal impulse - cpFloat j = -(joint->bias + wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - if(joint->bias < 0.0f){ - joint->jAcc = cpfclamp(jOld + j, 0.0f, joint->jMax); - } else { - joint->jAcc = cpfclamp(jOld + j, -joint->jMax, 0.0f); - } - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpRotaryLimitJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpRotaryLimitJoint) - -cpRotaryLimitJoint * -cpRotaryLimitJointAlloc(void) -{ - return (cpRotaryLimitJoint *)cpmalloc(sizeof(cpRotaryLimitJoint)); -} - -cpRotaryLimitJoint * -cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->min = min; - joint->max = max; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max) -{ - return (cpConstraint *)cpRotaryLimitJointInit(cpRotaryLimitJointAlloc(), a, b, min, max); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpSimpleMotor.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpSimpleMotor.c deleted file mode 100644 index c4f771e441..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpSimpleMotor.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpSimpleMotor *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); - - // compute max impulse - joint->jMax = J_MAX(joint, dt); - - // apply joint torque - a->w -= joint->jAcc*a->i_inv; - b->w += joint->jAcc*b->i_inv; -} - -static void -applyImpulse(cpSimpleMotor *joint) -{ - CONSTRAINT_BEGIN(joint, a, b); - - // compute relative rotational velocity - cpFloat wr = b->w - a->w + joint->rate; - - // compute normal impulse - cpFloat j = -wr*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp(jOld + j, -joint->jMax, joint->jMax); - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpSimpleMotor *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpSimpleMotor) - -cpSimpleMotor * -cpSimpleMotorAlloc(void) -{ - return (cpSimpleMotor *)cpmalloc(sizeof(cpSimpleMotor)); -} - -cpSimpleMotor * -cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->rate = rate; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate) -{ - return (cpConstraint *)cpSimpleMotorInit(cpSimpleMotorAlloc(), a, b, rate); -} diff --git a/3rdparty/chipmunk-5.3.4/src/constraints/cpSlideJoint.c b/3rdparty/chipmunk-5.3.4/src/constraints/cpSlideJoint.c deleted file mode 100644 index 79c627c7f7..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/constraints/cpSlideJoint.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpSlideJoint *joint, cpFloat dt, cpFloat dt_inv) -{ - CONSTRAINT_BEGIN(joint, a, b); - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - cpFloat dist = cpvlength(delta); - cpFloat pdist = 0.0f; - if(dist > joint->max) { - pdist = dist - joint->max; - } else if(dist < joint->min) { - pdist = joint->min - dist; - dist = -dist; - } - joint->n = cpvmult(delta, 1.0f/(dist ? dist : (cpFloat)INFINITY)); - - // calculate mass normal - joint->nMass = 1.0f/k_scalar(a, b, joint->r1, joint->r2, joint->n); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-joint->constraint.biasCoef*dt_inv*(pdist), -maxBias, maxBias); - - // compute max impulse - joint->jnMax = J_MAX(joint, dt); - - // apply accumulated impulse - if(!joint->bias) //{ - // if bias is 0, then the joint is not at a limit. - joint->jnAcc = 0.0f; -// } else { - cpVect j = cpvmult(joint->n, joint->jnAcc); - apply_impulses(a, b, joint->r1, joint->r2, j); -// } -} - -static void -applyImpulse(cpSlideJoint *joint) -{ - if(!joint->bias) return; // early exit - - CONSTRAINT_BEGIN(joint, a, b); - - cpVect n = joint->n; - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute relative velocity - cpVect vr = relative_velocity(a, b, r1, r2); - cpFloat vrn = cpvdot(vr, n); - - // compute normal impulse - cpFloat jn = (joint->bias - vrn)*joint->nMass; - cpFloat jnOld = joint->jnAcc; - joint->jnAcc = cpfclamp(jnOld + jn, -joint->jnMax, 0.0f); - jn = joint->jnAcc - jnOld; - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(n, jn)); -} - -static cpFloat -getImpulse(cpConstraint *joint) -{ - return cpfabs(((cpSlideJoint *)joint)->jnAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepFunction)preStep, - (cpConstraintApplyImpulseFunction)applyImpulse, - (cpConstraintGetImpulseFunction)getImpulse, -}; -CP_DefineClassGetter(cpSlideJoint) - -cpSlideJoint * -cpSlideJointAlloc(void) -{ - return (cpSlideJoint *)cpmalloc(sizeof(cpSlideJoint)); -} - -cpSlideJoint * -cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - joint->min = min; - joint->max = max; - - joint->jnAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max) -{ - return (cpConstraint *)cpSlideJointInit(cpSlideJointAlloc(), a, b, anchr1, anchr2, min, max); -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpArbiter.c b/3rdparty/chipmunk-5.3.4/src/cpArbiter.c deleted file mode 100644 index 9e023a7a96..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpArbiter.c +++ /dev/null @@ -1,280 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "constraints/util.h" - -cpFloat cp_bias_coef = 0.1f; -cpFloat cp_collision_slop = 0.1f; - -cpContact* -cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash) -{ - con->p = p; - con->n = n; - con->dist = dist; - - con->jnAcc = 0.0f; - con->jtAcc = 0.0f; - con->jBias = 0.0f; - - con->hash = hash; - - return con; -} - -cpVect -cpArbiterTotalImpulse(cpArbiter *arb) -{ - cpContact *contacts = arb->contacts; - cpVect sum = cpvzero; - - for(int i=0, count=arb->numContacts; in, con->jnAcc)); - } - - return sum; -} - -cpVect -cpArbiterTotalImpulseWithFriction(cpArbiter *arb) -{ - cpContact *contacts = arb->contacts; - cpVect sum = cpvzero; - - for(int i=0, count=arb->numContacts; in, cpv(con->jnAcc, con->jtAcc))); - } - - return sum; -} - -cpFloat -cpContactsEstimateCrushingImpulse(cpContact *contacts, int numContacts) -{ - cpFloat fsum = 0.0f; - cpVect vsum = cpvzero; - - for(int i=0; in, cpv(con->jnAcc, con->jtAcc)); - - fsum += cpvlength(j); - vsum = cpvadd(vsum, j); - } - - cpFloat vmag = cpvlength(vsum); - return (1.0f - vmag/fsum); -} - -void -cpArbiterIgnore(cpArbiter *arb) -{ - arb->state = cpArbiterStateIgnore ; -} - -cpArbiter* -cpArbiterAlloc(void) -{ - return (cpArbiter *)cpcalloc(1, sizeof(cpArbiter)); -} - -cpArbiter* -cpArbiterInit(cpArbiter *arb, cpShape *a, cpShape *b) -{ - arb->handler = NULL; - arb->swappedColl = cpFalse; - - arb->e = 0.0f; - arb->u = 0.0f; - arb->surface_vr = cpvzero; - - arb->numContacts = 0; - arb->contacts = NULL; - - arb->a = a; - arb->b = b; - - arb->stamp = 0; - arb->state = cpArbiterStateFirstColl; - - return arb; -} - -cpArbiter* -cpArbiterNew(cpShape *a, cpShape *b) -{ - return cpArbiterInit(cpArbiterAlloc(), a, b); -} - -void -cpArbiterDestroy(cpArbiter *arb) -{ -// if(arb->contacts) cpfree(arb->contacts); -} - -void -cpArbiterFree(cpArbiter *arb) -{ - if(arb){ - cpArbiterDestroy(arb); - cpfree(arb); - } -} - -void -cpArbiterUpdate(cpArbiter *arb, cpContact *contacts, int numContacts, cpCollisionHandler *handler, cpShape *a, cpShape *b) -{ - // Arbiters without contact data may exist if a collision function rejected the collision. - if(arb->contacts){ - // Iterate over the possible pairs to look for hash value matches. - for(int i=0; inumContacts; i++){ - cpContact *old = &arb->contacts[i]; - - for(int j=0; jhash == old->hash){ - // Copy the persistant contact information. - new_contact->jnAcc = old->jnAcc; - new_contact->jtAcc = old->jtAcc; - } - } - } - } - - arb->contacts = contacts; - arb->numContacts = numContacts; - - arb->handler = handler; - arb->swappedColl = (a->collision_type != handler->a); - - arb->e = a->e * b->e; - arb->u = a->u * b->u; - arb->surface_vr = cpvsub(a->surface_v, b->surface_v); - - // For collisions between two similar primitive types, the order could have been swapped. - arb->a = a; - arb->b = b; - - // mark it as new if it's been cached - if(arb->state == cpArbiterStateCached) arb->state = cpArbiterStateFirstColl; -} - -void -cpArbiterPreStep(cpArbiter *arb, cpFloat dt_inv) -{ - cpBody *a = arb->a->body; - cpBody *b = arb->b->body; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - - // Calculate the offsets. - con->r1 = cpvsub(con->p, a->p); - con->r2 = cpvsub(con->p, b->p); - - // Calculate the mass normal and mass tangent. - con->nMass = 1.0f/k_scalar(a, b, con->r1, con->r2, con->n); - con->tMass = 1.0f/k_scalar(a, b, con->r1, con->r2, cpvperp(con->n)); - - // Calculate the target bias velocity. - con->bias = -cp_bias_coef*dt_inv*cpfmin(0.0f, con->dist + cp_collision_slop); - con->jBias = 0.0f; - - // Calculate the target bounce velocity. - con->bounce = normal_relative_velocity(a, b, con->r1, con->r2, con->n)*arb->e;//cpvdot(con->n, cpvsub(v2, v1))*e; - } -} - -void -cpArbiterApplyCachedImpulse(cpArbiter *arb) -{ - cpShape *shapea = arb->a; - cpShape *shapeb = arb->b; - - arb->u = shapea->u * shapeb->u; - arb->surface_vr = cpvsub(shapeb->surface_v, shapea->surface_v); - - cpBody *a = shapea->body; - cpBody *b = shapeb->body; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - apply_impulses(a, b, con->r1, con->r2, cpvrotate(con->n, cpv(con->jnAcc, con->jtAcc))); - } -} - -void -cpArbiterApplyImpulse(cpArbiter *arb, cpFloat eCoef) -{ - cpBody *a = arb->a->body; - cpBody *b = arb->b->body; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - cpVect n = con->n; - cpVect r1 = con->r1; - cpVect r2 = con->r2; - - // Calculate the relative bias velocities. - cpVect vb1 = cpvadd(a->v_bias, cpvmult(cpvperp(r1), a->w_bias)); - cpVect vb2 = cpvadd(b->v_bias, cpvmult(cpvperp(r2), b->w_bias)); - cpFloat vbn = cpvdot(cpvsub(vb2, vb1), n); - - // Calculate and clamp the bias impulse. - cpFloat jbn = (con->bias - vbn)*con->nMass; - cpFloat jbnOld = con->jBias; - con->jBias = cpfmax(jbnOld + jbn, 0.0f); - jbn = con->jBias - jbnOld; - - // Apply the bias impulse. - apply_bias_impulses(a, b, r1, r2, cpvmult(n, jbn)); - - // Calculate the relative velocity. - cpVect vr = relative_velocity(a, b, r1, r2); - cpFloat vrn = cpvdot(vr, n); - - // Calculate and clamp the normal impulse. - cpFloat jn = -(con->bounce*eCoef + vrn)*con->nMass; - cpFloat jnOld = con->jnAcc; - con->jnAcc = cpfmax(jnOld + jn, 0.0f); - jn = con->jnAcc - jnOld; - - // Calculate the relative tangent velocity. - cpFloat vrt = cpvdot(cpvadd(vr, arb->surface_vr), cpvperp(n)); - - // Calculate and clamp the friction impulse. - cpFloat jtMax = arb->u*con->jnAcc; - cpFloat jt = -vrt*con->tMass; - cpFloat jtOld = con->jtAcc; - con->jtAcc = cpfclamp(jtOld + jt, -jtMax, jtMax); - jt = con->jtAcc - jtOld; - - // Apply the final impulse. - apply_impulses(a, b, r1, r2, cpvrotate(n, cpv(jn, jt))); - } -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpArray.c b/3rdparty/chipmunk-5.3.4/src/cpArray.c deleted file mode 100644 index 98dbb5e4fd..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpArray.c +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" - - -//#define CP_ARRAY_INCREMENT 10 - -// NOTE: cpArray is rarely used and will probably go away. - -cpArray* -cpArrayAlloc(void) -{ - return (cpArray *)cpcalloc(1, sizeof(cpArray)); -} - -cpArray* -cpArrayInit(cpArray *arr, int size) -{ - arr->num = 0; - - size = (size ? size : 4); - arr->max = size; - arr->arr = (void **)cpmalloc(size*sizeof(void**)); - - return arr; -} - -cpArray* -cpArrayNew(int size) -{ - return cpArrayInit(cpArrayAlloc(), size); -} - -void -cpArrayDestroy(cpArray *arr) -{ - cpfree(arr->arr); - arr->arr = NULL; -} - -void -cpArrayFree(cpArray *arr) -{ - if(arr){ - cpArrayDestroy(arr); - cpfree(arr); - } -} - -void -cpArrayPush(cpArray *arr, void *object) -{ - if(arr->num == arr->max){ - arr->max *= 2; - arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void**)); - } - - arr->arr[arr->num] = object; - arr->num++; -} - -void * -cpArrayPop(cpArray *arr) -{ - arr->num--; - - void *value = arr->arr[arr->num]; - arr->arr[arr->num] = NULL; - - return value; -} - -void -cpArrayDeleteIndex(cpArray *arr, int idx) -{ - arr->num--; - - arr->arr[idx] = arr->arr[arr->num]; - arr->arr[arr->num] = NULL; -} - -void -cpArrayDeleteObj(cpArray *arr, void *obj) -{ - for(int i=0; inum; i++){ - if(arr->arr[i] == obj){ - cpArrayDeleteIndex(arr, i); - return; - } - } -} - -void -cpArrayAppend(cpArray *arr, cpArray *other) -{ - void *tail = &arr->arr[arr->num]; - - arr->num += other->num; - if(arr->num >= arr->max){ - arr->max = arr->num; - arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void**)); - } - - memcpy(tail, other->arr, other->num*sizeof(void**)); -} - -void -cpArrayEach(cpArray *arr, cpArrayIter iterFunc, void *data) -{ - for(int i=0; inum; i++) - iterFunc(arr->arr[i], data); -} - -cpBool -cpArrayContains(cpArray *arr, void *ptr) -{ - for(int i=0; inum; i++) - if(arr->arr[i] == ptr) return cpTrue; - - return cpFalse; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpBB.c b/3rdparty/chipmunk-5.3.4/src/cpBB.c deleted file mode 100644 index 6418e03107..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpBB.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" - -cpVect -cpBBClampVect(const cpBB bb, const cpVect v) -{ - cpFloat x = cpfmin(cpfmax(bb.l, v.x), bb.r); - cpFloat y = cpfmin(cpfmax(bb.b, v.y), bb.t); - return cpv(x, y); -} - -cpVect -cpBBWrapVect(const cpBB bb, const cpVect v) -{ - cpFloat ix = cpfabs(bb.r - bb.l); - cpFloat modx = cpfmod(v.x - bb.l, ix); - cpFloat x = (modx > 0.0f) ? modx : modx + ix; - - cpFloat iy = cpfabs(bb.t - bb.b); - cpFloat mody = cpfmod(v.y - bb.b, iy); - cpFloat y = (mody > 0.0f) ? mody : mody + iy; - - return cpv(x + bb.l, y + bb.b); -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpBody.c b/3rdparty/chipmunk-5.3.4/src/cpBody.c deleted file mode 100644 index a242181125..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpBody.c +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "chipmunk_private.h" - -// initialized in cpInitChipmunk() -cpBody cpStaticBodySingleton; - -cpBody* -cpBodyAlloc(void) -{ - return (cpBody *)cpmalloc(sizeof(cpBody)); -} - -cpBodyVelocityFunc cpBodyUpdateVelocityDefault = cpBodyUpdateVelocity; -cpBodyPositionFunc cpBodyUpdatePositionDefault = cpBodyUpdatePosition; - -cpBody* -cpBodyInit(cpBody *body, cpFloat m, cpFloat i) -{ - body->velocity_func = cpBodyUpdateVelocityDefault; - body->position_func = cpBodyUpdatePositionDefault; - - cpBodySetMass(body, m); - cpBodySetMoment(body, i); - - body->p = cpvzero; - body->v = cpvzero; - body->f = cpvzero; - - cpBodySetAngle(body, 0.0f); - body->w = 0.0f; - body->t = 0.0f; - - body->v_bias = cpvzero; - body->w_bias = 0.0f; - - body->data = NULL; - body->v_limit = (cpFloat)INFINITY; - body->w_limit = (cpFloat)INFINITY; - - body->space = NULL; - body->shapesList = NULL; - - cpComponentNode node = {NULL, NULL, 0, 0.0f}; - body->node = node; - - return body; -} - -cpBody* -cpBodyNew(cpFloat m, cpFloat i) -{ - return cpBodyInit(cpBodyAlloc(), m, i); -} - -cpBody * -cpBodyInitStatic(cpBody *body) -{ - cpBodyInit(body, (cpFloat)INFINITY, (cpFloat)INFINITY); - body->node.idleTime = (cpFloat)INFINITY; - - return body; -} - -cpBody * -cpBodyNewStatic() -{ - return cpBodyInitStatic(cpBodyAlloc()); -} - -void cpBodyDestroy(cpBody *body){} - -void -cpBodyFree(cpBody *body) -{ - if(body){ - cpBodyDestroy(body); - cpfree(body); - } -} - -void -cpBodySetMass(cpBody *body, cpFloat mass) -{ - body->m = mass; - body->m_inv = 1.0f/mass; -} - -void -cpBodySetMoment(cpBody *body, cpFloat moment) -{ - body->i = moment; - body->i_inv = 1.0f/moment; -} - -void -cpBodySetAngle(cpBody *body, cpFloat angle) -{ - body->a = angle;//fmod(a, (cpFloat)M_PI*2.0f); - body->rot = cpvforangle(angle); -} - -void -cpBodySlew(cpBody *body, cpVect pos, cpFloat dt) -{ - cpVect delta = cpvsub(pos, body->p); - body->v = cpvmult(delta, 1.0f/dt); -} - -void -cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - body->v = cpvclamp(cpvadd(cpvmult(body->v, damping), cpvmult(cpvadd(gravity, cpvmult(body->f, body->m_inv)), dt)), body->v_limit); - - cpFloat w_limit = body->w_limit; - body->w = cpfclamp(body->w*damping + body->t*body->i_inv*dt, -w_limit, w_limit); -} - -void -cpBodyUpdatePosition(cpBody *body, cpFloat dt) -{ - body->p = cpvadd(body->p, cpvmult(cpvadd(body->v, body->v_bias), dt)); - cpBodySetAngle(body, body->a + (body->w + body->w_bias)*dt); - - body->v_bias = cpvzero; - body->w_bias = 0.0f; -} - -void -cpBodyResetForces(cpBody *body) -{ - body->f = cpvzero; - body->t = 0.0f; -} - -void -cpBodyApplyForce(cpBody *body, cpVect force, cpVect r) -{ - body->f = cpvadd(body->f, force); - body->t += cpvcross(r, force); -} - -void -cpApplyDampedSpring(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat rlen, cpFloat k, cpFloat dmp, cpFloat dt) -{ - // Calculate the world space anchor coordinates. - cpVect r1 = cpvrotate(anchr1, a->rot); - cpVect r2 = cpvrotate(anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, r2), cpvadd(a->p, r1)); - cpFloat dist = cpvlength(delta); - cpVect n = dist ? cpvmult(delta, 1.0f/dist) : cpvzero; - - cpFloat f_spring = (dist - rlen)*k; - - // Calculate the world relative velocities of the anchor points. - cpVect v1 = cpvadd(a->v, cpvmult(cpvperp(r1), a->w)); - cpVect v2 = cpvadd(b->v, cpvmult(cpvperp(r2), b->w)); - - // Calculate the damping force. - // This really should be in the impulse solver and can produce problems when using large damping values. - cpFloat vrn = cpvdot(cpvsub(v2, v1), n); - cpFloat f_damp = vrn*cpfmin(dmp, 1.0f/(dt*(a->m_inv + b->m_inv))); - - // Apply! - cpVect f = cpvmult(n, f_spring + f_damp); - cpBodyApplyForce(a, f, r1); - cpBodyApplyForce(b, cpvneg(f), r2); -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpCollision.c b/3rdparty/chipmunk-5.3.4/src/cpCollision.c deleted file mode 100644 index 86641aa668..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpCollision.c +++ /dev/null @@ -1,414 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -//#include - -#include "chipmunk_private.h" - -typedef int (*collisionFunc)(const cpShape *, const cpShape *, cpContact *); - -// Add contact points for circle to circle collisions. -// Used by several collision tests. -static int -circle2circleQuery(const cpVect p1, const cpVect p2, const cpFloat r1, const cpFloat r2, cpContact *con) -{ - cpFloat mindist = r1 + r2; - cpVect delta = cpvsub(p2, p1); - cpFloat distsq = cpvlengthsq(delta); - if(distsq >= mindist*mindist) return 0; - - cpFloat dist = cpfsqrt(distsq); - - // Allocate and initialize the contact. - cpContactInit( - con, - cpvadd(p1, cpvmult(delta, 0.5f + (r1 - 0.5f*mindist)/(dist ? dist : INFINITY))), - (dist ? cpvmult(delta, 1.0f/dist) : cpv(1.0f, 0.0f)), - dist - mindist, - 0 - ); - - return 1; -} - -// Collide circle shapes. -static int -circle2circle(const cpShape *shape1, const cpShape *shape2, cpContact *arr) -{ - cpCircleShape *circ1 = (cpCircleShape *)shape1; - cpCircleShape *circ2 = (cpCircleShape *)shape2; - - return circle2circleQuery(circ1->tc, circ2->tc, circ1->r, circ2->r, arr); -} - -// Collide circles to segment shapes. -static int -circle2segment(const cpShape *circleShape, const cpShape *segmentShape, cpContact *con) -{ - cpCircleShape *circ = (cpCircleShape *)circleShape; - cpSegmentShape *seg = (cpSegmentShape *)segmentShape; - - // Radius sum - cpFloat rsum = circ->r + seg->r; - - // Calculate normal distance from segment. - cpFloat dn = cpvdot(seg->tn, circ->tc) - cpvdot(seg->ta, seg->tn); - cpFloat dist = cpfabs(dn) - rsum; - if(dist > 0.0f) return 0; - - // Calculate tangential distance along segment. - cpFloat dt = -cpvcross(seg->tn, circ->tc); - cpFloat dtMin = -cpvcross(seg->tn, seg->ta); - cpFloat dtMax = -cpvcross(seg->tn, seg->tb); - - // Decision tree to decide which feature of the segment to collide with. - if(dt < dtMin){ - if(dt < (dtMin - rsum)){ - return 0; - } else { - return circle2circleQuery(circ->tc, seg->ta, circ->r, seg->r, con); - } - } else { - if(dt < dtMax){ - cpVect n = (dn < 0.0f) ? seg->tn : cpvneg(seg->tn); - cpContactInit( - con, - cpvadd(circ->tc, cpvmult(n, circ->r + dist*0.5f)), - n, - dist, - 0 - ); - return 1; - } else { - if(dt < (dtMax + rsum)) { - return circle2circleQuery(circ->tc, seg->tb, circ->r, seg->r, con); - } else { - return 0; - } - } - } - - return 1; -} - -// Helper function for working with contact buffers -// This used to malloc/realloc memory on the fly but was repurposed. -static cpContact * -nextContactPoint(cpContact *arr, int *numPtr) -{ - int index = *numPtr; - - if(index < CP_MAX_CONTACTS_PER_ARBITER){ - (*numPtr) = index + 1; - return &arr[index]; - } else { - return &arr[CP_MAX_CONTACTS_PER_ARBITER - 1]; - } -} - -// Find the minimum separating axis for the give poly and axis list. -static inline int -findMSA(const cpPolyShape *poly, const cpPolyShapeAxis *axes, const int num, cpFloat *min_out) -{ - int min_index = 0; - cpFloat min = cpPolyShapeValueOnAxis(poly, axes->n, axes->d); - if(min > 0.0f) return -1; - - for(int i=1; i 0.0f) { - return -1; - } else if(dist > min){ - min = dist; - min_index = i; - } - } - - (*min_out) = min; - return min_index; -} - -// Add contacts for probably penetrating vertexes. -// This handles the degenerate case where an overlap was detected, but no vertexes fall inside -// the opposing polygon. (like a star of david) -static inline int -findVertsFallback(cpContact *arr, const cpPolyShape *poly1, const cpPolyShape *poly2, const cpVect n, const cpFloat dist) -{ - int num = 0; - - for(int i=0; inumVerts; i++){ - cpVect v = poly1->tVerts[i]; - if(cpPolyShapeContainsVertPartial(poly2, v, cpvneg(n))) - cpContactInit(nextContactPoint(arr, &num), v, n, dist, CP_HASH_PAIR(poly1->shape.hashid, i)); - } - - for(int i=0; inumVerts; i++){ - cpVect v = poly2->tVerts[i]; - if(cpPolyShapeContainsVertPartial(poly1, v, n)) - cpContactInit(nextContactPoint(arr, &num), v, n, dist, CP_HASH_PAIR(poly2->shape.hashid, i)); - } - - return num; -} - -// Add contacts for penetrating vertexes. -static inline int -findVerts(cpContact *arr, const cpPolyShape *poly1, const cpPolyShape *poly2, const cpVect n, const cpFloat dist) -{ - int num = 0; - - for(int i=0; inumVerts; i++){ - cpVect v = poly1->tVerts[i]; - if(cpPolyShapeContainsVert(poly2, v)) - cpContactInit(nextContactPoint(arr, &num), v, n, dist, CP_HASH_PAIR(poly1->shape.hashid, i)); - } - - for(int i=0; inumVerts; i++){ - cpVect v = poly2->tVerts[i]; - if(cpPolyShapeContainsVert(poly1, v)) - cpContactInit(nextContactPoint(arr, &num), v, n, dist, CP_HASH_PAIR(poly2->shape.hashid, i)); - } - - return (num ? num : findVertsFallback(arr, poly1, poly2, n, dist)); -} - -// Collide poly shapes together. -static int -poly2poly(const cpShape *shape1, const cpShape *shape2, cpContact *arr) -{ - cpPolyShape *poly1 = (cpPolyShape *)shape1; - cpPolyShape *poly2 = (cpPolyShape *)shape2; - - cpFloat min1; - int mini1 = findMSA(poly2, poly1->tAxes, poly1->numVerts, &min1); - if(mini1 == -1) return 0; - - cpFloat min2; - int mini2 = findMSA(poly1, poly2->tAxes, poly2->numVerts, &min2); - if(mini2 == -1) return 0; - - // There is overlap, find the penetrating verts - if(min1 > min2) - return findVerts(arr, poly1, poly2, poly1->tAxes[mini1].n, min1); - else - return findVerts(arr, poly1, poly2, cpvneg(poly2->tAxes[mini2].n), min2); -} - -// Like cpPolyValueOnAxis(), but for segments. -static inline cpFloat -segValueOnAxis(const cpSegmentShape *seg, const cpVect n, const cpFloat d) -{ - cpFloat a = cpvdot(n, seg->ta) - seg->r; - cpFloat b = cpvdot(n, seg->tb) - seg->r; - return cpfmin(a, b) - d; -} - -// Identify vertexes that have penetrated the segment. -static inline void -findPointsBehindSeg(cpContact *arr, int *num, const cpSegmentShape *seg, const cpPolyShape *poly, const cpFloat pDist, const cpFloat coef) -{ - cpFloat dta = cpvcross(seg->tn, seg->ta); - cpFloat dtb = cpvcross(seg->tn, seg->tb); - cpVect n = cpvmult(seg->tn, coef); - - for(int i=0; inumVerts; i++){ - cpVect v = poly->tVerts[i]; - if(cpvdot(v, n) < cpvdot(seg->tn, seg->ta)*coef + seg->r){ - cpFloat dt = cpvcross(seg->tn, v); - if(dta >= dt && dt >= dtb){ - cpContactInit(nextContactPoint(arr, num), v, n, pDist, CP_HASH_PAIR(poly->shape.hashid, i)); - } - } - } -} - -// This one is complicated and gross. Just don't go there... -// TODO: Comment me! -static int -seg2poly(const cpShape *shape1, const cpShape *shape2, cpContact *arr) -{ - cpSegmentShape *seg = (cpSegmentShape *)shape1; - cpPolyShape *poly = (cpPolyShape *)shape2; - cpPolyShapeAxis *axes = poly->tAxes; - - cpFloat segD = cpvdot(seg->tn, seg->ta); - cpFloat minNorm = cpPolyShapeValueOnAxis(poly, seg->tn, segD) - seg->r; - cpFloat minNeg = cpPolyShapeValueOnAxis(poly, cpvneg(seg->tn), -segD) - seg->r; - if(minNeg > 0.0f || minNorm > 0.0f) return 0; - - int mini = 0; - cpFloat poly_min = segValueOnAxis(seg, axes->n, axes->d); - if(poly_min > 0.0f) return 0; - for(int i=0; inumVerts; i++){ - cpFloat dist = segValueOnAxis(seg, axes[i].n, axes[i].d); - if(dist > 0.0f){ - return 0; - } else if(dist > poly_min){ - poly_min = dist; - mini = i; - } - } - - int num = 0; - - cpVect poly_n = cpvneg(axes[mini].n); - - cpVect va = cpvadd(seg->ta, cpvmult(poly_n, seg->r)); - cpVect vb = cpvadd(seg->tb, cpvmult(poly_n, seg->r)); - if(cpPolyShapeContainsVert(poly, va)) - cpContactInit(nextContactPoint(arr, &num), va, poly_n, poly_min, CP_HASH_PAIR(seg->shape.hashid, 0)); - if(cpPolyShapeContainsVert(poly, vb)) - cpContactInit(nextContactPoint(arr, &num), vb, poly_n, poly_min, CP_HASH_PAIR(seg->shape.hashid, 1)); - - // Floating point precision problems here. - // This will have to do for now. - poly_min -= cp_collision_slop; - if(minNorm >= poly_min || minNeg >= poly_min) { - if(minNorm > minNeg) - findPointsBehindSeg(arr, &num, seg, poly, minNorm, 1.0f); - else - findPointsBehindSeg(arr, &num, seg, poly, minNeg, -1.0f); - } - - // If no other collision points are found, try colliding endpoints. - if(num == 0){ - cpVect poly_a = poly->tVerts[mini]; - cpVect poly_b = poly->tVerts[(mini + 1)%poly->numVerts]; - - if(circle2circleQuery(seg->ta, poly_a, seg->r, 0.0f, arr)) - return 1; - - if(circle2circleQuery(seg->tb, poly_a, seg->r, 0.0f, arr)) - return 1; - - if(circle2circleQuery(seg->ta, poly_b, seg->r, 0.0f, arr)) - return 1; - - if(circle2circleQuery(seg->tb, poly_b, seg->r, 0.0f, arr)) - return 1; - } - - return num; -} - -// This one is less gross, but still gross. -// TODO: Comment me! -static int -circle2poly(const cpShape *shape1, const cpShape *shape2, cpContact *con) -{ - cpCircleShape *circ = (cpCircleShape *)shape1; - cpPolyShape *poly = (cpPolyShape *)shape2; - cpPolyShapeAxis *axes = poly->tAxes; - - int mini = 0; - cpFloat min = cpvdot(axes->n, circ->tc) - axes->d - circ->r; - for(int i=0; inumVerts; i++){ - cpFloat dist = cpvdot(axes[i].n, circ->tc) - axes[i].d - circ->r; - if(dist > 0.0f){ - return 0; - } else if(dist > min) { - min = dist; - mini = i; - } - } - - cpVect n = axes[mini].n; - cpVect a = poly->tVerts[mini]; - cpVect b = poly->tVerts[(mini + 1)%poly->numVerts]; - cpFloat dta = cpvcross(n, a); - cpFloat dtb = cpvcross(n, b); - cpFloat dt = cpvcross(n, circ->tc); - - if(dt < dtb){ - return circle2circleQuery(circ->tc, b, circ->r, 0.0f, con); - } else if(dt < dta) { - cpContactInit( - con, - cpvsub(circ->tc, cpvmult(n, circ->r + min/2.0f)), - cpvneg(n), - min, - 0 - ); - - return 1; - } else { - return circle2circleQuery(circ->tc, a, circ->r, 0.0f, con); - } -} - -//static const collisionFunc builtinCollisionFuncs[9] = { -// circle2circle, -// NULL, -// NULL, -// circle2segment, -// NULL, -// NULL, -// circle2poly, -// seg2poly, -// poly2poly, -//}; -//static const collisionFunc *colfuncs = builtinCollisionFuncs; - -// changed for Moai - prevent memory leak warning at shutdown -//static collisionFunc *colfuncs = NULL; -static collisionFunc colfuncs[CP_NUM_SHAPES*CP_NUM_SHAPES]; - -static void -addColFunc(const cpShapeType a, const cpShapeType b, const collisionFunc func) -{ - colfuncs[a + b*CP_NUM_SHAPES] = func; -} - -#ifdef __cplusplus -extern "C" { -#endif - void cpInitCollisionFuncs(void); - - // Initializes the array of collision functions. - // Called by cpInitChipmunk(). - void - cpInitCollisionFuncs(void) - { - // changed for Moai - //if(!colfuncs) - // colfuncs = (collisionFunc *)cpcalloc(CP_NUM_SHAPES*CP_NUM_SHAPES, sizeof(collisionFunc)); - - addColFunc(CP_CIRCLE_SHAPE, CP_CIRCLE_SHAPE, circle2circle); - addColFunc(CP_CIRCLE_SHAPE, CP_SEGMENT_SHAPE, circle2segment); - addColFunc(CP_SEGMENT_SHAPE, CP_POLY_SHAPE, seg2poly); - addColFunc(CP_CIRCLE_SHAPE, CP_POLY_SHAPE, circle2poly); - addColFunc(CP_POLY_SHAPE, CP_POLY_SHAPE, poly2poly); - } -#ifdef __cplusplus -} -#endif - -int -cpCollideShapes(const cpShape *a, const cpShape *b, cpContact *arr) -{ - // Their shape types must be in order. - cpAssert(a->klass->type <= b->klass->type, "Collision shapes passed to cpCollideShapes() are not sorted."); - - collisionFunc cfunc = colfuncs[a->klass->type + b->klass->type*CP_NUM_SHAPES]; - return (cfunc) ? cfunc(a, b, arr) : 0; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpHashSet.c b/3rdparty/chipmunk-5.3.4/src/cpHashSet.c deleted file mode 100644 index c7f3cba605..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpHashSet.c +++ /dev/null @@ -1,253 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "prime.h" - -static void freeWrap(void *ptr, void *unused){cpfree(ptr);} - -void -cpHashSetDestroy(cpHashSet *set) -{ - // Free the table. - cpfree(set->table); - - cpArrayEach(set->allocatedBuffers, freeWrap, NULL); - cpArrayFree(set->allocatedBuffers); -} - -void -cpHashSetFree(cpHashSet *set) -{ - if(set){ - cpHashSetDestroy(set); - cpfree(set); - } -} - -cpHashSet * -cpHashSetAlloc(void) -{ - return (cpHashSet *)cpcalloc(1, sizeof(cpHashSet)); -} - -cpHashSet * -cpHashSetInit(cpHashSet *set, int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans) -{ - set->size = next_prime(size); - set->entries = 0; - - set->eql = eqlFunc; - set->trans = trans; - - set->default_value = NULL; - - set->table = (cpHashSetBin **)cpcalloc(set->size, sizeof(cpHashSetBin *)); - set->pooledBins = NULL; - - set->allocatedBuffers = cpArrayNew(0); - - return set; -} - -cpHashSet * -cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc, cpHashSetTransFunc trans) -{ - return cpHashSetInit(cpHashSetAlloc(), size, eqlFunc, trans); -} - -static int -setIsFull(cpHashSet *set) -{ - return (set->entries >= set->size); -} - -static void -cpHashSetResize(cpHashSet *set) -{ - // Get the next approximate doubled prime. - int newSize = next_prime(set->size + 1); - // Allocate a new table. - cpHashSetBin **newTable = (cpHashSetBin **)cpcalloc(newSize, sizeof(cpHashSetBin *)); - - // Iterate over the chains. - for(int i=0; isize; i++){ - // Rehash the bins into the new table. - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - - int idx = bin->hash%newSize; - bin->next = newTable[idx]; - newTable[idx] = bin; - - bin = next; - } - } - - cpfree(set->table); - - set->table = newTable; - set->size = newSize; -} - -static inline void -recycleBin(cpHashSet *set, cpHashSetBin *bin) -{ - bin->next = set->pooledBins; - set->pooledBins = bin; - bin->elt = NULL; -} - -static cpHashSetBin * -getUnusedBin(cpHashSet *set) -{ - cpHashSetBin *bin = set->pooledBins; - - if(bin){ - set->pooledBins = bin->next; - return bin; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpHashSetBin); - cpAssert(count, "Buffer size is too small."); - - cpHashSetBin *buffer = (cpHashSetBin *)cpmalloc(CP_BUFFER_BYTES); - cpArrayPush(set->allocatedBuffers, buffer); - - // push all but the first one, return the first instead - for(int i=1; isize; - - // Find the bin with the matching element. - cpHashSetBin *bin = set->table[idx]; - while(bin && !set->eql(ptr, bin->elt)) - bin = bin->next; - - // Create it necessary. - if(!bin){ - bin = getUnusedBin(set); - bin->hash = hash; - bin->elt = set->trans(ptr, data); // Transform the pointer. - - bin->next = set->table[idx]; - set->table[idx] = bin; - - set->entries++; - - // Resize the set if it's full. - if(setIsFull(set)) - cpHashSetResize(set); - } - - return bin->elt; -} - -void * -cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr) -{ - int idx = hash%set->size; - - // Pointer to the previous bin pointer. - cpHashSetBin **prev_ptr = &set->table[idx]; - // Pointer the the current bin. - cpHashSetBin *bin = set->table[idx]; - - // Find the bin - while(bin && !set->eql(ptr, bin->elt)){ - prev_ptr = &bin->next; - bin = bin->next; - } - - // Remove it if it exists. - if(bin){ - // Update the previous bin pointer to point to the next bin. - (*prev_ptr) = bin->next; - set->entries--; - - void *return_value = bin->elt; - - recycleBin(set, bin); - - return return_value; - } - - return NULL; -} - -void * -cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr) -{ - int idx = hash%set->size; - cpHashSetBin *bin = set->table[idx]; - while(bin && !set->eql(ptr, bin->elt)) - bin = bin->next; - - return (bin ? bin->elt : set->default_value); -} - -void -cpHashSetEach(cpHashSet *set, cpHashSetIterFunc func, void *data) -{ - for(int i=0; isize; i++){ - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - func(bin->elt, data); - bin = next; - } - } -} - -void -cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data) -{ - // Iterate over all the chains. - for(int i=0; isize; i++){ - // The rest works similarly to cpHashSetRemove() above. - cpHashSetBin **prev_ptr = &set->table[i]; - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - - if(func(bin->elt, data)){ - prev_ptr = &bin->next; - } else { - (*prev_ptr) = next; - - set->entries--; - recycleBin(set, bin); - } - - bin = next; - } - } -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpPolyShape.c b/3rdparty/chipmunk-5.3.4/src/cpPolyShape.c deleted file mode 100644 index aa9ea245e6..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpPolyShape.c +++ /dev/null @@ -1,240 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" -#include "chipmunk_unsafe.h" - -cpPolyShape * -cpPolyShapeAlloc(void) -{ - return (cpPolyShape *)cpcalloc(1, sizeof(cpPolyShape)); -} - -static void -cpPolyShapeTransformVerts(cpPolyShape *poly, cpVect p, cpVect rot) -{ - cpVect *src = poly->verts; - cpVect *dst = poly->tVerts; - - for(int i=0; inumVerts; i++) - dst[i] = cpvadd(p, cpvrotate(src[i], rot)); -} - -static void -cpPolyShapeTransformAxes(cpPolyShape *poly, cpVect p, cpVect rot) -{ - cpPolyShapeAxis *src = poly->axes; - cpPolyShapeAxis *dst = poly->tAxes; - - for(int i=0; inumVerts; i++){ - cpVect n = cpvrotate(src[i].n, rot); - dst[i].n = n; - dst[i].d = cpvdot(p, n) + src[i].d; - } -} - -static cpBB -cpPolyShapeCacheData(cpShape *shape, cpVect p, cpVect rot) -{ - cpPolyShape *poly = (cpPolyShape *)shape; - - cpFloat l, b, r, t; - - cpPolyShapeTransformAxes(poly, p, rot); - cpPolyShapeTransformVerts(poly, p, rot); - - cpVect *verts = poly->tVerts; - l = r = verts[0].x; - b = t = verts[0].y; - - // TODO do as part of cpPolyShapeTransformVerts? - for(int i=1; inumVerts; i++){ - cpVect v = verts[i]; - - l = cpfmin(l, v.x); - r = cpfmax(r, v.x); - - b = cpfmin(b, v.y); - t = cpfmax(t, v.y); - } - - return cpBBNew(l, b, r, t); -} - -static void -cpPolyShapeDestroy(cpShape *shape) -{ - cpPolyShape *poly = (cpPolyShape *)shape; - - cpfree(poly->verts); - cpfree(poly->tVerts); - - cpfree(poly->axes); - cpfree(poly->tAxes); -} - -static cpBool -cpPolyShapePointQuery(cpShape *shape, cpVect p){ - return cpBBcontainsVect(shape->bb, p) && cpPolyShapeContainsVert((cpPolyShape *)shape, p); -} - -static void -cpPolyShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - cpPolyShape *poly = (cpPolyShape *)shape; - cpPolyShapeAxis *axes = poly->tAxes; - cpVect *verts = poly->tVerts; - int numVerts = poly->numVerts; - - for(int i=0; i an) continue; - - cpFloat bn = cpvdot(b, n); - cpFloat t = (axes[i].d - an)/(bn - an); - if(t < 0.0f || 1.0f < t) continue; - - cpVect point = cpvlerp(a, b, t); - cpFloat dt = -cpvcross(n, point); - cpFloat dtMin = -cpvcross(n, verts[i]); - cpFloat dtMax = -cpvcross(n, verts[(i+1)%numVerts]); - - if(dtMin <= dt && dt <= dtMax){ - info->shape = shape; - info->t = t; - info->n = n; - } - } -} - -static const cpShapeClass polyClass = { - CP_POLY_SHAPE, - cpPolyShapeCacheData, - cpPolyShapeDestroy, - cpPolyShapePointQuery, - cpPolyShapeSegmentQuery, -}; - -cpBool -cpPolyValidate(const cpVect *verts, const int numVerts) -{ - for(int i=0; i 0.0f) - return cpFalse; - } - - return cpTrue; -} - -int -cpPolyShapeGetNumVerts(cpShape *shape) -{ - cpAssert(shape->klass == &polyClass, "Shape is not a poly shape."); - return ((cpPolyShape *)shape)->numVerts; -} - -cpVect -cpPolyShapeGetVert(cpShape *shape, int idx) -{ - cpAssert(shape->klass == &polyClass, "Shape is not a poly shape."); - cpAssert(0 <= idx && idx < cpPolyShapeGetNumVerts(shape), "Index out of range."); - - return ((cpPolyShape *)shape)->verts[idx]; -} - - -static void -setUpVerts(cpPolyShape *poly, int numVerts, cpVect *verts, cpVect offset) -{ - poly->numVerts = numVerts; - - poly->verts = (cpVect *)cpcalloc(numVerts, sizeof(cpVect)); - poly->tVerts = (cpVect *)cpcalloc(numVerts, sizeof(cpVect)); - poly->axes = (cpPolyShapeAxis *)cpcalloc(numVerts, sizeof(cpPolyShapeAxis)); - poly->tAxes = (cpPolyShapeAxis *)cpcalloc(numVerts, sizeof(cpPolyShapeAxis)); - - for(int i=0; iverts[i] = a; - poly->axes[i].n = n; - poly->axes[i].d = cpvdot(n, a); - } -} - -cpPolyShape * -cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset) -{ - // Fail if the user attempts to pass a concave poly, or a bad winding. - cpAssert(cpPolyValidate(verts, numVerts), "Polygon is concave or has a reversed winding."); - - setUpVerts(poly, numVerts, verts, offset); - cpShapeInit((cpShape *)poly, &polyClass, body); - - return poly; -} - -cpShape * -cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset) -{ - return (cpShape *)cpPolyShapeInit(cpPolyShapeAlloc(), body, numVerts, verts, offset); -} - -cpPolyShape * -cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height) -{ - cpFloat hw = width/2.0f; - cpFloat hh = height/2.0f; - - cpVect verts[] = { - cpv(-hw,-hh), - cpv(-hw, hh), - cpv( hw, hh), - cpv( hw,-hh), - }; - - return cpPolyShapeInit(poly, body, 4, verts, cpvzero); -} - -cpShape * -cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height) -{ - return (cpShape *)cpBoxShapeInit(cpPolyShapeAlloc(), body, width, height); -} - -// Unsafe API (chipmunk_unsafe.h) - -void -cpPolyShapeSetVerts(cpShape *shape, int numVerts, cpVect *verts, cpVect offset) -{ - cpAssert(shape->klass == &polyClass, "Shape is not a poly shape."); - cpPolyShapeDestroy(shape); - setUpVerts((cpPolyShape *)shape, numVerts, verts, offset); -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpShape.c b/3rdparty/chipmunk-5.3.4/src/cpShape.c deleted file mode 100644 index a190891920..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpShape.c +++ /dev/null @@ -1,403 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -#include "chipmunk_private.h" -#include "chipmunk_unsafe.h" - -#define CP_DefineShapeGetter(struct, type, member, name) \ -CP_DeclareShapeGetter(struct, type, name){ \ - cpAssert(shape->klass == &struct##Class, "shape is not a "#struct); \ - return ((struct *)shape)->member; \ -} -cpHashValue SHAPE_ID_COUNTER = 0; - -void -cpResetShapeIdCounter(void) -{ - SHAPE_ID_COUNTER = 0; -} - - -cpShape* -cpShapeInit(cpShape *shape, const cpShapeClass *klass, cpBody *body) -{ - shape->klass = klass; - - shape->hashid = SHAPE_ID_COUNTER; - SHAPE_ID_COUNTER++; - - shape->body = body; - shape->sensor = 0; - - shape->e = 0.0f; - shape->u = 0.0f; - shape->surface_v = cpvzero; - - shape->collision_type = 0; - shape->group = CP_NO_GROUP; - shape->layers = CP_ALL_LAYERS; - - shape->data = NULL; - shape->next = NULL; - -// cpShapeCacheBB(shape); - - return shape; -} - -void -cpShapeDestroy(cpShape *shape) -{ - if(shape->klass->destroy) shape->klass->destroy(shape); -} - -void -cpShapeFree(cpShape *shape) -{ - if(shape){ - cpShapeDestroy(shape); - cpfree(shape); - } -} - -// TODO this function should really take a position and rotation explicitly and be renamed -cpBB -cpShapeCacheBB(cpShape *shape) -{ - cpBody *body = shape->body; - - shape->bb = shape->klass->cacheData(shape, body->p, body->rot); - return shape->bb; -} - -cpBool -cpShapePointQuery(cpShape *shape, cpVect p){ - return shape->klass->pointQuery(shape, p); -} - -cpBool -cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info){ - cpSegmentQueryInfo blank = {NULL, 0.0f, cpvzero}; - (*info) = blank; - - shape->klass->segmentQuery(shape, a, b, info); - return (info->shape != NULL); -} - -void -cpSegmentQueryInfoPrint(cpSegmentQueryInfo *info) -{ - printf("Segment Query:\n"); - printf("\tt: %f\n", info->t); -// printf("\tdist: %f\n", info->dist); -// printf("\tpoint: %s\n", cpvstr(info->point)); - printf("\tn: %s\n", cpvstr(info->n)); -} - - - - -cpCircleShape * -cpCircleShapeAlloc(void) -{ - return (cpCircleShape *)cpcalloc(1, sizeof(cpCircleShape)); -} - -static inline cpBB -bbFromCircle(const cpVect c, const cpFloat r) -{ - return cpBBNew(c.x-r, c.y-r, c.x+r, c.y+r); -} - -static cpBB -cpCircleShapeCacheData(cpShape *shape, cpVect p, cpVect rot) -{ - cpCircleShape *circle = (cpCircleShape *)shape; - - circle->tc = cpvadd(p, cpvrotate(circle->c, rot)); - return bbFromCircle(circle->tc, circle->r); -} - -static cpBool -cpCircleShapePointQuery(cpShape *shape, cpVect p){ - cpCircleShape *circle = (cpCircleShape *)shape; - return cpvnear(circle->tc, p, circle->r); -} - -static void -circleSegmentQuery(cpShape *shape, cpVect center, cpFloat r, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - // offset the line to be relative to the circle - a = cpvsub(a, center); - b = cpvsub(b, center); - - cpFloat qa = cpvdot(a, a) - 2.0f*cpvdot(a, b) + cpvdot(b, b); - cpFloat qb = -2.0f*cpvdot(a, a) + 2.0f*cpvdot(a, b); - cpFloat qc = cpvdot(a, a) - r*r; - - cpFloat det = qb*qb - 4.0f*qa*qc; - - if(det >= 0.0f){ - cpFloat t = (-qb - cpfsqrt(det))/(2.0f*qa); - if(0.0f<= t && t <= 1.0f){ - info->shape = shape; - info->t = t; - info->n = cpvnormalize(cpvlerp(a, b, t)); - } - } -} - -static void -cpCircleShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - cpCircleShape *circle = (cpCircleShape *)shape; - circleSegmentQuery(shape, circle->tc, circle->r, a, b, info); -} - -static const cpShapeClass cpCircleShapeClass = { - CP_CIRCLE_SHAPE, - cpCircleShapeCacheData, - NULL, - cpCircleShapePointQuery, - cpCircleShapeSegmentQuery, -}; - -cpCircleShape * -cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset) -{ - circle->c = offset; - circle->r = radius; - - cpShapeInit((cpShape *)circle, &cpCircleShapeClass, body); - - return circle; -} - -cpShape * -cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset) -{ - return (cpShape *)cpCircleShapeInit(cpCircleShapeAlloc(), body, radius, offset); -} - -CP_DefineShapeGetter(cpCircleShape, cpVect, c, Offset) -CP_DefineShapeGetter(cpCircleShape, cpFloat, r, Radius) - -cpSegmentShape * -cpSegmentShapeAlloc(void) -{ - return (cpSegmentShape *)cpcalloc(1, sizeof(cpSegmentShape)); -} - -static cpBB -cpSegmentShapeCacheData(cpShape *shape, cpVect p, cpVect rot) -{ - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->ta = cpvadd(p, cpvrotate(seg->a, rot)); - seg->tb = cpvadd(p, cpvrotate(seg->b, rot)); - seg->tn = cpvrotate(seg->n, rot); - - cpFloat l,r,s,t; - - if(seg->ta.x < seg->tb.x){ - l = seg->ta.x; - r = seg->tb.x; - } else { - l = seg->tb.x; - r = seg->ta.x; - } - - if(seg->ta.y < seg->tb.y){ - s = seg->ta.y; - t = seg->tb.y; - } else { - s = seg->tb.y; - t = seg->ta.y; - } - - cpFloat rad = seg->r; - return cpBBNew(l - rad, s - rad, r + rad, t + rad); -} - -static cpBool -cpSegmentShapePointQuery(cpShape *shape, cpVect p){ - if(!cpBBcontainsVect(shape->bb, p)) return cpFalse; - - cpSegmentShape *seg = (cpSegmentShape *)shape; - - // Calculate normal distance from segment. - cpFloat dn = cpvdot(seg->tn, p) - cpvdot(seg->ta, seg->tn); - cpFloat dist = cpfabs(dn) - seg->r; - if(dist > 0.0f) return cpFalse; - - // Calculate tangential distance along segment. - cpFloat dt = -cpvcross(seg->tn, p); - cpFloat dtMin = -cpvcross(seg->tn, seg->ta); - cpFloat dtMax = -cpvcross(seg->tn, seg->tb); - - // Decision tree to decide which feature of the segment to collide with. - if(dt <= dtMin){ - if(dt < (dtMin - seg->r)){ - return cpFalse; - } else { - return cpvlengthsq(cpvsub(seg->ta, p)) < (seg->r*seg->r); - } - } else { - if(dt < dtMax){ - return cpTrue; - } else { - if(dt < (dtMax + seg->r)) { - return cpvlengthsq(cpvsub(seg->tb, p)) < (seg->r*seg->r); - } else { - return cpFalse; - } - } - } - - return cpTrue; -} - -static inline cpBool inUnitRange(cpFloat t){return (0.0f < t && t < 1.0f);} - -static void -cpSegmentShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - // TODO this function could be optimized better. - - cpSegmentShape *seg = (cpSegmentShape *)shape; - cpVect n = seg->tn; - // flip n if a is behind the axis - if(cpvdot(a, n) < cpvdot(seg->ta, n)) - n = cpvneg(n); - - cpFloat an = cpvdot(a, n); - cpFloat bn = cpvdot(b, n); - - if(an != bn){ - cpFloat d = cpvdot(seg->ta, n) + seg->r; - cpFloat t = (d - an)/(bn - an); - - if(0.0f < t && t < 1.0f){ - cpVect point = cpvlerp(a, b, t); - cpFloat dt = -cpvcross(seg->tn, point); - cpFloat dtMin = -cpvcross(seg->tn, seg->ta); - cpFloat dtMax = -cpvcross(seg->tn, seg->tb); - - if(dtMin < dt && dt < dtMax){ - info->shape = shape; - info->t = t; - info->n = n; - - return; // don't continue on and check endcaps - } - } - } - - if(seg->r) { - cpSegmentQueryInfo info1 = {NULL, 1.0f, cpvzero}; - cpSegmentQueryInfo info2 = {NULL, 1.0f, cpvzero}; - circleSegmentQuery(shape, seg->ta, seg->r, a, b, &info1); - circleSegmentQuery(shape, seg->tb, seg->r, a, b, &info2); - - if(info1.t < info2.t){ - (*info) = info1; - } else { - (*info) = info2; - } - } -} - -static const cpShapeClass cpSegmentShapeClass = { - CP_SEGMENT_SHAPE, - cpSegmentShapeCacheData, - NULL, - cpSegmentShapePointQuery, - cpSegmentShapeSegmentQuery, -}; - -cpSegmentShape * -cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat r) -{ - seg->a = a; - seg->b = b; - seg->n = cpvperp(cpvnormalize(cpvsub(b, a))); - - seg->r = r; - - cpShapeInit((cpShape *)seg, &cpSegmentShapeClass, body); - - return seg; -} - -cpShape* -cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat r) -{ - return (cpShape *)cpSegmentShapeInit(cpSegmentShapeAlloc(), body, a, b, r); -} - -CP_DefineShapeGetter(cpSegmentShape, cpVect, a, A) -CP_DefineShapeGetter(cpSegmentShape, cpVect, b, B) -CP_DefineShapeGetter(cpSegmentShape, cpVect, n, Normal) -CP_DefineShapeGetter(cpSegmentShape, cpFloat, r, Radius) - -// Unsafe API (chipmunk_unsafe.h) - -void -cpCircleShapeSetRadius(cpShape *shape, cpFloat radius) -{ - cpAssert(shape->klass == &cpCircleShapeClass, "Shape is not a circle shape."); - cpCircleShape *circle = (cpCircleShape *)shape; - - circle->r = radius; -} - -void -cpCircleShapeSetOffset(cpShape *shape, cpVect offset) -{ - cpAssert(shape->klass == &cpCircleShapeClass, "Shape is not a circle shape."); - cpCircleShape *circle = (cpCircleShape *)shape; - - circle->c = offset; -} - -void -cpSegmentShapeSetEndpoints(cpShape *shape, cpVect a, cpVect b) -{ - cpAssert(shape->klass == &cpSegmentShapeClass, "Shape is not a segment shape."); - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->a = a; - seg->b = b; - seg->n = cpvperp(cpvnormalize(cpvsub(b, a))); -} - -void -cpSegmentShapeSetRadius(cpShape *shape, cpFloat radius) -{ - cpAssert(shape->klass == &cpSegmentShapeClass, "Shape is not a segment shape."); - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->r = radius; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpSpace.c b/3rdparty/chipmunk-5.3.4/src/cpSpace.c deleted file mode 100644 index 8dc3b60ec4..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpSpace.c +++ /dev/null @@ -1,499 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -//#include -#include -#include - -#include "chipmunk_private.h" - -cpTimestamp cp_contact_persistence = 3; - -#pragma mark Contact Set Helpers - -// Equal function for contactSet. -static cpBool -contactSetEql(cpShape **shapes, cpArbiter *arb) -{ - cpShape *a = shapes[0]; - cpShape *b = shapes[1]; - - return ((a == arb->a && b == arb->b) || (b == arb->a && a == arb->b)); -} - -// Transformation function for contactSet. -static void * -contactSetTrans(cpShape **shapes, cpSpace *space) -{ - if(space->pooledArbiters->num == 0){ - // arbiter pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpArbiter); - cpAssert(count, "Buffer size too small."); - - cpArbiter *buffer = (cpArbiter *)cpmalloc(CP_BUFFER_BYTES); - cpArrayPush(space->allocatedBuffers, buffer); - - for(int i=0; ipooledArbiters, buffer + i); - } - - return cpArbiterInit((cpArbiter *) cpArrayPop(space->pooledArbiters), shapes[0], shapes[1]); -} - -#pragma mark Collision Pair Function Helpers - -// Equals function for collFuncSet. -static cpBool -collFuncSetEql(cpCollisionHandler *check, cpCollisionHandler *pair) -{ - return ((check->a == pair->a && check->b == pair->b) || (check->b == pair->a && check->a == pair->b)); -} - -// Transformation function for collFuncSet. -static void * -collFuncSetTrans(cpCollisionHandler *handler, void *unused) -{ - cpCollisionHandler *copy = (cpCollisionHandler *)cpmalloc(sizeof(cpCollisionHandler)); - (*copy) = (*handler); - - return copy; -} - -#pragma mark Misc Helper Funcs - -// Default collision functions. -static cpBool alwaysCollide(cpArbiter *arb, cpSpace *space, void *data){return 1;} -static void nothing(cpArbiter *arb, cpSpace *space, void *data){} - -// BBfunc callback for the spatial hash. -static cpBB shapeBBFunc(cpShape *shape){return shape->bb;} - -// Iterator functions for destructors. -static void freeWrap(void *ptr, void *unused){ cpfree(ptr);} -static void shapeFreeWrap(cpShape *ptr, void *unused){ cpShapeFree(ptr);} -static void bodyFreeWrap(cpBody *ptr, void *unused){ cpBodyFree(ptr);} -static void constraintFreeWrap(cpConstraint *ptr, void *unused){cpConstraintFree(ptr);} - -#pragma mark Memory Management Functions - -cpSpace * -cpSpaceAlloc(void) -{ - return (cpSpace *)cpcalloc(1, sizeof(cpSpace)); -} - -#define DEFAULT_DIM_SIZE 100.0f -#define DEFAULT_COUNT 1000 -#define DEFAULT_ITERATIONS 10 -#define DEFAULT_ELASTIC_ITERATIONS 0 - -cpCollisionHandler defaultHandler = {0, 0, alwaysCollide, alwaysCollide, nothing, nothing, NULL}; - -cpSpace* -cpSpaceInit(cpSpace *space) -{ - space->iterations = DEFAULT_ITERATIONS; - space->elasticIterations = DEFAULT_ELASTIC_ITERATIONS; -// space->sleepTicks = 300; - - space->gravity = cpvzero; - space->damping = 1.0f; - - space->locked = 0; - space->stamp = 0; - - space->staticShapes = cpSpaceHashNew(DEFAULT_DIM_SIZE, DEFAULT_COUNT, (cpSpaceHashBBFunc)shapeBBFunc); - space->activeShapes = cpSpaceHashNew(DEFAULT_DIM_SIZE, DEFAULT_COUNT, (cpSpaceHashBBFunc)shapeBBFunc); - - space->allocatedBuffers = cpArrayNew(0); - - space->bodies = cpArrayNew(0); - space->sleepingComponents = cpArrayNew(0); - space->rousedBodies = cpArrayNew(0); - - space->sleepTimeThreshold = INFINITY; - space->idleSpeedThreshold = 0.0f; - - space->arbiters = cpArrayNew(0); - space->pooledArbiters = cpArrayNew(0); - - space->contactBuffersHead = NULL; - space->contactSet = cpHashSetNew(0, (cpHashSetEqlFunc)contactSetEql, (cpHashSetTransFunc)contactSetTrans); - - space->constraints = cpArrayNew(0); - - space->defaultHandler = defaultHandler; - space->collFuncSet = cpHashSetNew(0, (cpHashSetEqlFunc)collFuncSetEql, (cpHashSetTransFunc)collFuncSetTrans); - space->collFuncSet->default_value = &space->defaultHandler; - - space->postStepCallbacks = NULL; - - cpBodyInitStatic(&space->staticBody); - - return space; -} - -cpSpace* -cpSpaceNew(void) -{ - return cpSpaceInit(cpSpaceAlloc()); -} - -void -cpSpaceDestroy(cpSpace *space) -{ - cpSpaceHashFree(space->staticShapes); - cpSpaceHashFree(space->activeShapes); - - cpArrayFree(space->bodies); - cpArrayFree(space->sleepingComponents); - cpArrayFree(space->rousedBodies); - - cpArrayFree(space->constraints); - - cpHashSetFree(space->contactSet); - - cpArrayFree(space->arbiters); - cpArrayFree(space->pooledArbiters); - - if(space->allocatedBuffers){ - cpArrayEach(space->allocatedBuffers, freeWrap, NULL); - cpArrayFree(space->allocatedBuffers); - } - - if(space->postStepCallbacks){ - cpHashSetEach(space->postStepCallbacks, freeWrap, NULL); - cpHashSetFree(space->postStepCallbacks); - } - - if(space->collFuncSet){ - cpHashSetEach(space->collFuncSet, freeWrap, NULL); - cpHashSetFree(space->collFuncSet); - } -} - -void -cpSpaceFree(cpSpace *space) -{ - if(space){ - cpSpaceDestroy(space); - cpfree(space); - } -} - -void -cpSpaceFreeChildren(cpSpace *space) -{ - cpArray *components = space->sleepingComponents; - while(components->num) cpBodyActivate((cpBody *)components->arr[0]); - - cpSpaceHashEach(space->staticShapes, (cpSpaceHashIterator)&shapeFreeWrap, NULL); - cpSpaceHashEach(space->activeShapes, (cpSpaceHashIterator)&shapeFreeWrap, NULL); - cpArrayEach(space->bodies, (cpArrayIter)&bodyFreeWrap, NULL); - cpArrayEach(space->constraints, (cpArrayIter)&constraintFreeWrap, NULL); -} - -#pragma mark Collision Handler Function Management - -void -cpSpaceAddCollisionHandler( - cpSpace *space, - cpCollisionType a, cpCollisionType b, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -){ - // Remove any old function so the new one will get added. - cpSpaceRemoveCollisionHandler(space, a, b); - - cpCollisionHandler handler = { - a, b, - begin ? begin : alwaysCollide, - preSolve ? preSolve : alwaysCollide, - postSolve ? postSolve : nothing, - separate ? separate : nothing, - data - }; - - cpHashSetInsert(space->collFuncSet, CP_HASH_PAIR(a, b), &handler, NULL); -} - -void -cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b) -{ - struct{cpCollisionType a, b;} ids = {a, b}; - cpCollisionHandler *old_handler = (cpCollisionHandler *) cpHashSetRemove(space->collFuncSet, CP_HASH_PAIR(a, b), &ids); - cpfree(old_handler); -} - -void -cpSpaceSetDefaultCollisionHandler( - cpSpace *space, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -){ - cpCollisionHandler handler = { - 0, 0, - begin ? begin : alwaysCollide, - preSolve ? preSolve : alwaysCollide, - postSolve ? postSolve : nothing, - separate ? separate : nothing, - data - }; - - space->defaultHandler = handler; -} - -#pragma mark Body, Shape, and Joint Management - -#define cpAssertSpaceUnlocked(space) \ - cpAssert(!space->locked, \ - "This addition/removal cannot be done safely during a call to cpSpaceStep() or during a query. " \ - "Put these calls into a post-step callback." \ - ); - -static void -cpBodyAddShape(cpBody *body, cpShape *shape) -{ - shape->next = shape->body->shapesList; - shape->body->shapesList = shape; -} - -static void -cpBodyRemoveShape(cpBody *body, cpShape *shape) -{ - cpShape **prev_ptr = &body->shapesList; - cpShape *node = body->shapesList; - - while(node && node != shape){ - prev_ptr = &node->next; - node = node->next; - } - - cpAssert(node, "Attempted to remove a shape from a body it was never attached to."); - (*prev_ptr) = node->next; -} - -cpShape * -cpSpaceAddShape(cpSpace *space, cpShape *shape) -{ - cpBody *body = shape->body; - if(!body || cpBodyIsStatic(body)) return cpSpaceAddStaticShape(space, shape); - - cpAssert(!cpHashSetFind(space->activeShapes->handleSet, shape->hashid, shape), - "Cannot add the same shape more than once."); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(body); - cpBodyAddShape(body, shape); - - cpShapeCacheBB(shape); - cpSpaceHashInsert(space->activeShapes, shape, shape->hashid, shape->bb); - - return shape; -} - -cpShape * -cpSpaceAddStaticShape(cpSpace *space, cpShape *shape) -{ - cpAssert(!cpHashSetFind(space->staticShapes->handleSet, shape->hashid, shape), - "Cannot add the same static shape more than once."); - cpAssertSpaceUnlocked(space); - - if(!shape->body) shape->body = &space->staticBody; - - cpShapeCacheBB(shape); - cpSpaceActivateShapesTouchingShape(space, shape); - cpSpaceHashInsert(space->staticShapes, shape, shape->hashid, shape->bb); - - return shape; -} - -cpBody * -cpSpaceAddBody(cpSpace *space, cpBody *body) -{ - cpAssertWarn(!cpBodyIsStatic(body), "Static bodies cannot be added to a space as they are not meant to be simulated."); - cpAssert(!body->space, "Cannot add a body to a more than one space or to the same space twice."); -// cpAssertSpaceUnlocked(space); This should be safe as long as it's not from an integration callback - - cpArrayPush(space->bodies, body); - body->space = space; - - return body; -} - -cpConstraint * -cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint) -{ - cpAssert(!cpArrayContains(space->constraints, constraint), "Cannot add the same constraint more than once."); -// cpAssertSpaceUnlocked(space); This should be safe as long as its not from a constraint callback. - - if(!constraint->a) constraint->a = &space->staticBody; - if(!constraint->b) constraint->b = &space->staticBody; - - cpBodyActivate(constraint->a); - cpBodyActivate(constraint->b); - cpArrayPush(space->constraints, constraint); - - return constraint; -} - -typedef struct removalContext { - cpSpace *space; - cpShape *shape; -} removalContext; - -// Hashset filter func to throw away old arbiters. -static cpBool -contactSetFilterRemovedShape(cpArbiter *arb, removalContext *context) -{ - if(context->shape == arb->a || context->shape == arb->b){ - if(arb->state != cpArbiterStateCached){ - arb->handler->separate(arb, context->space, arb->handler->data); - } - - cpArrayPush(context->space->pooledArbiters, arb); - return cpFalse; - } - - return cpTrue; -} - -void -cpSpaceRemoveShape(cpSpace *space, cpShape *shape) -{ - cpBody *body = shape->body; - if(cpBodyIsStatic(body)){ - cpSpaceRemoveStaticShape(space, shape); - return; - } - - cpBodyActivate(body); - - cpAssertSpaceUnlocked(space); - cpAssertWarn(cpHashSetFind(space->activeShapes->handleSet, shape->hashid, shape), - "Cannot remove a shape that was not added to the space. (Removed twice maybe?)"); - - cpBodyRemoveShape(body, shape); - - removalContext context = {space, shape}; - cpHashSetFilter(space->contactSet, (cpHashSetFilterFunc)contactSetFilterRemovedShape, &context); - cpSpaceHashRemove(space->activeShapes, shape, shape->hashid); -} - -void -cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape) -{ - cpAssertWarn(cpHashSetFind(space->staticShapes->handleSet, shape->hashid, shape), - "Cannot remove a static or sleeping shape that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - removalContext context = {space, shape}; - cpHashSetFilter(space->contactSet, (cpHashSetFilterFunc)contactSetFilterRemovedShape, &context); - cpSpaceHashRemove(space->staticShapes, shape, shape->hashid); - - cpSpaceActivateShapesTouchingShape(space, shape); -} - -void -cpSpaceRemoveBody(cpSpace *space, cpBody *body) -{ - cpAssertWarn(body->space == space, - "Cannot remove a body that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(body); - cpArrayDeleteObj(space->bodies, body); - body->space = NULL; -} - -void -cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint) -{ - cpAssertWarn(cpArrayContains(space->constraints, constraint), - "Cannot remove a constraint that was not added to the space. (Removed twice maybe?)"); -// cpAssertSpaceUnlocked(space); Should be safe as long as its not from a constraint callback. - - cpBodyActivate(constraint->a); - cpBodyActivate(constraint->b); - cpArrayDeleteObj(space->constraints, constraint); -} - -#pragma mark Spatial Hash Management - -static void updateBBCache(cpShape *shape, void *unused){cpShapeCacheBB(shape);} - -void -cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count) -{ - cpSpaceHashResize(space->staticShapes, dim, count); - cpSpaceHashRehash(space->staticShapes); -} - -void -cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count) -{ - cpSpaceHashResize(space->activeShapes, dim, count); -} - -void -cpSpaceRehashStatic(cpSpace *space) -{ - cpSpaceHashEach(space->staticShapes, (cpSpaceHashIterator)&updateBBCache, NULL); - cpSpaceHashRehash(space->staticShapes); -} - -void -cpSpaceRehashShape(cpSpace *space, cpShape *shape) -{ - cpShapeCacheBB(shape); - - // attempt to rehash the shape in both hashes - cpSpaceHashRehashObject(space->activeShapes, shape, shape->hashid); - cpSpaceHashRehashObject(space->staticShapes, shape, shape->hashid); -} - -void -cpSpaceEachBody(cpSpace *space, cpSpaceBodyIterator func, void *data) -{ - cpArray *bodies = space->bodies; - - for(int i=0; inum; i++){ - func((cpBody *)bodies->arr[i], data); - } - - cpArray *components = space->sleepingComponents; - for(int i=0; inum; i++){ - cpBody *root = (cpBody *)components->arr[i]; - cpBody *body = root, *next; - do { - next = body->node.next; - func(body, data); - } while((body = next) != root); - } -} - - diff --git a/3rdparty/chipmunk-5.3.4/src/cpSpaceComponent.c b/3rdparty/chipmunk-5.3.4/src/cpSpaceComponent.c deleted file mode 100644 index e99d6d7284..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpSpaceComponent.c +++ /dev/null @@ -1,279 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" - -#pragma mark Sleeping Functions - -// Chipmunk uses a data structure called a disjoint set forest. -// My attempts to find a way to splice circularly linked lists in -// constant time failed, and so I found this neat data structure instead. - -static inline cpBody * -componentNodeRoot(cpBody *body) -{ - cpBody *parent = body->node.parent; - - if(parent){ - // path compression, attaches this node directly to the root - return (body->node.parent = componentNodeRoot(parent)); - } else { - return body; - } -} - -static inline void -componentNodeMerge(cpBody *a_root, cpBody *b_root) -{ - if(a_root->node.rank < b_root->node.rank){ - a_root->node.parent = b_root; - } else if(a_root->node.rank > b_root->node.rank){ - b_root->node.parent = a_root; - } else if(a_root != b_root){ - b_root->node.parent = a_root; - a_root->node.rank++; - } -} - -void -cpSpaceActivateBody(cpSpace *space, cpBody *body) -{ - if(space->locked){ - // cpSpaceActivateBody() is called again once the space is unlocked - cpArrayPush(space->rousedBodies, body); - } else { - cpArrayPush(space->bodies, body); - for(cpShape *shape=body->shapesList; shape; shape=shape->next){ - cpSpaceHashRemove(space->staticShapes, shape, shape->hashid); - cpSpaceHashInsert(space->activeShapes, shape, shape->hashid, shape->bb); - } - } -} - -static inline void -componentActivate(cpBody *root) -{ - if(!cpBodyIsSleeping(root)) return; - - cpSpace *space = root->space; - cpAssert(space, "Trying to activate a body that was never added to a space."); - - cpBody *body = root, *next; - do { - next = body->node.next; - - cpComponentNode node = {NULL, NULL, 0, 0.0f}; - body->node = node; - - cpSpaceActivateBody(space, body); - } while((body = next) != root); - - cpArrayDeleteObj(space->sleepingComponents, root); -} - -void -cpBodyActivate(cpBody *body) -{ - componentActivate(componentNodeRoot(body)); -} - -static inline void -mergeBodies(cpSpace *space, cpArray *components, cpArray *rogueBodies, cpBody *a, cpBody *b) -{ - // Ignore connections to static bodies - if(cpBodyIsStatic(a) || cpBodyIsStatic(b)) return; - - cpBody *a_root = componentNodeRoot(a); - cpBody *b_root = componentNodeRoot(b); - - cpBool a_sleep = cpBodyIsSleeping(a_root); - cpBool b_sleep = cpBodyIsSleeping(b_root); - - if(a_sleep && b_sleep){ - return; - } else if(a_sleep || b_sleep){ - componentActivate(a_root); - componentActivate(b_root); - } - - // Add any rogue bodies found to the list and reset the idle time of anything they touch. - if(cpBodyIsRogue(a)){ cpArrayPush(rogueBodies, a); b->node.idleTime = 0.0f; } - if(cpBodyIsRogue(b)){ cpArrayPush(rogueBodies, b); a->node.idleTime = 0.0f; } - - componentNodeMerge(a_root, b_root); -} - -static inline cpBool -componentActive(cpBody *root, cpFloat threshold) -{ - cpBody *body = root, *next; - do { - next = body->node.next; - if(body->node.idleTime < threshold) return cpTrue; - } while((body = next) != root); - - return cpFalse; -} - -static inline void -addToComponent(cpBody *body, cpArray *components) -{ - // Check that the body is not already added to the component list - if(body->node.next) return; - cpBody *root = componentNodeRoot(body); - - cpBody *next = root->node.next; - if(!next){ - // If the root isn't part of a list yet, then it hasn't been - // added to the components list. Do that now. - cpArrayPush(components, root); - // Start the list - body->node.next = root; - root->node.next = body; - } else if(root != body) { - // Splice in body after the root. - body->node.next = next; - root->node.next = body; - } -} - -// TODO this function needs more commenting. -void -cpSpaceProcessComponents(cpSpace *space, cpFloat dt) -{ - cpArray *bodies = space->bodies; - cpArray *newBodies = cpArrayNew(bodies->num); - cpArray *rogueBodies = cpArrayNew(16); - cpArray *arbiters = space->arbiters; - cpArray *constraints = space->constraints; - cpArray *components = cpArrayNew(space->sleepingComponents->num); - - cpFloat dv = space->idleSpeedThreshold; - cpFloat dvsq = (dv ? dv*dv : cpvdot(space->gravity, space->gravity)*dt*dt); - - // update idling - for(int i=0; inum; i++){ - cpBody *body = (cpBody*)bodies->arr[i]; - - cpFloat thresh = (dvsq ? body->m*dvsq : 0.0f); - body->node.idleTime = (cpBodyKineticEnergy(body) > thresh ? 0.0f : body->node.idleTime + dt); - } - - // iterate graph edges and build forests - for(int i=0; inum; i++){ - cpArbiter *arb = (cpArbiter*)arbiters->arr[i]; - mergeBodies(space, components, rogueBodies, arb->a->body, arb->b->body); - } - for(int j=0; jnum; j++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[j]; - mergeBodies(space, components, rogueBodies, constraint->a, constraint->b); - } - - // iterate bodies and add them to their components - for(int i=0; inum; i++) addToComponent((cpBody*)bodies->arr[i], components); - for(int i=0; inum; i++) addToComponent((cpBody*)rogueBodies->arr[i], components); - - // iterate components, copy or deactivate - for(int i=0; inum; i++){ - cpBody *root = (cpBody*)components->arr[i]; - if(componentActive(root, space->sleepTimeThreshold)){ - cpBody *body = root, *next; - do { - next = body->node.next; - - if(!cpBodyIsRogue(body)) cpArrayPush(newBodies, body); - cpComponentNode node = {NULL, NULL, 0, body->node.idleTime}; - body->node = node; - } while((body = next) != root); - } else { - cpBody *body = root, *next; - do { - next = body->node.next; - - for(cpShape *shape = body->shapesList; shape; shape = shape->next){ - cpSpaceHashRemove(space->activeShapes, shape, shape->hashid); - cpSpaceHashInsert(space->staticShapes, shape, shape->hashid, shape->bb); - } - } while((body = next) != root); - - cpArrayPush(space->sleepingComponents, root); - } - } - - space->bodies = newBodies; - cpArrayFree(bodies); - cpArrayFree(rogueBodies); - cpArrayFree(components); -} - -void -cpBodySleep(cpBody *body) -{ - cpBodySleepWithGroup(body, NULL); -} - -void -cpBodySleepWithGroup(cpBody *body, cpBody *group){ - cpAssert(!cpBodyIsStatic(body) && !cpBodyIsRogue(body), "Rogue and static bodies cannot be put to sleep."); - - cpSpace *space = body->space; - cpAssert(space, "Cannot put a body to sleep that has not been added to a space."); - cpAssert(!space->locked, "Bodies can not be put to sleep during a query or a call to cpSpaceSte(). Put these calls into a post-step callback."); - cpAssert(!group || cpBodyIsSleeping(group), "Cannot use a non-sleeping body as a group identifier."); - - if(cpBodyIsSleeping(body)) return; - - for(cpShape *shape = body->shapesList; shape; shape = shape->next){ - cpShapeCacheBB(shape); - cpSpaceHashRemove(space->activeShapes, shape, shape->hashid); - cpSpaceHashInsert(space->staticShapes, shape, shape->hashid, shape->bb); - } - - if(group){ - cpBody *root = componentNodeRoot(group); - - cpComponentNode node = {root, root->node.next, 0, 0.0f}; - body->node = node; - root->node.next = body; - } else { - cpComponentNode node = {NULL, body, 0, 0.0f}; - body->node = node; - - cpArrayPush(space->sleepingComponents, body); - } - - cpArrayDeleteObj(space->bodies, body); -} - -static void -activateTouchingHelper(cpShape *shape, cpContactPointSet *points, cpArray **bodies){ - cpBodyActivate(shape->body); -} - -void -cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape){ - cpArray *bodies = NULL; - cpSpaceShapeQuery(space, shape, (cpSpaceShapeQueryFunc)activateTouchingHelper, &bodies); -} - - diff --git a/3rdparty/chipmunk-5.3.4/src/cpSpaceHash.c b/3rdparty/chipmunk-5.3.4/src/cpSpaceHash.c deleted file mode 100644 index b3f7917354..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpSpaceHash.c +++ /dev/null @@ -1,534 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk_private.h" -#include "prime.h" - -static cpHandle* -cpHandleInit(cpHandle *hand, void *obj) -{ - hand->obj = obj; - hand->retain = 0; - hand->stamp = 0; - - return hand; -} - -static inline void cpHandleRetain(cpHandle *hand){hand->retain++;} - -static inline void -cpHandleRelease(cpHandle *hand, cpArray *pooledHandles) -{ - hand->retain--; - if(hand->retain == 0) cpArrayPush(pooledHandles, hand); -} - -cpSpaceHash* -cpSpaceHashAlloc(void) -{ - return (cpSpaceHash *)cpcalloc(1, sizeof(cpSpaceHash)); -} - -// Frees the old table, and allocate a new one. -static void -cpSpaceHashAllocTable(cpSpaceHash *hash, int numcells) -{ - cpfree(hash->table); - - hash->numcells = numcells; - hash->table = (cpSpaceHashBin **)cpcalloc(numcells, sizeof(cpSpaceHashBin *)); -} - -// Equality function for the handleset. -static int handleSetEql(void *obj, cpHandle *hand){return (obj == hand->obj);} - -// Transformation function for the handleset. -static void * -handleSetTrans(void *obj, cpSpaceHash *hash) -{ - if(hash->pooledHandles->num == 0){ - // handle pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpHandle); - cpAssert(count, "Buffer size is too small."); - - cpHandle *buffer = (cpHandle *)cpmalloc(CP_BUFFER_BYTES); - cpArrayPush(hash->allocatedBuffers, buffer); - - for(int i=0; ipooledHandles, buffer + i); - } - - cpHandle *hand = cpHandleInit((cpHandle *) cpArrayPop(hash->pooledHandles), obj); - cpHandleRetain(hand); - - return hand; -} - -cpSpaceHash* -cpSpaceHashInit(cpSpaceHash *hash, cpFloat celldim, int numcells, cpSpaceHashBBFunc bbfunc) -{ - cpSpaceHashAllocTable(hash, next_prime(numcells)); - hash->celldim = celldim; - hash->bbfunc = bbfunc; - - hash->handleSet = cpHashSetNew(0, (cpHashSetEqlFunc)handleSetEql, (cpHashSetTransFunc)handleSetTrans); - hash->pooledHandles = cpArrayNew(0); - - hash->pooledBins = NULL; - hash->allocatedBuffers = cpArrayNew(0); - - hash->stamp = 1; - - return hash; -} - -cpSpaceHash* -cpSpaceHashNew(cpFloat celldim, int cells, cpSpaceHashBBFunc bbfunc) -{ - return cpSpaceHashInit(cpSpaceHashAlloc(), celldim, cells, bbfunc); -} - -static inline void -recycleBin(cpSpaceHash *hash, cpSpaceHashBin *bin) -{ - bin->next = hash->pooledBins; - hash->pooledBins = bin; -} - -static inline void -clearHashCell(cpSpaceHash *hash, int idx) -{ - cpSpaceHashBin *bin = hash->table[idx]; - while(bin){ - cpSpaceHashBin *next = bin->next; - - cpHandleRelease(bin->handle, hash->pooledHandles); - recycleBin(hash, bin); - - bin = next; - } - - hash->table[idx] = NULL; -} - -// Clear all cells in the hashtable. -static void -clearHash(cpSpaceHash *hash) -{ - for(int i=0; inumcells; i++) - clearHashCell(hash, i); -} - -static void freeWrap(void *ptr, void *unused){cpfree(ptr);} - -void -cpSpaceHashDestroy(cpSpaceHash *hash) -{ - clearHash(hash); - - cpHashSetFree(hash->handleSet); - - cpArrayEach(hash->allocatedBuffers, freeWrap, NULL); - cpArrayFree(hash->allocatedBuffers); - cpArrayFree(hash->pooledHandles); - - cpfree(hash->table); -} - -void -cpSpaceHashFree(cpSpaceHash *hash) -{ - if(hash){ - cpSpaceHashDestroy(hash); - cpfree(hash); - } -} - -void -cpSpaceHashResize(cpSpaceHash *hash, cpFloat celldim, int numcells) -{ - // Clear the hash to release the old handle locks. - clearHash(hash); - - hash->celldim = celldim; - cpSpaceHashAllocTable(hash, next_prime(numcells)); -} - -// Return true if the chain contains the handle. -static inline cpBool -containsHandle(cpSpaceHashBin *bin, cpHandle *hand) -{ - while(bin){ - if(bin->handle == hand) return cpTrue; - bin = bin->next; - } - - return cpFalse; -} - -// Get a recycled or new bin. -static inline cpSpaceHashBin * -getEmptyBin(cpSpaceHash *hash) -{ - cpSpaceHashBin *bin = hash->pooledBins; - - if(bin){ - hash->pooledBins = bin->next; - return bin; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpSpaceHashBin); - cpAssert(count, "Buffer size is too small."); - - cpSpaceHashBin *buffer = (cpSpaceHashBin *)cpmalloc(CP_BUFFER_BYTES); - cpArrayPush(hash->allocatedBuffers, buffer); - - // push all but the first one, return the first instead - for(int i=1; icelldim; - int l = floor_int(bb.l/dim); // Fix by ShiftZ - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - int n = hash->numcells; - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - int idx = hash_func(i,j,n); - cpSpaceHashBin *bin = hash->table[idx]; - - // Don't add an object twice to the same cell. - if(containsHandle(bin, hand)) continue; - - cpHandleRetain(hand); - // Insert a new bin for the handle in this cell. - cpSpaceHashBin *newBin = getEmptyBin(hash); - newBin->handle = hand; - newBin->next = bin; - hash->table[idx] = newBin; - } - } -} - -void -cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue hashid, cpBB _deprecated_unused) -{ - cpHandle *hand = (cpHandle *)cpHashSetInsert(hash->handleSet, hashid, obj, hash); - hashHandle(hash, hand, hash->bbfunc(obj)); -} - -void -cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - cpHandle *hand = (cpHandle *)cpHashSetRemove(hash->handleSet, hashid, obj); - - if(hand){ - hand->obj = NULL; - cpHandleRelease(hand, hash->pooledHandles); - - cpSpaceHashInsert(hash, obj, hashid, cpBBNew(0.0f, 0.0f, 0.0f, 0.0f)); - } -} - -static void handleRehashHelper(cpHandle *hand, cpSpaceHash *hash){hashHandle(hash, hand, hash->bbfunc(hand->obj));} - -void -cpSpaceHashRehash(cpSpaceHash *hash) -{ - clearHash(hash); - cpHashSetEach(hash->handleSet, (cpHashSetIterFunc)handleRehashHelper, hash); -} - -void -cpSpaceHashRemove(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - cpHandle *hand = (cpHandle *)cpHashSetRemove(hash->handleSet, hashid, obj); - - if(hand){ - hand->obj = NULL; - cpHandleRelease(hand, hash->pooledHandles); - } -} - -typedef struct eachPair { - cpSpaceHashIterator func; - void *data; -} eachPair; - -static void eachHelper(cpHandle *hand, eachPair *pair){pair->func(hand->obj, pair->data);} - -// Iterate over the objects in the spatial hash. -void -cpSpaceHashEach(cpSpaceHash *hash, cpSpaceHashIterator func, void *data) -{ - eachPair pair = {func, data}; - cpHashSetEach(hash->handleSet, (cpHashSetIterFunc)eachHelper, &pair); -} - -static inline void -removeOrphanedHandles(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr) -{ - cpSpaceHashBin *bin = *bin_ptr; - while(bin){ - cpHandle *hand = bin->handle; - cpSpaceHashBin *next = bin->next; - - if(!hand->obj){ - // orphaned handle, unlink and recycle the bin - (*bin_ptr) = bin->next; - recycleBin(hash, bin); - - cpHandleRelease(hand, hash->pooledHandles); - } else { - bin_ptr = &bin->next; - } - - bin = next; - } -} - -// Calls the callback function for the objects in a given chain. -static inline void -query(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr, void *obj, cpSpaceHashQueryFunc func, void *data) -{ - restart: - for(cpSpaceHashBin *bin = *bin_ptr; bin; bin = bin->next){ - cpHandle *hand = bin->handle; - void *other = hand->obj; - - if(hand->stamp == hash->stamp || obj == other){ - continue; - } else if(other){ - func(obj, other, data); - hand->stamp = hash->stamp; - } else { - // The object for this handle has been removed - // cleanup this cell and restart the query - removeOrphanedHandles(hash, bin_ptr); - goto restart; // GCC not smart enough/able to tail call an inlined function. - } - } -} - -void -cpSpaceHashPointQuery(cpSpaceHash *hash, cpVect point, cpSpaceHashQueryFunc func, void *data) -{ - cpFloat dim = hash->celldim; - int idx = hash_func(floor_int(point.x/dim), floor_int(point.y/dim), hash->numcells); // Fix by ShiftZ - - query(hash, &hash->table[idx], &point, func, data); - hash->stamp++; -} - -void -cpSpaceHashQuery(cpSpaceHash *hash, void *obj, cpBB bb, cpSpaceHashQueryFunc func, void *data) -{ - // Get the dimensions in cell coordinates. - cpFloat dim = hash->celldim; - int l = floor_int(bb.l/dim); // Fix by ShiftZ - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - int n = hash->numcells; - cpSpaceHashBin **table = hash->table; - - // Iterate over the cells and query them. - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - query(hash, &table[hash_func(i,j,n)], obj, func, data); - } - } - - hash->stamp++; -} - -// Similar to struct eachPair above. -typedef struct queryRehashPair { - cpSpaceHash *hash; - cpSpaceHashQueryFunc func; - void *data; -} queryRehashPair; - -// Hashset iterator func used with cpSpaceHashQueryRehash(). -static void -handleQueryRehashHelper(void *elt, void *data) -{ - cpHandle *hand = (cpHandle *)elt; - - // Unpack the user callback data. - queryRehashPair *pair = (queryRehashPair *)data; - cpSpaceHash *hash = pair->hash; - cpSpaceHashQueryFunc func = pair->func; - - cpFloat dim = hash->celldim; - int n = hash->numcells; - - void *obj = hand->obj; - cpBB bb = hash->bbfunc(obj); - - int l = floor_int(bb.l/dim); - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - cpSpaceHashBin **table = hash->table; - - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - int idx = hash_func(i,j,n); - cpSpaceHashBin *bin = table[idx]; - - if(containsHandle(bin, hand)) continue; - - cpHandleRetain(hand); // this MUST be done first in case the object is removed in func() - query(hash, &bin, obj, func, pair->data); - - cpSpaceHashBin *newBin = getEmptyBin(hash); - newBin->handle = hand; - newBin->next = bin; - table[idx] = newBin; - } - } - - // Increment the stamp for each object hashed. - hash->stamp++; -} - -void -cpSpaceHashQueryRehash(cpSpaceHash *hash, cpSpaceHashQueryFunc func, void *data) -{ - clearHash(hash); - - queryRehashPair pair = {hash, func, data}; - cpHashSetEach(hash->handleSet, &handleQueryRehashHelper, &pair); -} - -static inline cpFloat -segmentQuery(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr, void *obj, cpSpaceHashSegmentQueryFunc func, void *data) -{ - cpFloat t = 1.0f; - - restart: - for(cpSpaceHashBin *bin = *bin_ptr; bin; bin = bin->next){ - cpHandle *hand = bin->handle; - void *other = hand->obj; - - // Skip over certain conditions - if(hand->stamp == hash->stamp){ - continue; - } else if(other){ - t = cpfmin(t, func(obj, other, data)); - hand->stamp = hash->stamp; - } else { - // The object for this handle has been removed - // cleanup this cell and restart the query - removeOrphanedHandles(hash, bin_ptr); - goto restart; // GCC not smart enough/able to tail call an inlined function. - } - } - - return t; -} - -// modified from http://playtechs.blogspot.com/2007/03/raytracing-on-grid.html -void cpSpaceHashSegmentQuery(cpSpaceHash *hash, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpaceHashSegmentQueryFunc func, void *data) -{ - a = cpvmult(a, 1.0f/hash->celldim); - b = cpvmult(b, 1.0f/hash->celldim); - - int cell_x = floor_int(a.x), cell_y = floor_int(a.y); - - cpFloat t = 0; - - int x_inc, y_inc; - cpFloat temp_v, temp_h; - - if (b.x > a.x){ - x_inc = 1; - temp_h = (cpffloor(a.x + 1.0f) - a.x); - } else { - x_inc = -1; - temp_h = (a.x - cpffloor(a.x)); - } - - if (b.y > a.y){ - y_inc = 1; - temp_v = (cpffloor(a.y + 1.0f) - a.y); - } else { - y_inc = -1; - temp_v = (a.y - cpffloor(a.y)); - } - - // Division by zero is *very* slow on ARM - cpFloat dx = cpfabs(b.x - a.x), dy = cpfabs(b.y - a.y); - cpFloat dt_dx = (dx ? 1.0f/dx : INFINITY), dt_dy = (dy ? 1.0f/dy : INFINITY); - - // fix NANs in horizontal directions - cpFloat next_h = (temp_h ? temp_h*dt_dx : dt_dx); - cpFloat next_v = (temp_v ? temp_v*dt_dy : dt_dy); - - cpSpaceHashBin **table = hash->table; - - int n = hash->numcells; - while(t < t_exit){ - int idx = hash_func(cell_x, cell_y, n); - t_exit = cpfmin(t_exit, segmentQuery(hash, &table[idx], obj, func, data)); - - if (next_v < next_h){ - cell_y += y_inc; - t = next_v; - next_v += dt_dy; - } else { - cell_x += x_inc; - t = next_h; - next_h += dt_dx; - } - } - - hash->stamp++; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpSpaceQuery.c b/3rdparty/chipmunk-5.3.4/src/cpSpaceQuery.c deleted file mode 100644 index 642ae4cada..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpSpaceQuery.c +++ /dev/null @@ -1,246 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#include "chipmunk_private.h" - -#pragma mark Point Query Functions - -typedef struct pointQueryContext { - cpLayers layers; - cpGroup group; - cpSpacePointQueryFunc func; - void *data; -} pointQueryContext; - -static void -pointQueryHelper(cpVect *point, cpShape *shape, pointQueryContext *context) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpShapePointQuery(shape, *point) - ){ - context->func(shape, context->data); - } -} - -void -cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data) -{ - pointQueryContext context = {layers, group, func, data}; - - cpSpaceLock(space); { - cpSpaceHashPointQuery(space->activeShapes, point, (cpSpaceHashQueryFunc)pointQueryHelper, &context); - cpSpaceHashPointQuery(space->staticShapes, point, (cpSpaceHashQueryFunc)pointQueryHelper, &context); - } cpSpaceUnlock(space); -} - -static void -rememberLastPointQuery(cpShape *shape, cpShape **outShape) -{ - if(!shape->sensor) *outShape = shape; -} - -cpShape * -cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group) -{ - cpShape *shape = NULL; - cpSpacePointQuery(space, point, layers, group, (cpSpacePointQueryFunc)rememberLastPointQuery, &shape); - - return shape; -} - - -#pragma mark Segment Query Functions - -typedef struct segQueryContext { - cpVect start, end; - cpLayers layers; - cpGroup group; - cpSpaceSegmentQueryFunc func; -} segQueryContext; - -static cpFloat -segQueryFunc(segQueryContext *context, cpShape *shape, void *data) -{ - cpSegmentQueryInfo info; - - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpShapeSegmentQuery(shape, context->start, context->end, &info) - ){ - context->func(shape, info.t, info.n, data); - } - - return 1.0f; -} - -void -cpSpaceSegmentQuery(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryFunc func, void *data) -{ - segQueryContext context = { - start, end, - layers, group, - func, - }; - - cpSpaceLock(space); { - cpSpaceHashSegmentQuery(space->staticShapes, &context, start, end, 1.0f, (cpSpaceHashSegmentQueryFunc)segQueryFunc, data); - cpSpaceHashSegmentQuery(space->activeShapes, &context, start, end, 1.0f, (cpSpaceHashSegmentQueryFunc)segQueryFunc, data); - } cpSpaceUnlock(space); -} - -typedef struct segQueryFirstContext { - cpVect start, end; - cpLayers layers; - cpGroup group; -} segQueryFirstContext; - -static cpFloat -segQueryFirst(segQueryFirstContext *context, cpShape *shape, cpSegmentQueryInfo *out) -{ - cpSegmentQueryInfo info; - - if( - !(shape->group && context->group == shape->group) && - (context->layers&shape->layers) && - !shape->sensor && - cpShapeSegmentQuery(shape, context->start, context->end, &info) && - info.t < out->t - ){ - *out = info; - } - - return out->t; -} - -cpShape * -cpSpaceSegmentQueryFirst(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSegmentQueryInfo *out) -{ - cpSegmentQueryInfo info = {NULL, 1.0f, cpvzero}; - if(out){ - (*out) = info; - } else { - out = &info; - } - - segQueryFirstContext context = { - start, end, - layers, group - }; - - cpSpaceHashSegmentQuery(space->staticShapes, &context, start, end, 1.0f, (cpSpaceHashSegmentQueryFunc)segQueryFirst, out); - cpSpaceHashSegmentQuery(space->activeShapes, &context, start, end, out->t, (cpSpaceHashSegmentQueryFunc)segQueryFirst, out); - - return out->shape; -} - -#pragma mark BB Query Functions - -typedef struct bbQueryContext { - cpLayers layers; - cpGroup group; - cpSpaceBBQueryFunc func; - void *data; -} bbQueryContext; - -static void -bbQueryHelper(cpBB *bb, cpShape *shape, bbQueryContext *context) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpBBintersects(*bb, shape->bb) - ){ - context->func(shape, context->data); - } -} - -void -cpSpaceBBQuery(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryFunc func, void *data) -{ - bbQueryContext context = {layers, group, func, data}; - - cpSpaceLock(space); { - cpSpaceHashQuery(space->activeShapes, &bb, bb, (cpSpaceHashQueryFunc)bbQueryHelper, &context); - cpSpaceHashQuery(space->staticShapes, &bb, bb, (cpSpaceHashQueryFunc)bbQueryHelper, &context); - } cpSpaceUnlock(space); -} - -#pragma mark Shape Query Functions - -typedef struct shapeQueryContext { - cpSpaceShapeQueryFunc func; - void *data; - cpBool anyCollision; -} shapeQueryContext; - -// Callback from the spatial hash. -static void -shapeQueryHelper(cpShape *a, cpShape *b, shapeQueryContext *context) -{ - // Reject any of the simple cases - if( - (a->group && a->group == b->group) || - !(a->layers & b->layers) || - a->sensor || b->sensor - ) return; - - cpContact contacts[CP_MAX_CONTACTS_PER_ARBITER]; - int numContacts = 0; - - // Shape 'a' should have the lower shape type. (required by cpCollideShapes() ) - if(a->klass->type <= b->klass->type){ - numContacts = cpCollideShapes(a, b, contacts); - } else { - numContacts = cpCollideShapes(b, a, contacts); - for(int i=0; ianyCollision = cpTrue; - - if(context->func){ - cpContactPointSet set = {numContacts, {}}; - for(int i=0; ifunc(b, &set, context->data); - } - } -} - -cpBool -cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data) -{ - cpBB bb = cpShapeCacheBB(shape); - shapeQueryContext context = {func, data, cpFalse}; - - cpSpaceLock(space); { - cpSpaceHashQuery(space->activeShapes, shape, bb, (cpSpaceHashQueryFunc)shapeQueryHelper, &context); - cpSpaceHashQuery(space->staticShapes, shape, bb, (cpSpaceHashQueryFunc)shapeQueryHelper, &context); - } cpSpaceUnlock(space); - - return context.anyCollision; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpSpaceStep.c b/3rdparty/chipmunk-5.3.4/src/cpSpaceStep.c deleted file mode 100644 index 7dd2f7691a..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpSpaceStep.c +++ /dev/null @@ -1,398 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -//#include -#include - -#include "chipmunk_private.h" - -#pragma mark Post Step Callback Functions - -typedef struct PostStepCallback { - cpPostStepFunc func; - void *obj; - void *data; -} PostStepCallback; - -static cpBool -postStepFuncSetEql(PostStepCallback *a, PostStepCallback *b){ - return a->obj == b->obj; -} - -static void * -postStepFuncSetTrans(PostStepCallback *callback, void *ignored) -{ - PostStepCallback *value = (PostStepCallback *)cpmalloc(sizeof(PostStepCallback)); - (*value) = (*callback); - - return value; -} - -void -cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *obj, void *data) -{ - if(!space->postStepCallbacks){ - space->postStepCallbacks = cpHashSetNew(0, (cpHashSetEqlFunc)postStepFuncSetEql, (cpHashSetTransFunc)postStepFuncSetTrans); - } - - PostStepCallback callback = {func, obj, data}; - cpHashSetInsert(space->postStepCallbacks, (cpHashValue)(size_t)obj, &callback, NULL); -} - -void * -cpSpaceGetPostStepData(cpSpace *space, void *obj) -{ - if(space->postStepCallbacks){ - PostStepCallback query = {NULL, obj, NULL}; - PostStepCallback *callback = (PostStepCallback *)cpHashSetFind(space->postStepCallbacks, (cpHashValue)(size_t)obj, &query); - return (callback ? callback->data : NULL); - } else { - return NULL; - } -} - -#pragma mark Contact Buffer Functions - -#define CP_CONTACTS_BUFFER_SIZE ((CP_BUFFER_BYTES - sizeof(cpContactBufferHeader))/sizeof(cpContact)) -typedef struct cpContactBuffer { - cpContactBufferHeader header; - cpContact contacts[CP_CONTACTS_BUFFER_SIZE]; -} cpContactBuffer; - -static cpContactBufferHeader * -cpSpaceAllocContactBuffer(cpSpace *space) -{ - cpContactBuffer *buffer = (cpContactBuffer *)cpmalloc(sizeof(cpContactBuffer)); - cpArrayPush(space->allocatedBuffers, buffer); - return (cpContactBufferHeader *)buffer; -} - -static cpContactBufferHeader * -cpContactBufferHeaderInit(cpContactBufferHeader *header, cpTimestamp stamp, cpContactBufferHeader *splice) -{ - header->stamp = stamp; - header->next = (splice ? splice->next : header); - header->numContacts = 0; - - return header; -} - -static void -cpSpacePushFreshContactBuffer(cpSpace *space) -{ - cpTimestamp stamp = space->stamp; - - cpContactBufferHeader *head = space->contactBuffersHead; - - if(!head){ - // No buffers have been allocated, make one - space->contactBuffersHead = cpContactBufferHeaderInit(cpSpaceAllocContactBuffer(space), stamp, NULL); - } else if(stamp - head->next->stamp > cp_contact_persistence){ - // The tail buffer is available, rotate the ring - cpContactBufferHeader *tail = head->next; - space->contactBuffersHead = cpContactBufferHeaderInit(tail, stamp, tail); - } else { - // Allocate a new buffer and push it into the ring - cpContactBufferHeader *buffer = cpContactBufferHeaderInit(cpSpaceAllocContactBuffer(space), stamp, head); - space->contactBuffersHead = head->next = buffer; - } -} - - -static cpContact * -cpContactBufferGetArray(cpSpace *space) -{ - if(space->contactBuffersHead->numContacts + CP_MAX_CONTACTS_PER_ARBITER > CP_CONTACTS_BUFFER_SIZE){ - // contact buffer could overflow on the next collision, push a fresh one. - cpSpacePushFreshContactBuffer(space); - } - - cpContactBufferHeader *head = space->contactBuffersHead; - return ((cpContactBuffer *)head)->contacts + head->numContacts; -} - -static inline void -cpSpacePushContacts(cpSpace *space, int count){ - cpAssert(count <= CP_MAX_CONTACTS_PER_ARBITER, "Internal error, too many contact point overflow!"); - space->contactBuffersHead->numContacts += count; -} - -static inline void -cpSpacePopContacts(cpSpace *space, int count){ - space->contactBuffersHead->numContacts -= count; -} - -#pragma mark Collision Detection Functions - -static inline cpBool -queryReject(cpShape *a, cpShape *b) -{ - return - // BBoxes must overlap - !cpBBintersects(a->bb, b->bb) - // Don't collide shapes attached to the same body. - || a->body == b->body - // Don't collide objects in the same non-zero group - || (a->group && a->group == b->group) - // Don't collide objects that don't share at least on layer. - || !(a->layers & b->layers); -} - -// Callback from the spatial hash. -static void -queryFunc(cpShape *a, cpShape *b, cpSpace *space) -{ - // Reject any of the simple cases - if(queryReject(a,b)) return; - - // Find the collision pair function for the shapes. - struct{cpCollisionType a, b;} ids = {a->collision_type, b->collision_type}; - cpHashValue collHashID = CP_HASH_PAIR(a->collision_type, b->collision_type); - cpCollisionHandler *handler = (cpCollisionHandler *)cpHashSetFind(space->collFuncSet, collHashID, &ids); - - cpBool sensor = a->sensor || b->sensor; - if(sensor && handler == &space->defaultHandler) return; - - // Shape 'a' should have the lower shape type. (required by cpCollideShapes() ) - if(a->klass->type > b->klass->type){ - cpShape *temp = a; - a = b; - b = temp; - } - - // Narrow-phase collision detection. - cpContact *contacts = cpContactBufferGetArray(space); - int numContacts = cpCollideShapes(a, b, contacts); - if(!numContacts) return; // Shapes are not colliding. - cpSpacePushContacts(space, numContacts); - - // Get an arbiter from space->contactSet for the two shapes. - // This is where the persistant contact magic comes from. - cpShape *shape_pair[] = {a, b}; - cpHashValue arbHashID = CP_HASH_PAIR((size_t)a, (size_t)b); - cpArbiter *arb = (cpArbiter *)cpHashSetInsert(space->contactSet, arbHashID, shape_pair, space); - cpArbiterUpdate(arb, contacts, numContacts, handler, a, b); - - // Call the begin function first if it's the first step - if(arb->state == cpArbiterStateFirstColl && !handler->begin(arb, space, handler->data)){ - cpArbiterIgnore(arb); // permanently ignore the collision until separation - } - - if( - // Ignore the arbiter if it has been flagged - (arb->state != cpArbiterStateIgnore) && - // Call preSolve - handler->preSolve(arb, space, handler->data) && - // Process, but don't add collisions for sensors. - !sensor - ){ - cpArrayPush(space->arbiters, arb); - } else { - cpSpacePopContacts(space, numContacts); - - arb->contacts = NULL; - arb->numContacts = 0; - - // Normally arbiters are set as used after calling the post-step callback. - // However, post-step callbacks are not called for sensors or arbiters rejected from pre-solve. - if(arb->state != cpArbiterStateIgnore) arb->state = cpArbiterStateNormal; - } - - // Time stamp the arbiter so we know it was used recently. - arb->stamp = space->stamp; -} - -// Iterator for active/static hash collisions. -static void -active2staticIter(cpShape *shape, cpSpace *space) -{ - cpSpaceHashQuery(space->staticShapes, shape, shape->bb, (cpSpaceHashQueryFunc)queryFunc, space); -} - -// Hashset filter func to throw away old arbiters. -static cpBool -contactSetFilter(cpArbiter *arb, cpSpace *space) -{ - if(space->sleepTimeThreshold != INFINITY){ - cpBody *a = arb->a->body; - cpBody *b = arb->b->body; - - // both bodies are either static or sleeping - cpBool sleepingNow = - (cpBodyIsStatic(a) || cpBodyIsSleeping(a)) && - (cpBodyIsStatic(b) || cpBodyIsSleeping(b)); - - if(sleepingNow){ - arb->state = cpArbiterStateSleep; - return cpTrue; - } else if(arb->state == cpArbiterStateSleep){ - // wake up the arbiter and continue as normal - arb->state = cpArbiterStateNormal; - // TODO is it possible that cpArbiterStateIgnore should be set here instead? - } - } - - cpTimestamp ticks = space->stamp - arb->stamp; - - // was used last frame, but not this one - if(ticks >= 1 && arb->state != cpArbiterStateCached){ - arb->handler->separate(arb, space, arb->handler->data); - arb->state = cpArbiterStateCached; - } - - if(ticks >= cp_contact_persistence){ - arb->contacts = NULL; - arb->numContacts = 0; - - cpArrayPush(space->pooledArbiters, arb); - return cpFalse; - } - - return cpTrue; -} - -// Hashset filter func to call and throw away post step callbacks. -static void -postStepCallbackSetIter(PostStepCallback *callback, cpSpace *space) -{ - callback->func(space, callback->obj, callback->data); - cpfree(callback); -} - -#pragma mark All Important cpSpaceStep() Function - -void cpSpaceProcessComponents(cpSpace *space, cpFloat dt); - -static void updateBBCache(cpShape *shape, void *unused){cpShapeCacheBB(shape);} - -void -cpSpaceStep(cpSpace *space, cpFloat dt) -{ - if(!dt) return; // don't step if the timestep is 0! - cpFloat dt_inv = 1.0f/dt; - - cpArray *bodies = space->bodies; - cpArray *constraints = space->constraints; - - // Empty the arbiter list. - space->arbiters->num = 0; - - // Integrate positions. - for(int i=0; inum; i++){ - cpBody *body = (cpBody *)bodies->arr[i]; - body->position_func(body, dt); - } - - // Pre-cache BBoxes and shape data. - cpSpaceHashEach(space->activeShapes, (cpSpaceHashIterator)updateBBCache, NULL); - - cpSpaceLock(space); - - // Collide! - cpSpacePushFreshContactBuffer(space); - if(space->staticShapes->handleSet->entries) - cpSpaceHashEach(space->activeShapes, (cpSpaceHashIterator)active2staticIter, space); - cpSpaceHashQueryRehash(space->activeShapes, (cpSpaceHashQueryFunc)queryFunc, space); - - cpSpaceUnlock(space); - - // If body sleeping is enabled, do that now. - if(space->sleepTimeThreshold != INFINITY){ - cpSpaceProcessComponents(space, dt); - bodies = space->bodies; // rebuilt by processContactComponents() - } - - // Clear out old cached arbiters and dispatch untouch functions - cpHashSetFilter(space->contactSet, (cpHashSetFilterFunc)contactSetFilter, space); - - // Prestep the arbiters. - cpArray *arbiters = space->arbiters; - for(int i=0; inum; i++) - cpArbiterPreStep((cpArbiter *)arbiters->arr[i], dt_inv); - - // Prestep the constraints. - for(int i=0; inum; i++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[i]; - constraint->klass->preStep(constraint, dt, dt_inv); - } - - for(int i=0; ielasticIterations; i++){ - for(int j=0; jnum; j++) - cpArbiterApplyImpulse((cpArbiter *)arbiters->arr[j], 1.0f); - - for(int j=0; jnum; j++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[j]; - constraint->klass->applyImpulse(constraint); - } - } - - // Integrate velocities. - cpFloat damping = cpfpow(1.0f/space->damping, -dt); - for(int i=0; inum; i++){ - cpBody *body = (cpBody *)bodies->arr[i]; - body->velocity_func(body, space->gravity, damping, dt); - } - - for(int i=0; inum; i++) - cpArbiterApplyCachedImpulse((cpArbiter *)arbiters->arr[i]); - - // run the old-style elastic solver if elastic iterations are disabled - cpFloat elasticCoef = (space->elasticIterations ? 0.0f : 1.0f); - - // Run the impulse solver. - for(int i=0; iiterations; i++){ - for(int j=0; jnum; j++) - cpArbiterApplyImpulse((cpArbiter *)arbiters->arr[j], elasticCoef); - - for(int j=0; jnum; j++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[j]; - constraint->klass->applyImpulse(constraint); - } - } - - cpSpaceLock(space); - - // run the post solve callbacks - for(int i=0; inum; i++){ - cpArbiter *arb = (cpArbiter *) arbiters->arr[i]; - - cpCollisionHandler *handler = arb->handler; - handler->postSolve(arb, space, handler->data); - - arb->state = cpArbiterStateNormal; - } - - cpSpaceUnlock(space); - - // Run the post step callbacks - // Loop because post step callbacks may create more post step callbacks - while(space->postStepCallbacks){ - cpHashSet *callbacks = space->postStepCallbacks; - space->postStepCallbacks = NULL; - - cpHashSetEach(callbacks, (cpHashSetIterFunc)postStepCallbackSetIter, space); - cpHashSetFree(callbacks); - } - - // Increment the stamp. - space->stamp++; -} diff --git a/3rdparty/chipmunk-5.3.4/src/cpVect.c b/3rdparty/chipmunk-5.3.4/src/cpVect.c deleted file mode 100644 index 39554e6202..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/cpVect.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#include "chipmunk.h" - -cpFloat -cpvlength(const cpVect v) -{ - return cpfsqrt( cpvdot(v, v) ); -} - -inline cpVect -cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t) -{ - cpFloat omega = cpfacos(cpvdot(v1, v2)); - - if(omega){ - cpFloat denom = 1.0f/cpfsin(omega); - return cpvadd(cpvmult(v1, cpfsin((1.0f - t)*omega)*denom), cpvmult(v2, cpfsin(t*omega)*denom)); - } else { - return v1; - } -} - -cpVect -cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a) -{ - cpFloat angle = cpfacos(cpvdot(v1, v2)); - return cpvslerp(v1, v2, cpfmin(a, angle)/angle); -} - -cpVect -cpvforangle(const cpFloat a) -{ - return cpv(cpfcos(a), cpfsin(a)); -} - -cpFloat -cpvtoangle(const cpVect v) -{ - return cpfatan2(v.y, v.x); -} - -char* -cpvstr(const cpVect v) -{ - static char str[256]; - sprintf(str, "(% .3f, % .3f)", v.x, v.y); - return str; -} diff --git a/3rdparty/chipmunk-5.3.4/src/prime.h b/3rdparty/chipmunk-5.3.4/src/prime.h deleted file mode 100644 index 423ac331e6..0000000000 --- a/3rdparty/chipmunk-5.3.4/src/prime.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -// Used for resizing hash tables. -// Values approximately double. -// http://planetmath.org/encyclopedia/GoodHashTablePrimes.html -static int primes[] = { - 5, - 13, - 23, - 47, - 97, - 193, - 389, - 769, - 1543, - 3079, - 6151, - 12289, - 24593, - 49157, - 98317, - 196613, - 393241, - 786433, - 1572869, - 3145739, - 6291469, - 12582917, - 25165843, - 50331653, - 100663319, - 201326611, - 402653189, - 805306457, - 1610612741, - 0, -}; - -static inline int -next_prime(int n) -{ - int i = 0; - while(n > primes[i]){ - i++; - cpAssert(primes[i], "Tried to resize a hash table to a size greater than 1610612741 O_o"); // realistically this should never happen - } - - return primes[i]; -} diff --git a/3rdparty/expat-2.0.1/COPYING b/3rdparty/expat-2.0.1/COPYING deleted file mode 100644 index 9c86f4d1f2..0000000000 --- a/3rdparty/expat-2.0.1/COPYING +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/3rdparty/expat-2.0.1/Changes b/3rdparty/expat-2.0.1/Changes deleted file mode 100644 index 5eac310a44..0000000000 --- a/3rdparty/expat-2.0.1/Changes +++ /dev/null @@ -1,169 +0,0 @@ -Release 2.0.1 Tue June 5 2007 - - Fixed bugs #1515266, 1515600: The character data handler's calling - of XML_StopParser() was not handled properly; if the parser was - stopped and the handler set to NULL, the parser would segfault. - - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed - some character constants to be ASCII encoded. - - Minor cleanups of the test harness. - - Fixed xmlwf bug #1513566: "out of memory" error on file size zero. - - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call. - - Fixes and improvements for Windows platform: - bugs #1409451, #1476160, 1548182, 1602769, 1717322. - - Build fixes for various platforms: - HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180. - All Unix: #1554618 (refreshed config.sub/config.guess). - #1490371, #1613457: support both, DESTDIR and INSTALL_ROOT, - without relying on GNU-Make specific features. - #1647805: Patched configure.in to work better with Intel compiler. - - Fixes to Makefile.in to have make check work correctly: - bugs #1408143, #1535603, #1536684. - - Added Open Watcom support: patch #1523242. - -Release 2.0.0 Wed Jan 11 2006 - - We no longer use the "check" library for C unit testing; we - always use the (partial) internal implementation of the API. - - Report XML_NS setting via XML_GetFeatureList(). - - Fixed headers for use from C++. - - XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber() - now return unsigned integers. - - Added XML_LARGE_SIZE switch to enable 64-bit integers for - byte indexes and line/column numbers. - - Updated to use libtool 1.5.22 (the most recent). - - Added support for AmigaOS. - - Some mostly minor bug fixes. SF issues include: 1006708, - 1021776, 1023646, 1114960, 1156398, 1221160, 1271642. - -Release 1.95.8 Fri Jul 23 2004 - - Major new feature: suspend/resume. Handlers can now request - that a parse be suspended for later resumption or aborted - altogether. See "Temporarily Stopping Parsing" in the - documentation for more details. - - Some mostly minor bug fixes, but compilation should no - longer generate warnings on most platforms. SF issues - include: 827319, 840173, 846309, 888329, 896188, 923913, - 928113, 961698, 985192. - -Release 1.95.7 Mon Oct 20 2003 - - Fixed enum XML_Status issue (reported on SourceForge many - times), so compilers that are properly picky will be happy. - - Introduced an XMLCALL macro to control the calling - convention used by the Expat API; this macro should be used - to annotate prototypes and definitions of callback - implementations in code compiled with a calling convention - other than the default convention for the host platform. - - Improved ability to build without the configure-generated - expat_config.h header. This is useful for applications - which embed Expat rather than linking in the library. - - Fixed a variety of bugs: see SF issues 458907, 609603, - 676844, 679754, 692878, 692964, 695401, 699323, 699487, - 820946. - - Improved hash table lookups. - - Added more regression tests and improved documentation. - -Release 1.95.6 Tue Jan 28 2003 - - Added XML_FreeContentModel(). - - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). - - Fixed a variety of bugs: see SF issues 615606, 616863, - 618199, 653180, 673791. - - Enhanced the regression test suite. - - Man page improvements: includes SF issue 632146. - -Release 1.95.5 Fri Sep 6 2002 - - Added XML_UseForeignDTD() for improved SAX2 support. - - Added XML_GetFeatureList(). - - Defined XML_Bool type and the values XML_TRUE and XML_FALSE. - - Use an incomplete struct instead of a void* for the parser - (may not retain). - - Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected. - - Finally fixed bug where default handler would report DTD - events that were already handled by another handler. - Initial patch contributed by Darryl Miles. - - Removed unnecessary DllMain() function that caused static - linking into a DLL to be difficult. - - Added VC++ projects for building static libraries. - - Reduced line-length for all source code and headers to be - no longer than 80 characters, to help with AS/400 support. - - Reduced memory copying during parsing (SF patch #600964). - - Fixed a variety of bugs: see SF issues 580793, 434664, - 483514, 580503, 581069, 584041, 584183, 584832, 585537, - 596555, 596678, 598352, 598944, 599715, 600479, 600971. - -Release 1.95.4 Fri Jul 12 2002 - - Added support for VMS, contributed by Craig Berry. See - vms/README.vms for more information. - - Added Mac OS (classic) support, with a makefile for MPW, - contributed by Thomas Wegner and Daryle Walker. - - Added Borland C++ Builder 5 / BCC 5.5 support, contributed - by Patrick McConnell (SF patch #538032). - - Fixed a variety of bugs: see SF issues 441449, 563184, - 564342, 566334, 566901, 569461, 570263, 575168, 579196. - - Made skippedEntityHandler conform to SAX2 (see source comment) - - Re-implemented WFC: Entity Declared from XML 1.0 spec and - added a new error "entity declared in parameter entity": - see SF bug report 569461 and SF patch 578161 - - Re-implemented section 5.1 from XML 1.0 spec: - see SF bug report 570263 and SF patch 578161 - -Release 1.95.3 Mon Jun 3 2002 - - Added a project to the MSVC workspace to create a wchar_t - version of the library; the DLLs are named libexpatw.dll. - - Changed the name of the Windows DLLs from expat.dll to - libexpat.dll; this fixes SF bug #432456. - - Added the XML_ParserReset() API function. - - Fixed XML_SetReturnNSTriplet() to work for element names. - - Made the XML_UNICODE builds usable (thanks, Karl!). - - Allow xmlwf to read from standard input. - - Install a man page for xmlwf on Unix systems. - - Fixed many bugs; see SF bug reports 231864, 461380, 464837, - 466885, 469226, 477667, 484419, 487840, 494749, 496505, - 547350. Other bugs which we can't test as easily may also - have been fixed, especially in the area of build support. - -Release 1.95.2 Fri Jul 27 2001 - - More changes to make MSVC happy with the build; add a single - workspace to support both the library and xmlwf application. - - Added a Windows installer for Windows users; includes - xmlwf.exe. - - Added compile-time constants that can be used to determine the - Expat version - - Removed a lot of GNU-specific dependencies to aide portability - among the various Unix flavors. - - Fix the UTF-8 BOM bug. - - Cleaned up warning messages for several compilers. - - Added the -Wall, -Wstrict-prototypes options for GCC. - -Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000 - - Changes to get expat to build under Microsoft compiler - - Removed all aborts and instead return an UNEXPECTED_STATE error. - - Fixed a bug where a stray '%' in an entity value would cause an - abort. - - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for - finding this oversight. - - Changed default patterns in lib/Makefile.in to fit non-GNU makes - Thanks to robin@unrated.net for reporting and providing an - account to test on. - - The reference had the wrong label for XML_SetStartNamespaceDecl. - Reported by an anonymous user. - -Release 1.95.0 Fri Sep 29 2000 - - XML_ParserCreate_MM - Allows you to set a memory management suite to replace the - standard malloc,realloc, and free. - - XML_SetReturnNSTriplet - If you turn this feature on when namespace processing is in - effect, then qualified, prefixed element and attribute names - are returned as "uri|name|prefix" where '|' is whatever - separator character is used in namespace processing. - - Merged in features from perl-expat - o XML_SetElementDeclHandler - o XML_SetAttlistDeclHandler - o XML_SetXmlDeclHandler - o XML_SetEntityDeclHandler - o StartDoctypeDeclHandler takes 3 additional parameters: - sysid, pubid, has_internal_subset - o Many paired handler setters (like XML_SetElementHandler) - now have corresponding individual handler setters - o XML_GetInputContext for getting the input context of - the current parse position. - - Added reference material - - Packaged into a distribution that builds a sharable library diff --git a/3rdparty/expat-2.0.1/MANIFEST b/3rdparty/expat-2.0.1/MANIFEST deleted file mode 100644 index 8e0cbe108a..0000000000 --- a/3rdparty/expat-2.0.1/MANIFEST +++ /dev/null @@ -1,128 +0,0 @@ -amiga/stdlib.c -amiga/launch.c -amiga/expat_vectors.c -amiga/expat_lib.c -amiga/expat.xml -amiga/README.txt -amiga/Makefile -amiga/include/proto/expat.h -amiga/include/libraries/expat.h -amiga/include/interfaces/expat.h -amiga/include/inline4/expat.h -bcb5/README.txt -bcb5/all_projects.bpg -bcb5/elements.bpf -bcb5/elements.bpr -bcb5/elements.mak -bcb5/expat.bpf -bcb5/expat.bpr -bcb5/expat.mak -bcb5/expat_static.bpf -bcb5/expat_static.bpr -bcb5/expat_static.mak -bcb5/expatw.bpf -bcb5/expatw.bpr -bcb5/expatw.mak -bcb5/expatw_static.bpf -bcb5/expatw_static.bpr -bcb5/expatw_static.mak -bcb5/libexpat_mtd.def -bcb5/libexpatw_mtd.def -bcb5/makefile.mak -bcb5/outline.bpf -bcb5/outline.bpr -bcb5/outline.mak -bcb5/setup.bat -bcb5/xmlwf.bpf -bcb5/xmlwf.bpr -bcb5/xmlwf.mak -doc/expat.png -doc/reference.html -doc/style.css -doc/valid-xhtml10.png -doc/xmlwf.1 -doc/xmlwf.sgml -COPYING -Changes -MANIFEST -Makefile.in -README -configure -configure.in -expat_config.h.in -expat.dsw -conftools/PrintPath -conftools/ac_c_bigendian_cross.m4 -conftools/config.guess -conftools/config.sub -conftools/expat.m4 -conftools/get-version.sh -conftools/install-sh -conftools/libtool.m4 -conftools/ltmain.sh -conftools/mkinstalldirs -examples/elements.c -examples/elements.dsp -examples/outline.c -examples/outline.dsp -lib/Makefile.MPW -lib/amigaconfig.h -lib/ascii.h -lib/asciitab.h -lib/expat.dsp -lib/expat.h -lib/expat_external.h -lib/expat_static.dsp -lib/expatw.dsp -lib/expatw_static.dsp -lib/iasciitab.h -lib/internal.h -lib/latin1tab.h -lib/libexpat.def -lib/libexpatw.def -lib/macconfig.h -lib/nametab.h -lib/utf8tab.h -lib/winconfig.h -lib/xmlparse.c -lib/xmlrole.c -lib/xmlrole.h -lib/xmltok.c -lib/xmltok.h -lib/xmltok_impl.c -lib/xmltok_impl.h -lib/xmltok_ns.c -tests/benchmark/README.txt -tests/benchmark/benchmark.c -tests/benchmark/benchmark.dsp -tests/benchmark/benchmark.dsw -tests/README.txt -tests/chardata.c -tests/chardata.h -tests/minicheck.c -tests/minicheck.h -tests/runtests.c -tests/runtestspp.cpp -tests/xmltest.sh -vms/README.vms -vms/descrip.mms -vms/expat_config.h -win32/MANIFEST.txt -win32/README.txt -win32/expat.iss -xmlwf/codepage.c -xmlwf/codepage.h -xmlwf/ct.c -xmlwf/filemap.h -xmlwf/readfilemap.c -xmlwf/unixfilemap.c -xmlwf/win32filemap.c -xmlwf/xmlfile.c -xmlwf/xmlfile.h -xmlwf/xmlmime.c -xmlwf/xmlmime.h -xmlwf/xmltchar.h -xmlwf/xmlurl.h -xmlwf/xmlwf.c -xmlwf/xmlwf.dsp -xmlwf/xmlwin32url.cxx diff --git a/3rdparty/expat-2.0.1/Makefile.in b/3rdparty/expat-2.0.1/Makefile.in deleted file mode 100644 index 3c502b8747..0000000000 --- a/3rdparty/expat-2.0.1/Makefile.in +++ /dev/null @@ -1,187 +0,0 @@ -################################################################ -# Process this file with top-level configure script to produce Makefile -# -# Copyright 2000 Clark Cooper -# -# This file is part of EXPAT. -# -# EXPAT is free software; you can redistribute it and/or modify it -# under the terms of the License (based on the MIT/X license) contained -# in the file COPYING that comes with this distribution. -# -# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT. -# - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -libdir = @libdir@ -includedir = @includedir@ -man1dir = @mandir@/man1 - -top_builddir = . - - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs - -MANFILE = $(srcdir)/doc/xmlwf.1 -APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h -LIBRARY = libexpat.la - -DESTDIR = $(INSTALL_ROOT) - -default: buildlib xmlwf/xmlwf - -buildlib: $(LIBRARY) - -all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline - -clean: - cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs - cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs - cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs - cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o - cd tests && rm -f chardata.o minicheck.o - rm -rf .libs libexpat.la - rm -f examples/core tests/core xmlwf/core - -clobber: clean - -distclean: clean - rm -f expat_config.h config.status config.log config.cache libtool - rm -f Makefile - -extraclean: distclean - rm -f expat_config.h.in configure - rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4 - -check: tests/runtests tests/runtestspp - tests/runtests - tests/runtestspp - -install: xmlwf/xmlwf installlib - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf - $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) - -installlib: $(LIBRARY) $(APIHEADER) - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) - $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) - for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done - -uninstall: uninstalllib - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf - rm -f $(DESTDIR)$(man1dir)/xmlwf.1 - -uninstalllib: - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY) - rm -f $(DESTDIR)$(includedir)/expat.h - rm -f $(DESTDIR)$(includedir)/expat_external.h - -# for VPATH builds (invoked by configure) -mkdir-init: - @for d in lib xmlwf examples tests ; do \ - (mkdir $$d 2> /dev/null || test 1) ; \ - done - -CC = @CC@ -CXX = @CXX@ -LIBTOOL = @LIBTOOL@ - -INCLUDES = -I$(srcdir)/lib -I. -LDFLAGS = @LDFLAGS@ -CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@ - -### autoconf this? -LTFLAGS = --silent - -COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS) -CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS) -LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ -LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ -LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@ - -LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo -$(LIBRARY): $(LIB_OBJS) - $(LINK_LIB) $(LIB_OBJS) - -lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ - $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h - -lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \ - $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h - -lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ - lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ - lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ - $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h - - -XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o -xmlwf/xmlwf.o: xmlwf/xmlwf.c -xmlwf/xmlfile.o: xmlwf/xmlfile.c -xmlwf/codepage.o: xmlwf/codepage.c -xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c -xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY) - $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY) - -examples/elements.o: examples/elements.c -examples/elements: examples/elements.o $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) - -examples/outline.o: examples/outline.c -examples/outline: examples/outline.o $(LIBRARY) - $(LINK_EXE) $< $(LIBRARY) - -tests/chardata.o: tests/chardata.c tests/chardata.h -tests/minicheck.o: tests/minicheck.c tests/minicheck.h -tests/runtests.o: tests/runtests.c tests/chardata.h -tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY) - $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY) -tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h -tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) - $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) - -tests/xmlts.zip: - wget --output-document=tests/xmlts.zip \ - http://www.w3.org/XML/Test/xmlts20020606.zip - -tests/XML-Test-Suite: tests/xmlts.zip - cd tests && unzip -q xmlts.zip - -run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite - tests/xmltest.sh - -.SUFFIXES: .c .cpp .lo .o - -.cpp.o: - $(CXXCOMPILE) -o $@ -c $< -.c.o: - $(COMPILE) -o $@ -c $< -.c.lo: - $(LTCOMPILE) -o $@ -c $< - -.PHONY: buildlib all \ - clean distclean extraclean maintainer-clean \ - dist distdir \ - install uninstall diff --git a/3rdparty/expat-2.0.1/README b/3rdparty/expat-2.0.1/README deleted file mode 100644 index 8cc900cc2f..0000000000 --- a/3rdparty/expat-2.0.1/README +++ /dev/null @@ -1,137 +0,0 @@ - - Expat, Release 2.0.1 - -This is Expat, a C library for parsing XML, written by James Clark. -Expat is a stream-oriented XML parser. This means that you register -handlers with the parser before starting the parse. These handlers -are called when the parser discovers the associated structures in the -document being parsed. A start tag is an example of the kind of -structures for which you may register handlers. - -Windows users should use the expat_win32bin package, which includes -both precompiled libraries and executables, and source code for -developers. - -Expat is free software. You may copy, distribute, and modify it under -the terms of the License contained in the file COPYING distributed -with this package. This license is the same as the MIT/X Consortium -license. - -Versions of Expat that have an odd minor version (the middle number in -the release above), are development releases and should be considered -as beta software. Releases with even minor version numbers are -intended to be production grade software. - -If you are building Expat from a check-out from the CVS repository, -you need to run a script that generates the configure script using the -GNU autoconf and libtool tools. To do this, you need to have -autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred). -Run the script like this: - - ./buildconf.sh - -Once this has been done, follow the same instructions as for building -from a source distribution. - -To build Expat from a source distribution, you first run the -configuration shell script in the top level distribution directory: - - ./configure - -There are many options which you may provide to configure (which you -can discover by running configure with the --help option). But the -one of most interest is the one that sets the installation directory. -By default, the configure script will set things up to install -libexpat into /usr/local/lib, expat.h into /usr/local/include, and -xmlwf into /usr/local/bin. If, for example, you'd prefer to install -into /home/me/mystuff/lib, /home/me/mystuff/include, and -/home/me/mystuff/bin, you can tell configure about that with: - - ./configure --prefix=/home/me/mystuff - -Another interesting option is to enable 64-bit integer support for -line and column numbers and the over-all byte index: - - ./configure CPPFLAGS=-DXML_LARGE_SIZE - -However, such a modification would be a breaking change to the ABI -and is therefore not recommended for general use - e.g. as part of -a Linux distribution - but rather for builds with special requirements. - -After running the configure script, the "make" command will build -things and "make install" will install things into their proper -location. Have a look at the "Makefile" to learn about additional -"make" options. Note that you need to have write permission into -the directories into which things will be installed. - -If you are interested in building Expat to provide document -information in UTF-16 rather than the default UTF-8, follow these -instructions (after having run "make distclean"): - - 1. For UTF-16 output as unsigned short (and version/error - strings as char), run: - - ./configure CPPFLAGS=-DXML_UNICODE - - For UTF-16 output as wchar_t (incl. version/error strings), - run: - - ./configure CFLAGS="-g -O2 -fshort-wchar" \ - CPPFLAGS=-DXML_UNICODE_WCHAR_T - - 2. Edit the MakeFile, changing: - - LIBRARY = libexpat.la - - to: - - LIBRARY = libexpatw.la - - (Note the additional "w" in the library name.) - - 3. Run "make buildlib" (which builds the library only). - Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la". - - 4. Run "make installlib" (which installs the library only). - Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la". - -Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default -value for DESTDIR, and the rest of the make file using only DESTDIR. -It works as follows: - $ make install DESTDIR=/path/to/image -overrides the in-makefile set DESTDIR, while both - $ INSTALL_ROOT=/path/to/image make install - $ make install INSTALL_ROOT=/path/to/image -use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the -environment, because variable-setting priority is -1) commandline -2) in-makefile -3) environment - -Note for Solaris users: The "ar" command is usually located in -"/usr/ccs/bin", which is not in the default PATH. You will need to -add this to your path for the "make" command, and probably also switch -to GNU make (the "make" found in /usr/ccs/bin does not seem to work -properly -- appearantly it does not understand .PHONY directives). If -you're using ksh or bash, use this command to build: - - PATH=/usr/ccs/bin:$PATH make - -When using Expat with a project using autoconf for configuration, you -can use the probing macro in conftools/expat.m4 to determine how to -include Expat. See the comments at the top of that file for more -information. - -A reference manual is available in the file doc/reference.html in this -distribution. - -The homepage for this project is http://www.libexpat.org/. There -are links there to connect you to the bug reports page. If you need -to report a bug when you don't have access to a browser, you may also -send a bug report by email to expat-bugs@mail.libexpat.org. - -Discussion related to the direction of future expat development takes -place on expat-discuss@mail.libexpat.org. Archives of this list and -other Expat-related lists may be found at: - - http://mail.libexpat.org/mailman/listinfo/ diff --git a/3rdparty/expat-2.0.1/amiga/Makefile b/3rdparty/expat-2.0.1/amiga/Makefile deleted file mode 100644 index 8993ff9745..0000000000 --- a/3rdparty/expat-2.0.1/amiga/Makefile +++ /dev/null @@ -1,187 +0,0 @@ -# -# Makefile for AmigaOS -# - -.PHONY: help all staticlib sharedlib check clean install - -vpath %.c ../lib ../examples ../xmlwf ../tests -vpath %.h ../lib ../tests - - -# -# Set these for SDK installation. -# -tooldir = SDK:Local/C -staticlibdir = SDK:Local/clib2/lib -staticincludedir = SDK:Local/clib2/include -sharedlibdir = SDK:Local/Libs -sharedincludedir = SDK:Local/common/include - - -ifeq ($(MAKECMDGOALS), staticlib) - DESTDIR = lib -else - DESTDIR = libs -endif - -STATICLIB = $(DESTDIR)/libexpat.a -SHAREDLIB = $(DESTDIR)/expat.library - -XMLWF = $(DESTDIR)/xmlwf -ELEMENTS = $(DESTDIR)/elements -OUTLINE = $(DESTDIR)/outline -RUNTESTS = $(DESTDIR)/runtests -BENCHMARK = $(DESTDIR)/benchmark - - -help: - @echo "Requires:" - @echo " AmigaOS 4.0" - @echo " SDK 51.22" - @echo " clib2 1.202" - @echo "" - @echo "Targets:" - @echo " all - make expat libraries, xmlwf, examples and run test suite" - @echo " install - install expat libraries and tools into SDK" - -all: - -makedir force lib libs - $(MAKE) staticlib - $(MAKE) sharedlib - -staticlib: $(STATICLIB) $(XMLWF) $(ELEMENTS) $(OUTLINE) $(RUNTESTS) $(BENCHMARK) check - @echo done - -sharedlib: $(SHAREDLIB) $(XMLWF) $(ELEMENTS) $(OUTLINE) $(RUNTESTS) $(BENCHMARK) check - @echo done - -check: - $(RUNTESTS) - -clean: - -delete lib/#?.o quiet - -delete libs/#?.o quiet - -install: - copy libs/xmlwf $(tooldir) quiet - copy /lib/expat.h /lib/expat_external.h $(staticincludedir) quiet - copy lib/libexpat.a $(staticlibdir) quiet - copy libs/expat.library $(sharedlibdir) quiet - copy include $(sharedincludedir) quiet all - - -CC = gcc -LIBTOOL = ar -STRIP = strip - -LDFLAGS = -LIBS = -CFLAGS = -DNDEBUG -O2 -LTFLAGS = -crs -STRIPFLAGS = -R.comment -LAUNCH = - -ifeq ($(MAKECMDGOALS), staticlib) - CFLAGS += -mcrt=clib2 - LDFLAGS += -mcrt=clib2 - LIBS += $(STATICLIB) - INCLUDES = -I../lib -endif - -ifeq ($(MAKECMDGOALS), sharedlib) - CFLAGS += -mcrt=newlib -D__USE_INLINE__ - LDFLAGS += -mcrt=newlib - INCLUDES = -I. -Iinclude -Iinclude/libraries -I../lib - LAUNCH = $(DESTDIR)/launch.o -endif - - -COMPILE = $(CC) $(CFLAGS) $(INCLUDES) -c - -LINK = $(CC) $(LDFLAGS) -o $@ - - -$(STATICLIB): $(DESTDIR)/xmlparse.o $(DESTDIR)/xmltok.o $(DESTDIR)/xmlrole.o - $(LIBTOOL) $(LTFLAGS) $@ $^ - -$(DESTDIR)/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \ - expat_external.h internal.h amigaconfig.h - $(COMPILE) $< -o $@ - -$(DESTDIR)/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \ - internal.h amigaconfig.h - $(COMPILE) $< -o $@ - -$(DESTDIR)/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \ - iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \ - expat_external.h internal.h amigaconfig.h - $(COMPILE) $< -o $@ - - -$(SHAREDLIB): $(DESTDIR)/expat_lib.o $(DESTDIR)/expat_vectors.o $(DESTDIR)/stdlib.o lib/libexpat.a - $(LINK) -nostartfiles -nostdlib -o $@ $^ - -$(DESTDIR)/expat_lib.o: expat_lib.c - $(COMPILE) $< -o $@ - -$(DESTDIR)/expat_vectors.o: expat_vectors.c - $(COMPILE) $< -o $@ - -$(DESTDIR)/stdlib.o: stdlib.c - $(COMPILE) $< -o $@ - -$(LAUNCH): launch.c - $(COMPILE) $< -o $@ - - -$(XMLWF): $(DESTDIR)/xmlwf.o $(DESTDIR)/xmlfile.o $(DESTDIR)/codepage.o $(DESTDIR)/readfilemap.o $(LAUNCH) - $(LINK) $^ $(LIBS) - $(STRIP) $(STRIPFLAGS) $@ - -$(DESTDIR)/xmlwf.o: xmlwf.c - $(COMPILE) $< -o $@ - -$(DESTDIR)/xmlfile.o: xmlfile.c - $(COMPILE) $< -o $@ - -$(DESTDIR)/codepage.o: codepage.c - $(COMPILE) $< -o $@ - -$(DESTDIR)/readfilemap.o: readfilemap.c - $(COMPILE) $< -o $@ - - -$(ELEMENTS): $(DESTDIR)/elements.o $(LAUNCH) - $(LINK) $^ $(LIBS) - $(STRIP) $(STRIPFLAGS) $@ - -$(DESTDIR)/elements.o: elements.c - $(COMPILE) $< -o $@ - - -$(OUTLINE): $(DESTDIR)/outline.o $(LAUNCH) - $(LINK) $^ $(LIBS) - $(STRIP) $(STRIPFLAGS) $@ - -$(DESTDIR)/outline.o: outline.c - $(COMPILE) $< -o $@ - - -$(RUNTESTS): $(DESTDIR)/runtests.o $(DESTDIR)/chardata.o $(DESTDIR)/minicheck.o $(LAUNCH) - $(LINK) $^ $(LIBS) - -$(DESTDIR)/chardata.o: chardata.c chardata.h - $(COMPILE) $< -o $@ - -$(DESTDIR)/minicheck.o: minicheck.c minicheck.h - $(COMPILE) $< -o $@ - -$(DESTDIR)/runtests.o: runtests.c chardata.h - $(COMPILE) $< -o $@ - - -$(BENCHMARK): $(DESTDIR)/benchmark.o $(LAUNCH) - $(LINK) $^ $(LIBS) -lm - -$(DESTDIR)/benchmark.o: benchmark/benchmark.c - $(COMPILE) $< -o $@ diff --git a/3rdparty/expat-2.0.1/amiga/README.txt b/3rdparty/expat-2.0.1/amiga/README.txt deleted file mode 100644 index b106620935..0000000000 --- a/3rdparty/expat-2.0.1/amiga/README.txt +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY -======= -This is a port of expat for AmigaOS 4.0 which includes the -SDK, some XML tools and the libraries. - -Both static and shared library versions are supported. - -The static library version is limited to clib2 although it should -be possible to use newlib with the appopriate compile options. - -The shared library version is based on the work of Fredrik Wikstrom -and is currently limited to PPC only. - - -HISTORY -======= -4.2 - updated to correspond to Expat 2.0.1 release - - bumped copyright banners and versions - - simplified amigaconfig.h - - updated include/libraries/expat.h file - - modified launch.c to use contructor/deconstructor - - removed need for amiga_main() from expat utilities - -4.1 - fixed memory freeing bug in shared library version - - now allocates shared memory - -4.0 - updated for corresponding Expat 2.0 release - - some minor CVS related changes - -3.1 - removed obsolete sfd file - - added library description xml file - - refactored Makefile - - removed extraneous VARARGS68K keywords - - reworked default memory handling functions in shared lib - - updated amigaconfig.h - -3.0 - initial release - - based on expat 1.95.8 - - -BUILDING -======== -To build expat.library, xmlwf tool, examples and run the test suite, -simply type 'make all' in the amiga subdirectory. - -The test suite will compile and run for both the static and shared -library versions. - - -INSTALLATION -============ -To install both static and shared versions of expat into the -AmigaOS SDK type 'make install' in the amiga subdirectory. - - -CONFIGURATION -============= -You may want to edit the lib/amigaconfig.h file to remove -DTD and/or XML namespace support if they are not required by your -specific application for a smaller and faster implementation. - - -TO DO -===== -- wide character support (UTF-16) -- provide 68k backwards compatibility diff --git a/3rdparty/expat-2.0.1/amiga/expat.xml b/3rdparty/expat-2.0.1/amiga/expat.xml deleted file mode 100644 index 3b4e73eaf4..0000000000 --- a/3rdparty/expat-2.0.1/amiga/expat.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - libraries/expat.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3rdparty/expat-2.0.1/amiga/expat_lib.c b/3rdparty/expat-2.0.1/amiga/expat_lib.c deleted file mode 100644 index 039c48d213..0000000000 --- a/3rdparty/expat-2.0.1/amiga/expat_lib.c +++ /dev/null @@ -1,233 +0,0 @@ -/* -** Copyright (c) 2001-2007 Expat maintainers. -** -** Permission is hereby granted, free of charge, to any person obtaining -** a copy of this software and associated documentation files (the -** "Software"), to deal in the Software without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Software, and to -** permit persons to whom the Software is furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -#define LIBNAME "expat.library" -#define LIBPRI 0 -#define VERSION 4 -#define REVISION 2 -#define VSTRING "expat.library 4.2 (2.6.2007)" /* dd.mm.yyyy */ - - -static const char* __attribute__((used)) verstag = "\0$VER: " VSTRING; - - -struct ExpatBase { - struct Library libNode; - uint16 pad; - BPTR SegList; -}; - - -struct ExpatBase * libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys); -uint32 libObtain (struct LibraryManagerInterface *Self); -uint32 libRelease (struct LibraryManagerInterface *Self); -struct ExpatBase *libOpen (struct LibraryManagerInterface *Self, uint32 version); -BPTR libClose (struct LibraryManagerInterface *Self); -BPTR libExpunge (struct LibraryManagerInterface *Self); - - -static APTR lib_manager_vectors[] = { - libObtain, - libRelease, - NULL, - NULL, - libOpen, - libClose, - libExpunge, - NULL, - (APTR)-1, -}; - - -static struct TagItem lib_managerTags[] = { - { MIT_Name, (uint32)"__library" }, - { MIT_VectorTable, (uint32)lib_manager_vectors }, - { MIT_Version, 1 }, - { TAG_END, 0 } -}; - - -extern void *main_vectors[]; - -static struct TagItem lib_mainTags[] = { - { MIT_Name, (uint32)"main" }, - { MIT_VectorTable, (uint32)main_vectors }, - { MIT_Version, 1 }, - { TAG_END, 0 } -}; - - -static APTR libInterfaces[] = { - lib_managerTags, - lib_mainTags, - NULL -}; - - -static struct TagItem libCreateTags[] = { - { CLT_DataSize, sizeof(struct ExpatBase) }, - { CLT_InitFunc, (uint32)libInit }, - { CLT_Interfaces, (uint32)libInterfaces }, - { TAG_END, 0 } -}; - - -static struct Resident __attribute__((used)) lib_res = { - RTC_MATCHWORD, // rt_MatchWord - &lib_res, // rt_MatchTag - &lib_res+1, // rt_EndSkip - RTF_NATIVE | RTF_AUTOINIT, // rt_Flags - VERSION, // rt_Version - NT_LIBRARY, // rt_Type - LIBPRI, // rt_Pri - LIBNAME, // rt_Name - VSTRING, // rt_IdString - libCreateTags // rt_Init -}; - - -struct Library *DOSLib = 0; -struct Library *UtilityBase = 0; - -struct ExecIFace *IExec = 0; -struct DOSIFace *IDOS = 0; -struct UtilityIFace *IUtility = 0; - - -void _start() -{ -} - - -struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys) -{ - libBase->libNode.lib_Node.ln_Type = NT_LIBRARY; - libBase->libNode.lib_Node.ln_Pri = LIBPRI; - libBase->libNode.lib_Node.ln_Name = LIBNAME; - libBase->libNode.lib_Flags = LIBF_SUMUSED|LIBF_CHANGED; - libBase->libNode.lib_Version = VERSION; - libBase->libNode.lib_Revision = REVISION; - libBase->libNode.lib_IdString = VSTRING; - libBase->SegList = seglist; - - IExec = ISys; - - DOSLib = OpenLibrary("dos.library", 51); - if ( DOSLib != 0 ) { - IDOS = (struct DOSIFace *)GetInterface(DOSLib, "main", 1, NULL); - if ( IDOS != 0 ) { - UtilityBase = OpenLibrary("utility.library", 51); - if ( UtilityBase != 0 ) { - IUtility = (struct UtilityIFace*)GetInterface(UtilityBase, "main", 1, NULL); - if ( IUtility != 0 ) { - return libBase; - } - - CloseLibrary(UtilityBase); - } - - DropInterface((struct Interface *)IDOS); - } - - CloseLibrary(DOSLib); - } - - return NULL; -} - - -uint32 libObtain( struct LibraryManagerInterface *Self ) -{ - ++Self->Data.RefCount; - return Self->Data.RefCount; -} - - -uint32 libRelease( struct LibraryManagerInterface *Self ) -{ - --Self->Data.RefCount; - return Self->Data.RefCount; -} - - -struct ExpatBase *libOpen( struct LibraryManagerInterface *Self, uint32 version ) -{ - struct ExpatBase *libBase; - - libBase = (struct ExpatBase *)Self->Data.LibBase; - - ++libBase->libNode.lib_OpenCnt; - libBase->libNode.lib_Flags &= ~LIBF_DELEXP; - - return libBase; -} - - -BPTR libClose( struct LibraryManagerInterface *Self ) -{ - struct ExpatBase *libBase; - - libBase = (struct ExpatBase *)Self->Data.LibBase; - - --libBase->libNode.lib_OpenCnt; - if ( libBase->libNode.lib_OpenCnt ) { - return 0; - } - - if ( libBase->libNode.lib_Flags & LIBF_DELEXP ) { - return (BPTR)Self->LibExpunge(); - } - else { - return 0; - } -} - - -BPTR libExpunge( struct LibraryManagerInterface *Self ) -{ - struct ExpatBase *libBase; - BPTR result = 0; - - libBase = (struct ExpatBase *)Self->Data.LibBase; - - if (libBase->libNode.lib_OpenCnt == 0) { - Remove(&libBase->libNode.lib_Node); - - result = libBase->SegList; - - DropInterface((struct Interface *)IUtility); - CloseLibrary(UtilityBase); - DropInterface((struct Interface *)IDOS); - CloseLibrary(DOSLib); - - DeleteLibrary(&libBase->libNode); - } - else { - libBase->libNode.lib_Flags |= LIBF_DELEXP; - } - - return result; -} diff --git a/3rdparty/expat-2.0.1/amiga/expat_vectors.c b/3rdparty/expat-2.0.1/amiga/expat_vectors.c deleted file mode 100644 index 14fb3be595..0000000000 --- a/3rdparty/expat-2.0.1/amiga/expat_vectors.c +++ /dev/null @@ -1,505 +0,0 @@ -/* -** Copyright (c) 2001-2007 Expat maintainers. -** -** Permission is hereby granted, free of charge, to any person obtaining -** a copy of this software and associated documentation files (the -** "Software"), to deal in the Software without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Software, and to -** permit persons to whom the Software is furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -extern uint32 _Expat_Obtain(struct ExpatIFace *); -extern uint32 _Expat_Release(struct ExpatIFace *); -extern XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace *, const XML_Char * encodingName); -extern XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace *, const XML_Char * encodingName, XML_Char nsSep); -extern XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace *, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator); -extern XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace *, XML_Parser parser, const XML_Char * context, const XML_Char * encoding); -extern void _Expat_XML_ParserFree(struct ExpatIFace *, XML_Parser parser); -extern enum XML_Status _Expat_XML_Parse(struct ExpatIFace *, XML_Parser parser, const char * s, int len, int isFinal); -extern enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace *, XML_Parser parser, int len, int isFinal); -extern void * _Expat_XML_GetBuffer(struct ExpatIFace *, XML_Parser parser, int len); -extern void _Expat_XML_SetStartElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start); -extern void _Expat_XML_SetEndElementHandler(struct ExpatIFace *, XML_Parser parser, XML_EndElementHandler end); -extern void _Expat_XML_SetElementHandler(struct ExpatIFace *, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); -extern void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace *, XML_Parser parser, XML_CharacterDataHandler handler); -extern void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace *, XML_Parser parser, XML_ProcessingInstructionHandler handler); -extern void _Expat_XML_SetCommentHandler(struct ExpatIFace *, XML_Parser parser, XML_CommentHandler handler); -extern void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start); -extern void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_EndCdataSectionHandler end); -extern void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace *, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); -extern void _Expat_XML_SetDefaultHandler(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler); -extern void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace *, XML_Parser parser, XML_DefaultHandler handler); -extern void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace *, XML_Parser parser, XML_ExternalEntityRefHandler handler); -extern void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace *, XML_Parser parser, void * arg); -extern void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace *, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data); -extern void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start); -extern void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndNamespaceDeclHandler end); -extern void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); -extern void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_XmlDeclHandler handler); -extern void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start); -extern void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EndDoctypeDeclHandler end); -extern void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); -extern void _Expat_XML_SetElementDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_ElementDeclHandler eldecl); -extern void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_AttlistDeclHandler attdecl); -extern void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_EntityDeclHandler handler); -extern void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_UnparsedEntityDeclHandler handler); -extern void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace *, XML_Parser parser, XML_NotationDeclHandler handler); -extern void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace *, XML_Parser parser, XML_NotStandaloneHandler handler); -extern enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace *, XML_Parser parser); -extern const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace *, enum XML_Error code); -extern long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace *, XML_Parser parser); -extern int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace *, XML_Parser parser); -extern int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace *, XML_Parser parser); -extern int _Expat_XML_GetCurrentByteCount(struct ExpatIFace *, XML_Parser parser); -extern const char * _Expat_XML_GetInputContext(struct ExpatIFace *, XML_Parser parser, int * offset, int * size); -extern void _Expat_XML_SetUserData(struct ExpatIFace *, XML_Parser parser, void * userData); -extern void _Expat_XML_DefaultCurrent(struct ExpatIFace *, XML_Parser parser); -extern void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace *, XML_Parser parser); -extern enum XML_Status _Expat_XML_SetBase(struct ExpatIFace *, XML_Parser parser, const XML_Char * base); -extern const XML_Char * _Expat_XML_GetBase(struct ExpatIFace *, XML_Parser parser); -extern int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace *, XML_Parser parser); -extern int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace *, XML_Parser parser); -extern enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding); -extern int _Expat_XML_SetParamEntityParsing(struct ExpatIFace *, XML_Parser parser, enum XML_ParamEntityParsing parsing); -extern void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace *, XML_Parser parser, int do_nst); -extern const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace *); -extern XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace *); -extern XML_Bool _Expat_XML_ParserReset(struct ExpatIFace *, XML_Parser parser, const XML_Char * encoding); -extern void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace *, XML_Parser parser, XML_SkippedEntityHandler handler); -extern enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace *, XML_Parser parser, XML_Bool useDTD); -extern const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace *); -extern enum XML_Status _Expat_XML_StopParser(struct ExpatIFace *, XML_Parser parser, XML_Bool resumable); -extern enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace *, XML_Parser parser); -extern void _Expat_XML_GetParsingStatus(struct ExpatIFace *, XML_Parser parser, XML_ParsingStatus * status); -extern void _Expat_XML_FreeContentModel(struct ExpatIFace *, XML_Parser parser, XML_Content * model); -extern void * _Expat_XML_MemMalloc(struct ExpatIFace *, XML_Parser parser, size_t size); -extern void * _Expat_XML_MemRealloc(struct ExpatIFace *, XML_Parser parser, void * ptr, size_t size); -extern void _Expat_XML_MemFree(struct ExpatIFace *, XML_Parser parser, void * ptr); - - -CONST APTR main_vectors[] = -{ - _Expat_Obtain, - _Expat_Release, - NULL, - NULL, - _Expat_XML_ParserCreate, - _Expat_XML_ParserCreateNS, - _Expat_XML_ParserCreate_MM, - _Expat_XML_ExternalEntityParserCreate, - _Expat_XML_ParserFree, - _Expat_XML_Parse, - _Expat_XML_ParseBuffer, - _Expat_XML_GetBuffer, - _Expat_XML_SetStartElementHandler, - _Expat_XML_SetEndElementHandler, - _Expat_XML_SetElementHandler, - _Expat_XML_SetCharacterDataHandler, - _Expat_XML_SetProcessingInstructionHandler, - _Expat_XML_SetCommentHandler, - _Expat_XML_SetStartCdataSectionHandler, - _Expat_XML_SetEndCdataSectionHandler, - _Expat_XML_SetCdataSectionHandler, - _Expat_XML_SetDefaultHandler, - _Expat_XML_SetDefaultHandlerExpand, - _Expat_XML_SetExternalEntityRefHandler, - _Expat_XML_SetExternalEntityRefHandlerArg, - _Expat_XML_SetUnknownEncodingHandler, - _Expat_XML_SetStartNamespaceDeclHandler, - _Expat_XML_SetEndNamespaceDeclHandler, - _Expat_XML_SetNamespaceDeclHandler, - _Expat_XML_SetXmlDeclHandler, - _Expat_XML_SetStartDoctypeDeclHandler, - _Expat_XML_SetEndDoctypeDeclHandler, - _Expat_XML_SetDoctypeDeclHandler, - _Expat_XML_SetElementDeclHandler, - _Expat_XML_SetAttlistDeclHandler, - _Expat_XML_SetEntityDeclHandler, - _Expat_XML_SetUnparsedEntityDeclHandler, - _Expat_XML_SetNotationDeclHandler, - _Expat_XML_SetNotStandaloneHandler, - _Expat_XML_GetErrorCode, - _Expat_XML_ErrorString, - _Expat_XML_GetCurrentByteIndex, - _Expat_XML_GetCurrentLineNumber, - _Expat_XML_GetCurrentColumnNumber, - _Expat_XML_GetCurrentByteCount, - _Expat_XML_GetInputContext, - _Expat_XML_SetUserData, - _Expat_XML_DefaultCurrent, - _Expat_XML_UseParserAsHandlerArg, - _Expat_XML_SetBase, - _Expat_XML_GetBase, - _Expat_XML_GetSpecifiedAttributeCount, - _Expat_XML_GetIdAttributeIndex, - _Expat_XML_SetEncoding, - _Expat_XML_SetParamEntityParsing, - _Expat_XML_SetReturnNSTriplet, - _Expat_XML_ExpatVersion, - _Expat_XML_ExpatVersionInfo, - _Expat_XML_ParserReset, - _Expat_XML_SetSkippedEntityHandler, - _Expat_XML_UseForeignDTD, - _Expat_XML_GetFeatureList, - _Expat_XML_StopParser, - _Expat_XML_ResumeParser, - _Expat_XML_GetParsingStatus, - _Expat_XML_FreeContentModel, - _Expat_XML_MemMalloc, - _Expat_XML_MemRealloc, - _Expat_XML_MemFree, - (APTR)-1 -}; - -uint32 _Expat_Obtain(struct ExpatIFace *Self) -{ - return ++Self->Data.RefCount; -} - -uint32 _Expat_Release(struct ExpatIFace *Self) -{ - return --Self->Data.RefCount; -} - -XML_Parser _Expat_XML_ParserCreate(struct ExpatIFace * Self, const XML_Char *encoding) -{ - return XML_ParserCreate(encoding); -} - -XML_Parser _Expat_XML_ParserCreateNS(struct ExpatIFace * Self, const XML_Char *encoding, XML_Char nsSep) -{ - return XML_ParserCreateNS(encoding, nsSep); -} - -XML_Parser _Expat_XML_ParserCreate_MM(struct ExpatIFace * Self, const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator) -{ - return XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator); -} - -XML_Parser _Expat_XML_ExternalEntityParserCreate(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *context, const XML_Char *encoding) -{ - return XML_ExternalEntityParserCreate(parser, context, encoding); -} - -void _Expat_XML_ParserFree(struct ExpatIFace *Self, XML_Parser parser) -{ - XML_ParserFree(parser); -} - -enum XML_Status _Expat_XML_Parse(struct ExpatIFace * Self, XML_Parser parser, const char * s, int len, int isFinal) -{ - return XML_Parse(parser, s, len, isFinal); -} - -enum XML_Status _Expat_XML_ParseBuffer(struct ExpatIFace * Self, XML_Parser parser, int len, int isFinal) -{ - return XML_ParseBuffer(parser, len, isFinal); -} - -void * _Expat_XML_GetBuffer(struct ExpatIFace * Self, XML_Parser parser, int len) -{ - return XML_GetBuffer(parser, len); -} - -void _Expat_XML_SetStartElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start) -{ - XML_SetStartElementHandler(parser, start); -} - -void _Expat_XML_SetEndElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndElementHandler end) -{ - XML_SetEndElementHandler(parser, end); -} - -void _Expat_XML_SetElementHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) -{ - XML_SetElementHandler(parser, start, end); -} - -void _Expat_XML_SetCharacterDataHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CharacterDataHandler handler) -{ - XML_SetCharacterDataHandler(parser, handler); -} - -void _Expat_XML_SetProcessingInstructionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ProcessingInstructionHandler handler) -{ - XML_SetProcessingInstructionHandler(parser, handler); -} - -void _Expat_XML_SetCommentHandler(struct ExpatIFace * Self, XML_Parser parser, XML_CommentHandler handler) -{ - XML_SetCommentHandler(parser, handler); -} - -void _Expat_XML_SetStartCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start) -{ - XML_SetStartCdataSectionHandler(parser, start); -} - -void _Expat_XML_SetEndCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndCdataSectionHandler end) -{ - XML_SetEndCdataSectionHandler(parser, end); -} - -void _Expat_XML_SetCdataSectionHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) -{ - XML_SetCdataSectionHandler(parser, start, end); -} - -void _Expat_XML_SetDefaultHandler(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler) -{ - XML_SetDefaultHandler(parser, handler); -} - -void _Expat_XML_SetDefaultHandlerExpand(struct ExpatIFace * Self, XML_Parser parser, XML_DefaultHandler handler) -{ - XML_SetDefaultHandlerExpand(parser, handler); -} - -void _Expat_XML_SetExternalEntityRefHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ExternalEntityRefHandler handler) -{ - XML_SetExternalEntityRefHandler(parser, handler); -} - -void _Expat_XML_SetExternalEntityRefHandlerArg(struct ExpatIFace * Self, XML_Parser parser, void * arg) -{ - XML_SetExternalEntityRefHandlerArg(parser, arg); -} - -void _Expat_XML_SetUnknownEncodingHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data) -{ - XML_SetUnknownEncodingHandler(parser, handler, data); -} - -void _Expat_XML_SetStartNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start) -{ - XML_SetStartNamespaceDeclHandler(parser, start); -} - -void _Expat_XML_SetEndNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndNamespaceDeclHandler end) -{ - XML_SetEndNamespaceDeclHandler(parser, end); -} - -void _Expat_XML_SetNamespaceDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) -{ - XML_SetNamespaceDeclHandler(parser, start, end); -} - -void _Expat_XML_SetXmlDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_XmlDeclHandler handler) -{ - XML_SetXmlDeclHandler(parser, handler); -} - -void _Expat_XML_SetStartDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start) -{ - XML_SetStartDoctypeDeclHandler(parser, start); -} - -void _Expat_XML_SetEndDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EndDoctypeDeclHandler end) -{ - XML_SetEndDoctypeDeclHandler(parser, end); -} - -void _Expat_XML_SetDoctypeDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) -{ - XML_SetDoctypeDeclHandler(parser, start, end); -} - -void _Expat_XML_SetElementDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_ElementDeclHandler eldecl) -{ - XML_SetElementDeclHandler(parser, eldecl); -} - -void _Expat_XML_SetAttlistDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_AttlistDeclHandler attdecl) -{ - XML_SetAttlistDeclHandler(parser, attdecl); -} - -void _Expat_XML_SetEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_EntityDeclHandler handler) -{ - XML_SetEntityDeclHandler(parser, handler); -} - -void _Expat_XML_SetUnparsedEntityDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler) -{ - XML_SetUnparsedEntityDeclHandler(parser, handler); -} - -void _Expat_XML_SetNotationDeclHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotationDeclHandler handler) -{ - XML_SetNotationDeclHandler(parser, handler); -} - -void _Expat_XML_SetNotStandaloneHandler(struct ExpatIFace * Self, XML_Parser parser, XML_NotStandaloneHandler handler) -{ - XML_SetNotStandaloneHandler(parser, handler); -} - -enum XML_Error _Expat_XML_GetErrorCode(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetErrorCode(parser); -} - -const XML_LChar * _Expat_XML_ErrorString(struct ExpatIFace * Self, enum XML_Error code) -{ - return XML_ErrorString(code); -} - -long _Expat_XML_GetCurrentByteIndex(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetCurrentByteIndex(parser); -} - -int _Expat_XML_GetCurrentLineNumber(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetCurrentLineNumber(parser); -} - -int _Expat_XML_GetCurrentColumnNumber(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetCurrentColumnNumber(parser); -} - -int _Expat_XML_GetCurrentByteCount(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetCurrentByteCount(parser); -} - -const char * _Expat_XML_GetInputContext(struct ExpatIFace * Self, XML_Parser parser, int * offset, int * size) -{ - return XML_GetInputContext(parser, offset, size); -} - -void _Expat_XML_SetUserData(struct ExpatIFace * Self, XML_Parser parser, void * userData) -{ - XML_SetUserData(parser, userData); -} - -void _Expat_XML_DefaultCurrent(struct ExpatIFace * Self, XML_Parser parser) -{ - XML_DefaultCurrent(parser); -} - -void _Expat_XML_UseParserAsHandlerArg(struct ExpatIFace * Self, XML_Parser parser) -{ - XML_UseParserAsHandlerArg(parser); -} - -enum XML_Status _Expat_XML_SetBase(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *p) -{ - return XML_SetBase(parser, p); -} - -const XML_Char * _Expat_XML_GetBase(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetBase(parser); -} - -int _Expat_XML_GetSpecifiedAttributeCount(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetSpecifiedAttributeCount(parser); -} - -int _Expat_XML_GetIdAttributeIndex(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_GetIdAttributeIndex(parser); -} - -enum XML_Status _Expat_XML_SetEncoding(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding) -{ - return XML_SetEncoding(parser, encoding); -} - -int _Expat_XML_SetParamEntityParsing(struct ExpatIFace * Self, XML_Parser parser, enum XML_ParamEntityParsing parsing) -{ - return XML_SetParamEntityParsing(parser, parsing); -} - -void _Expat_XML_SetReturnNSTriplet(struct ExpatIFace * Self, XML_Parser parser, int do_nst) -{ - XML_SetReturnNSTriplet(parser, do_nst); -} - -const XML_LChar * _Expat_XML_ExpatVersion(struct ExpatIFace * Self) -{ - return XML_ExpatVersion(); -} - -XML_Expat_Version _Expat_XML_ExpatVersionInfo(struct ExpatIFace * Self) -{ - return XML_ExpatVersionInfo(); -} - -XML_Bool _Expat_XML_ParserReset(struct ExpatIFace * Self, XML_Parser parser, const XML_Char *encoding) -{ - return XML_ParserReset(parser, encoding); -} - -void _Expat_XML_SetSkippedEntityHandler(struct ExpatIFace * Self, XML_Parser parser, XML_SkippedEntityHandler handler) -{ - XML_SetSkippedEntityHandler(parser, handler); -} - -enum XML_Error _Expat_XML_UseForeignDTD(struct ExpatIFace * Self, XML_Parser parser, XML_Bool useDTD) -{ - return XML_UseForeignDTD(parser, useDTD); -} - -const XML_Feature * _Expat_XML_GetFeatureList(struct ExpatIFace * Self) -{ - return XML_GetFeatureList(); -} - -enum XML_Status _Expat_XML_StopParser(struct ExpatIFace * Self, XML_Parser parser, XML_Bool resumable) -{ - return XML_StopParser(parser, resumable); -} - -enum XML_Status _Expat_XML_ResumeParser(struct ExpatIFace * Self, XML_Parser parser) -{ - return XML_ResumeParser(parser); -} - -void _Expat_XML_GetParsingStatus(struct ExpatIFace * Self, XML_Parser parser, XML_ParsingStatus * status) -{ - XML_GetParsingStatus(parser, status); -} - -void _Expat_XML_FreeContentModel(struct ExpatIFace * Self, XML_Parser parser, XML_Content * model) -{ - XML_FreeContentModel(parser, model); -} - -void * _Expat_XML_MemMalloc(struct ExpatIFace * Self, XML_Parser parser, size_t size) -{ - return XML_MemMalloc(parser, size); -} - -void * _Expat_XML_MemRealloc(struct ExpatIFace * Self, XML_Parser parser, void * ptr, size_t size) -{ - XML_MemRealloc(parser, ptr, size); -} - -void _Expat_XML_MemFree(struct ExpatIFace * Self, XML_Parser parser, void * ptr) -{ - XML_MemFree(parser, ptr); -} diff --git a/3rdparty/expat-2.0.1/amiga/include/inline4/expat.h b/3rdparty/expat-2.0.1/amiga/include/inline4/expat.h deleted file mode 100644 index 1e3105d94e..0000000000 --- a/3rdparty/expat-2.0.1/amiga/include/inline4/expat.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef INLINE4_EXPAT_H -#define INLINE4_EXPAT_H - -/* -** This file was auto generated by idltool 51.6. -** -** It provides compatibility to OS3 style library -** calls by substituting functions. -** -** Do not edit manually. -*/ - -#ifndef EXEC_TYPES_H -#include -#endif -#ifndef EXEC_EXEC_H -#include -#endif -#ifndef EXEC_INTERFACES_H -#include -#endif - -#ifndef LIBRARIES_EXPAT_H -#include -#endif - -/* Inline macros for Interface "main" */ -#define XML_ParserCreate(encodingName) IExpat->XML_ParserCreate(encodingName) -#define XML_ParserCreateNS(encodingName, nsSep) IExpat->XML_ParserCreateNS(encodingName, nsSep) -#define XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) IExpat->XML_ParserCreate_MM(encoding, memsuite, namespaceSeparator) -#define XML_ExternalEntityParserCreate(parser, context, encoding) IExpat->XML_ExternalEntityParserCreate(parser, context, encoding) -#define XML_ParserFree(parser) IExpat->XML_ParserFree(parser) -#define XML_Parse(parser, s, len, isFinal) IExpat->XML_Parse(parser, s, len, isFinal) -#define XML_ParseBuffer(parser, len, isFinal) IExpat->XML_ParseBuffer(parser, len, isFinal) -#define XML_GetBuffer(parser, len) IExpat->XML_GetBuffer(parser, len) -#define XML_SetStartElementHandler(parser, start) IExpat->XML_SetStartElementHandler(parser, start) -#define XML_SetEndElementHandler(parser, end) IExpat->XML_SetEndElementHandler(parser, end) -#define XML_SetElementHandler(parser, start, end) IExpat->XML_SetElementHandler(parser, start, end) -#define XML_SetCharacterDataHandler(parser, handler) IExpat->XML_SetCharacterDataHandler(parser, handler) -#define XML_SetProcessingInstructionHandler(parser, handler) IExpat->XML_SetProcessingInstructionHandler(parser, handler) -#define XML_SetCommentHandler(parser, handler) IExpat->XML_SetCommentHandler(parser, handler) -#define XML_SetStartCdataSectionHandler(parser, start) IExpat->XML_SetStartCdataSectionHandler(parser, start) -#define XML_SetEndCdataSectionHandler(parser, end) IExpat->XML_SetEndCdataSectionHandler(parser, end) -#define XML_SetCdataSectionHandler(parser, start, end) IExpat->XML_SetCdataSectionHandler(parser, start, end) -#define XML_SetDefaultHandler(parser, handler) IExpat->XML_SetDefaultHandler(parser, handler) -#define XML_SetDefaultHandlerExpand(parser, handler) IExpat->XML_SetDefaultHandlerExpand(parser, handler) -#define XML_SetExternalEntityRefHandler(parser, handler) IExpat->XML_SetExternalEntityRefHandler(parser, handler) -#define XML_SetExternalEntityRefHandlerArg(parser, arg) IExpat->XML_SetExternalEntityRefHandlerArg(parser, arg) -#define XML_SetUnknownEncodingHandler(parser, handler, data) IExpat->XML_SetUnknownEncodingHandler(parser, handler, data) -#define XML_SetStartNamespaceDeclHandler(parser, start) IExpat->XML_SetStartNamespaceDeclHandler(parser, start) -#define XML_SetEndNamespaceDeclHandler(parser, end) IExpat->XML_SetEndNamespaceDeclHandler(parser, end) -#define XML_SetNamespaceDeclHandler(parser, start, end) IExpat->XML_SetNamespaceDeclHandler(parser, start, end) -#define XML_SetXmlDeclHandler(parser, handler) IExpat->XML_SetXmlDeclHandler(parser, handler) -#define XML_SetStartDoctypeDeclHandler(parser, start) IExpat->XML_SetStartDoctypeDeclHandler(parser, start) -#define XML_SetEndDoctypeDeclHandler(parser, end) IExpat->XML_SetEndDoctypeDeclHandler(parser, end) -#define XML_SetDoctypeDeclHandler(parser, start, end) IExpat->XML_SetDoctypeDeclHandler(parser, start, end) -#define XML_SetElementDeclHandler(parser, eldecl) IExpat->XML_SetElementDeclHandler(parser, eldecl) -#define XML_SetAttlistDeclHandler(parser, attdecl) IExpat->XML_SetAttlistDeclHandler(parser, attdecl) -#define XML_SetEntityDeclHandler(parser, handler) IExpat->XML_SetEntityDeclHandler(parser, handler) -#define XML_SetUnparsedEntityDeclHandler(parser, handler) IExpat->XML_SetUnparsedEntityDeclHandler(parser, handler) -#define XML_SetNotationDeclHandler(parser, handler) IExpat->XML_SetNotationDeclHandler(parser, handler) -#define XML_SetNotStandaloneHandler(parser, handler) IExpat->XML_SetNotStandaloneHandler(parser, handler) -#define XML_GetErrorCode(parser) IExpat->XML_GetErrorCode(parser) -#define XML_ErrorString(code) IExpat->XML_ErrorString(code) -#define XML_GetCurrentByteIndex(parser) IExpat->XML_GetCurrentByteIndex(parser) -#define XML_GetCurrentLineNumber(parser) IExpat->XML_GetCurrentLineNumber(parser) -#define XML_GetCurrentColumnNumber(parser) IExpat->XML_GetCurrentColumnNumber(parser) -#define XML_GetCurrentByteCount(parser) IExpat->XML_GetCurrentByteCount(parser) -#define XML_GetInputContext(parser, offset, size) IExpat->XML_GetInputContext(parser, offset, size) -#define XML_SetUserData(parser, userData) IExpat->XML_SetUserData(parser, userData) -#define XML_DefaultCurrent(parser) IExpat->XML_DefaultCurrent(parser) -#define XML_UseParserAsHandlerArg(parser) IExpat->XML_UseParserAsHandlerArg(parser) -#define XML_SetBase(parser, base) IExpat->XML_SetBase(parser, base) -#define XML_GetBase(parser) IExpat->XML_GetBase(parser) -#define XML_GetSpecifiedAttributeCount(parser) IExpat->XML_GetSpecifiedAttributeCount(parser) -#define XML_GetIdAttributeIndex(parser) IExpat->XML_GetIdAttributeIndex(parser) -#define XML_SetEncoding(parser, encoding) IExpat->XML_SetEncoding(parser, encoding) -#define XML_SetParamEntityParsing(parser, parsing) IExpat->XML_SetParamEntityParsing(parser, parsing) -#define XML_SetReturnNSTriplet(parser, do_nst) IExpat->XML_SetReturnNSTriplet(parser, do_nst) -#define XML_ExpatVersion() IExpat->XML_ExpatVersion() -#define XML_ExpatVersionInfo() IExpat->XML_ExpatVersionInfo() -#define XML_ParserReset(parser, encoding) IExpat->XML_ParserReset(parser, encoding) -#define XML_SetSkippedEntityHandler(parser, handler) IExpat->XML_SetSkippedEntityHandler(parser, handler) -#define XML_UseForeignDTD(parser, useDTD) IExpat->XML_UseForeignDTD(parser, useDTD) -#define XML_GetFeatureList() IExpat->XML_GetFeatureList() -#define XML_StopParser(parser, resumable) IExpat->XML_StopParser(parser, resumable) -#define XML_ResumeParser(parser) IExpat->XML_ResumeParser(parser) -#define XML_GetParsingStatus(parser, status) IExpat->XML_GetParsingStatus(parser, status) -#define XML_FreeContentModel(parser, model) IExpat->XML_FreeContentModel(parser, model) -#define XML_MemMalloc(parser, size) IExpat->XML_MemMalloc(parser, size) -#define XML_MemRealloc(parser, ptr, size) IExpat->XML_MemRealloc(parser, ptr, size) -#define XML_MemFree(parser, ptr) IExpat->XML_MemFree(parser, ptr) - -#endif /* INLINE4_EXPAT_H */ diff --git a/3rdparty/expat-2.0.1/amiga/include/interfaces/expat.h b/3rdparty/expat-2.0.1/amiga/include/interfaces/expat.h deleted file mode 100644 index e9bdf4aa12..0000000000 --- a/3rdparty/expat-2.0.1/amiga/include/interfaces/expat.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef EXPAT_INTERFACE_DEF_H -#define EXPAT_INTERFACE_DEF_H - -/* -** This file was machine generated by idltool 51.6. -** Do not edit -*/ - -#ifndef EXEC_TYPES_H -#include -#endif -#ifndef EXEC_EXEC_H -#include -#endif -#ifndef EXEC_INTERFACES_H -#include -#endif - -#ifndef LIBRARIES_EXPAT_H -#include -#endif - -struct ExpatIFace -{ - struct InterfaceData Data; - - uint32 APICALL (*Obtain)(struct ExpatIFace *Self); - uint32 APICALL (*Release)(struct ExpatIFace *Self); - void APICALL (*Expunge)(struct ExpatIFace *Self); - struct Interface * APICALL (*Clone)(struct ExpatIFace *Self); - XML_Parser APICALL (*XML_ParserCreate)(struct ExpatIFace *Self, const XML_Char * encodingName); - XML_Parser APICALL (*XML_ParserCreateNS)(struct ExpatIFace *Self, const XML_Char * encodingName, XML_Char nsSep); - XML_Parser APICALL (*XML_ParserCreate_MM)(struct ExpatIFace *Self, const XML_Char * encoding, const XML_Memory_Handling_Suite * memsuite, const XML_Char * namespaceSeparator); - XML_Parser APICALL (*XML_ExternalEntityParserCreate)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * context, const XML_Char * encoding); - void APICALL (*XML_ParserFree)(struct ExpatIFace *Self, XML_Parser parser); - enum XML_Status APICALL (*XML_Parse)(struct ExpatIFace *Self, XML_Parser parser, const char * s, int len, int isFinal); - enum XML_Status APICALL (*XML_ParseBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len, int isFinal); - void * APICALL (*XML_GetBuffer)(struct ExpatIFace *Self, XML_Parser parser, int len); - void APICALL (*XML_SetStartElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start); - void APICALL (*XML_SetEndElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndElementHandler end); - void APICALL (*XML_SetElementHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); - void APICALL (*XML_SetCharacterDataHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CharacterDataHandler handler); - void APICALL (*XML_SetProcessingInstructionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ProcessingInstructionHandler handler); - void APICALL (*XML_SetCommentHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_CommentHandler handler); - void APICALL (*XML_SetStartCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start); - void APICALL (*XML_SetEndCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndCdataSectionHandler end); - void APICALL (*XML_SetCdataSectionHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end); - void APICALL (*XML_SetDefaultHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler); - void APICALL (*XML_SetDefaultHandlerExpand)(struct ExpatIFace *Self, XML_Parser parser, XML_DefaultHandler handler); - void APICALL (*XML_SetExternalEntityRefHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ExternalEntityRefHandler handler); - void APICALL (*XML_SetExternalEntityRefHandlerArg)(struct ExpatIFace *Self, XML_Parser parser, void * arg); - void APICALL (*XML_SetUnknownEncodingHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnknownEncodingHandler handler, void * data); - void APICALL (*XML_SetStartNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start); - void APICALL (*XML_SetEndNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndNamespaceDeclHandler end); - void APICALL (*XML_SetNamespaceDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); - void APICALL (*XML_SetXmlDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_XmlDeclHandler handler); - void APICALL (*XML_SetStartDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start); - void APICALL (*XML_SetEndDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EndDoctypeDeclHandler end); - void APICALL (*XML_SetDoctypeDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end); - void APICALL (*XML_SetElementDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_ElementDeclHandler eldecl); - void APICALL (*XML_SetAttlistDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_AttlistDeclHandler attdecl); - void APICALL (*XML_SetEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_EntityDeclHandler handler); - void APICALL (*XML_SetUnparsedEntityDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_UnparsedEntityDeclHandler handler); - void APICALL (*XML_SetNotationDeclHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotationDeclHandler handler); - void APICALL (*XML_SetNotStandaloneHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_NotStandaloneHandler handler); - enum XML_Error APICALL (*XML_GetErrorCode)(struct ExpatIFace *Self, XML_Parser parser); - const XML_LChar * APICALL (*XML_ErrorString)(struct ExpatIFace *Self, enum XML_Error code); - long APICALL (*XML_GetCurrentByteIndex)(struct ExpatIFace *Self, XML_Parser parser); - int APICALL (*XML_GetCurrentLineNumber)(struct ExpatIFace *Self, XML_Parser parser); - int APICALL (*XML_GetCurrentColumnNumber)(struct ExpatIFace *Self, XML_Parser parser); - int APICALL (*XML_GetCurrentByteCount)(struct ExpatIFace *Self, XML_Parser parser); - const char * APICALL (*XML_GetInputContext)(struct ExpatIFace *Self, XML_Parser parser, int * offset, int * size); - void APICALL (*XML_SetUserData)(struct ExpatIFace *Self, XML_Parser parser, void * userData); - void APICALL (*XML_DefaultCurrent)(struct ExpatIFace *Self, XML_Parser parser); - void APICALL (*XML_UseParserAsHandlerArg)(struct ExpatIFace *Self, XML_Parser parser); - enum XML_Status APICALL (*XML_SetBase)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * base); - const XML_Char * APICALL (*XML_GetBase)(struct ExpatIFace *Self, XML_Parser parser); - int APICALL (*XML_GetSpecifiedAttributeCount)(struct ExpatIFace *Self, XML_Parser parser); - int APICALL (*XML_GetIdAttributeIndex)(struct ExpatIFace *Self, XML_Parser parser); - enum XML_Status APICALL (*XML_SetEncoding)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding); - int APICALL (*XML_SetParamEntityParsing)(struct ExpatIFace *Self, XML_Parser parser, enum XML_ParamEntityParsing parsing); - void APICALL (*XML_SetReturnNSTriplet)(struct ExpatIFace *Self, XML_Parser parser, int do_nst); - const XML_LChar * APICALL (*XML_ExpatVersion)(struct ExpatIFace *Self); - XML_Expat_Version APICALL (*XML_ExpatVersionInfo)(struct ExpatIFace *Self); - XML_Bool APICALL (*XML_ParserReset)(struct ExpatIFace *Self, XML_Parser parser, const XML_Char * encoding); - void APICALL (*XML_SetSkippedEntityHandler)(struct ExpatIFace *Self, XML_Parser parser, XML_SkippedEntityHandler handler); - enum XML_Error APICALL (*XML_UseForeignDTD)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool useDTD); - const XML_Feature * APICALL (*XML_GetFeatureList)(struct ExpatIFace *Self); - enum XML_Status APICALL (*XML_StopParser)(struct ExpatIFace *Self, XML_Parser parser, XML_Bool resumable); - enum XML_Status APICALL (*XML_ResumeParser)(struct ExpatIFace *Self, XML_Parser parser); - void APICALL (*XML_GetParsingStatus)(struct ExpatIFace *Self, XML_Parser parser, XML_ParsingStatus * status); - void APICALL (*XML_FreeContentModel)(struct ExpatIFace *Self, XML_Parser parser, XML_Content * model); - void * APICALL (*XML_MemMalloc)(struct ExpatIFace *Self, XML_Parser parser, size_t size); - void * APICALL (*XML_MemRealloc)(struct ExpatIFace *Self, XML_Parser parser, void * ptr, size_t size); - void APICALL (*XML_MemFree)(struct ExpatIFace *Self, XML_Parser parser, void * ptr); -}; - -#endif /* EXPAT_INTERFACE_DEF_H */ diff --git a/3rdparty/expat-2.0.1/amiga/include/libraries/expat.h b/3rdparty/expat-2.0.1/amiga/include/libraries/expat.h deleted file mode 100644 index 1b57387c7b..0000000000 --- a/3rdparty/expat-2.0.1/amiga/include/libraries/expat.h +++ /dev/null @@ -1,566 +0,0 @@ -#ifndef LIBRARIES_EXPAT_H -#define LIBRARIES_EXPAT_H - -/* -** Copyright (c) 2001-2007 Expat maintainers. -** -** Permission is hereby granted, free of charge, to any person obtaining -** a copy of this software and associated documentation files (the -** "Software"), to deal in the Software without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Software, and to -** permit persons to whom the Software is furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -/****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __GNUC__ - #ifdef __PPC__ - #pragma pack(2) - #endif -#elif defined(__VBCC__) - #pragma amiga-align -#endif - -/****************************************************************************/ - - -#include - -#ifndef XMLCALL -#define XMLCALL -#endif - -typedef char XML_Char; -typedef char XML_LChar; -typedef long XML_Index; -typedef unsigned long XML_Size; - -struct XML_ParserStruct; -typedef struct XML_ParserStruct *XML_Parser; - -typedef unsigned char XML_Bool; -#define XML_TRUE ((XML_Bool) 1) -#define XML_FALSE ((XML_Bool) 0) - -enum XML_Status { - XML_STATUS_ERROR = 0, -#define XML_STATUS_ERROR XML_STATUS_ERROR - XML_STATUS_OK = 1, -#define XML_STATUS_OK XML_STATUS_OK - XML_STATUS_SUSPENDED = 2, -#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED -}; - -enum XML_Error { - XML_ERROR_NONE, - XML_ERROR_NO_MEMORY, - XML_ERROR_SYNTAX, - XML_ERROR_NO_ELEMENTS, - XML_ERROR_INVALID_TOKEN, - XML_ERROR_UNCLOSED_TOKEN, - XML_ERROR_PARTIAL_CHAR, - XML_ERROR_TAG_MISMATCH, - XML_ERROR_DUPLICATE_ATTRIBUTE, - XML_ERROR_JUNK_AFTER_DOC_ELEMENT, - XML_ERROR_PARAM_ENTITY_REF, - XML_ERROR_UNDEFINED_ENTITY, - XML_ERROR_RECURSIVE_ENTITY_REF, - XML_ERROR_ASYNC_ENTITY, - XML_ERROR_BAD_CHAR_REF, - XML_ERROR_BINARY_ENTITY_REF, - XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, - XML_ERROR_MISPLACED_XML_PI, - XML_ERROR_UNKNOWN_ENCODING, - XML_ERROR_INCORRECT_ENCODING, - XML_ERROR_UNCLOSED_CDATA_SECTION, - XML_ERROR_EXTERNAL_ENTITY_HANDLING, - XML_ERROR_NOT_STANDALONE, - XML_ERROR_UNEXPECTED_STATE, - XML_ERROR_ENTITY_DECLARED_IN_PE, - XML_ERROR_FEATURE_REQUIRES_XML_DTD, - XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, - XML_ERROR_UNBOUND_PREFIX, - XML_ERROR_UNDECLARING_PREFIX, - XML_ERROR_INCOMPLETE_PE, - XML_ERROR_XML_DECL, - XML_ERROR_TEXT_DECL, - XML_ERROR_PUBLICID, - XML_ERROR_SUSPENDED, - XML_ERROR_NOT_SUSPENDED, - XML_ERROR_ABORTED, - XML_ERROR_FINISHED, - XML_ERROR_SUSPEND_PE, - XML_ERROR_RESERVED_PREFIX_XML, - XML_ERROR_RESERVED_PREFIX_XMLNS, - XML_ERROR_RESERVED_NAMESPACE_URI -}; - -enum XML_Content_Type { - XML_CTYPE_EMPTY = 1, - XML_CTYPE_ANY, - XML_CTYPE_MIXED, - XML_CTYPE_NAME, - XML_CTYPE_CHOICE, - XML_CTYPE_SEQ -}; - -enum XML_Content_Quant { - XML_CQUANT_NONE, - XML_CQUANT_OPT, - XML_CQUANT_REP, - XML_CQUANT_PLUS -}; - -typedef struct XML_cp XML_Content; - -struct XML_cp { - enum XML_Content_Type type; - enum XML_Content_Quant quant; - XML_Char * name; - unsigned int numchildren; - XML_Content * children; -}; - - -typedef void (*XML_ElementDeclHandler) (void *userData, - const XML_Char *name, - XML_Content *model); - -void -XML_SetElementDeclHandler(XML_Parser parser, - XML_ElementDeclHandler eldecl); - -typedef void (*XML_AttlistDeclHandler) ( - void *userData, - const XML_Char *elname, - const XML_Char *attname, - const XML_Char *att_type, - const XML_Char *dflt, - int isrequired); - -void -XML_SetAttlistDeclHandler(XML_Parser parser, - XML_AttlistDeclHandler attdecl); - -typedef void (*XML_XmlDeclHandler) (void *userData, - const XML_Char *version, - const XML_Char *encoding, - int standalone); - -void -XML_SetXmlDeclHandler(XML_Parser parser, - XML_XmlDeclHandler xmldecl); - - -typedef struct { - void *(*malloc_fcn)(size_t size); - void *(*realloc_fcn)(void *ptr, size_t size); - void (*free_fcn)(void *ptr); -} XML_Memory_Handling_Suite; - -XML_Parser -XML_ParserCreate(const XML_Char *encoding); - -XML_Parser -XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); - - -XML_Parser -XML_ParserCreate_MM(const XML_Char *encoding, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *namespaceSeparator); - -XML_Bool -XML_ParserReset(XML_Parser parser, const XML_Char *encoding); - -typedef void (*XML_StartElementHandler) (void *userData, - const XML_Char *name, - const XML_Char **atts); - -typedef void (*XML_EndElementHandler) (void *userData, - const XML_Char *name); - - -typedef void (*XML_CharacterDataHandler) (void *userData, - const XML_Char *s, - int len); - -typedef void (*XML_ProcessingInstructionHandler) ( - void *userData, - const XML_Char *target, - const XML_Char *data); - -typedef void (*XML_CommentHandler) (void *userData, - const XML_Char *data); - -typedef void (*XML_StartCdataSectionHandler) (void *userData); -typedef void (*XML_EndCdataSectionHandler) (void *userData); - -typedef void (*XML_DefaultHandler) (void *userData, - const XML_Char *s, - int len); - -typedef void (*XML_StartDoctypeDeclHandler) ( - void *userData, - const XML_Char *doctypeName, - const XML_Char *sysid, - const XML_Char *pubid, - int has_internal_subset); - -typedef void (*XML_EndDoctypeDeclHandler)(void *userData); - -typedef void (*XML_EntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -void -XML_SetEntityDeclHandler(XML_Parser parser, - XML_EntityDeclHandler handler); - -typedef void (*XML_UnparsedEntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -typedef void (*XML_NotationDeclHandler) ( - void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -typedef void (*XML_StartNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix, - const XML_Char *uri); - -typedef void (*XML_EndNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix); - -typedef int (*XML_NotStandaloneHandler) (void *userData); - -typedef int (*XML_ExternalEntityRefHandler) ( - XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -typedef void (*XML_SkippedEntityHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity); - -typedef struct { - int map[256]; - void *data; - int (*convert)(void *data, const char *s); - void (*release)(void *data); -} XML_Encoding; - -typedef int (*XML_UnknownEncodingHandler) ( - void *encodingHandlerData, - const XML_Char *name, - XML_Encoding *info); - -void -XML_SetElementHandler(XML_Parser parser, - XML_StartElementHandler start, - XML_EndElementHandler end); - -void -XML_SetStartElementHandler(XML_Parser parser, - XML_StartElementHandler handler); - -void -XML_SetEndElementHandler(XML_Parser parser, - XML_EndElementHandler handler); - -void -XML_SetCharacterDataHandler(XML_Parser parser, - XML_CharacterDataHandler handler); - -void -XML_SetProcessingInstructionHandler(XML_Parser parser, - XML_ProcessingInstructionHandler handler); -void -XML_SetCommentHandler(XML_Parser parser, - XML_CommentHandler handler); - -void -XML_SetCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start, - XML_EndCdataSectionHandler end); - -void -XML_SetStartCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start); - -void -XML_SetEndCdataSectionHandler(XML_Parser parser, - XML_EndCdataSectionHandler end); - -void -XML_SetDefaultHandler(XML_Parser parser, - XML_DefaultHandler handler); - -void -XML_SetDefaultHandlerExpand(XML_Parser parser, - XML_DefaultHandler handler); - -void -XML_SetDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start, - XML_EndDoctypeDeclHandler end); - -void -XML_SetStartDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start); - -void -XML_SetEndDoctypeDeclHandler(XML_Parser parser, - XML_EndDoctypeDeclHandler end); - -void -XML_SetUnparsedEntityDeclHandler(XML_Parser parser, - XML_UnparsedEntityDeclHandler handler); - -void -XML_SetNotationDeclHandler(XML_Parser parser, - XML_NotationDeclHandler handler); - -void -XML_SetNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start, - XML_EndNamespaceDeclHandler end); - -void -XML_SetStartNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start); - -void -XML_SetEndNamespaceDeclHandler(XML_Parser parser, - XML_EndNamespaceDeclHandler end); - -void -XML_SetNotStandaloneHandler(XML_Parser parser, - XML_NotStandaloneHandler handler); - -void -XML_SetExternalEntityRefHandler(XML_Parser parser, - XML_ExternalEntityRefHandler handler); - -void -XML_SetExternalEntityRefHandlerArg(XML_Parser parser, - void *arg); - -void -XML_SetSkippedEntityHandler(XML_Parser parser, - XML_SkippedEntityHandler handler); - -void -XML_SetUnknownEncodingHandler(XML_Parser parser, - XML_UnknownEncodingHandler handler, - void *encodingHandlerData); - -void -XML_DefaultCurrent(XML_Parser parser); - -void -XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); - -void -XML_SetUserData(XML_Parser parser, void *userData); - -#define XML_GetUserData(parser) (*(void **)(parser)) - -enum XML_Status -XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); - -void -XML_UseParserAsHandlerArg(XML_Parser parser); - -enum XML_Error -XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); - - -enum XML_Status -XML_SetBase(XML_Parser parser, const XML_Char *base); - -const XML_Char * -XML_GetBase(XML_Parser parser); - -int -XML_GetSpecifiedAttributeCount(XML_Parser parser); - -int -XML_GetIdAttributeIndex(XML_Parser parser); - -enum XML_Status -XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); - -void * -XML_GetBuffer(XML_Parser parser, int len); - -enum XML_Status -XML_ParseBuffer(XML_Parser parser, int len, int isFinal); - -enum XML_Status -XML_StopParser(XML_Parser parser, XML_Bool resumable); - -enum XML_Status -XML_ResumeParser(XML_Parser parser); - -enum XML_Parsing { - XML_INITIALIZED, - XML_PARSING, - XML_FINISHED, - XML_SUSPENDED -}; - -typedef struct { - enum XML_Parsing parsing; - XML_Bool finalBuffer; -} XML_ParsingStatus; - -void -XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); - -XML_Parser -XML_ExternalEntityParserCreate(XML_Parser parser, - const XML_Char *context, - const XML_Char *encoding); - -enum XML_ParamEntityParsing { - XML_PARAM_ENTITY_PARSING_NEVER, - XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, - XML_PARAM_ENTITY_PARSING_ALWAYS -}; - -int -XML_SetParamEntityParsing(XML_Parser parser, - enum XML_ParamEntityParsing parsing); - -enum XML_Error -XML_GetErrorCode(XML_Parser parser); - -int XML_GetCurrentLineNumber(XML_Parser parser); -int XML_GetCurrentColumnNumber(XML_Parser parser); -long XML_GetCurrentByteIndex(XML_Parser parser); - -int -XML_GetCurrentByteCount(XML_Parser parser); - -const char * -XML_GetInputContext(XML_Parser parser, - int *offset, - int *size); - -#define XML_GetErrorLineNumber XML_GetCurrentLineNumber -#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber -#define XML_GetErrorByteIndex XML_GetCurrentByteIndex - -void -XML_FreeContentModel(XML_Parser parser, XML_Content *model); - -void * -XML_MemMalloc(XML_Parser parser, size_t size); - -void * -XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); - -void -XML_MemFree(XML_Parser parser, void *ptr); - -void -XML_ParserFree(XML_Parser parser); - -const XML_LChar * -XML_ErrorString(enum XML_Error code); - -const XML_LChar * -XML_ExpatVersion(void); - -typedef struct { - int major; - int minor; - int micro; -} XML_Expat_Version; - -XML_Expat_Version -XML_ExpatVersionInfo(void); - -enum XML_FeatureEnum { - XML_FEATURE_END = 0, - XML_FEATURE_UNICODE, - XML_FEATURE_UNICODE_WCHAR_T, - XML_FEATURE_DTD, - XML_FEATURE_CONTEXT_BYTES, - XML_FEATURE_MIN_SIZE, - XML_FEATURE_SIZEOF_XML_CHAR, - XML_FEATURE_SIZEOF_XML_LCHAR, - XML_FEATURE_NS, - XML_FEATURE_LARGE_SIZE -}; - -typedef struct { - enum XML_FeatureEnum feature; - const XML_LChar *name; - long int value; -} XML_Feature; - -const XML_Feature * -XML_GetFeatureList(void); - - -#define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 0 -#define XML_MICRO_VERSION 1 - - -/****************************************************************************/ - -#ifdef __GNUC__ - #ifdef __PPC__ - #pragma pack() - #endif -#elif defined(__VBCC__) - #pragma default-align -#endif - -#ifdef __cplusplus -} -#endif - -/****************************************************************************/ - -#endif /* EXPAT_EXPAT_H */ diff --git a/3rdparty/expat-2.0.1/amiga/include/proto/expat.h b/3rdparty/expat-2.0.1/amiga/include/proto/expat.h deleted file mode 100644 index 90bf62c46e..0000000000 --- a/3rdparty/expat-2.0.1/amiga/include/proto/expat.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef PROTO_EXPAT_H -#define PROTO_EXPAT_H - -#ifndef LIBRARIES_EXPAT_H -#include -#endif - -/****************************************************************************/ - -#ifndef __NOLIBBASE__ - #ifndef __USE_BASETYPE__ - extern struct Library * ExpatBase; - #else - extern struct Library * ExpatBase; - #endif /* __USE_BASETYPE__ */ -#endif /* __NOLIBBASE__ */ - -/****************************************************************************/ - -#ifdef __amigaos4__ - #include - #ifdef __USE_INLINE__ - #include - #endif /* __USE_INLINE__ */ - #ifndef CLIB_EXPAT_PROTOS_H - #define CLIB_EXPAT_PROTOS_H 1 - #endif /* CLIB_EXPAT_PROTOS_H */ - #ifndef __NOGLOBALIFACE__ - extern struct ExpatIFace *IExpat; - #endif /* __NOGLOBALIFACE__ */ -#else /* __amigaos4__ */ - #ifndef CLIB_EXPAT_PROTOS_H - #include - #endif /* CLIB_EXPAT_PROTOS_H */ - #if defined(__GNUC__) - #ifndef __PPC__ - #include - #else - #include - #endif /* __PPC__ */ - #elif defined(__VBCC__) - #ifndef __PPC__ - #include - #endif /* __PPC__ */ - #else - #include - #endif /* __GNUC__ */ -#endif /* __amigaos4__ */ - -/****************************************************************************/ - -#endif /* PROTO_EXPAT_H */ diff --git a/3rdparty/expat-2.0.1/amiga/launch.c b/3rdparty/expat-2.0.1/amiga/launch.c deleted file mode 100644 index 73e526e7c0..0000000000 --- a/3rdparty/expat-2.0.1/amiga/launch.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -** Copyright (c) 2001-2007 Expat maintainers. -** -** Permission is hereby granted, free of charge, to any person obtaining -** a copy of this software and associated documentation files (the -** "Software"), to deal in the Software without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Software, and to -** permit persons to whom the Software is furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include - -struct Library* ExpatBase = 0; -struct ExpatIFace* IExpat = 0; - - -void setup() __attribute__((constructor)); -void cleanup() __attribute__((destructor)); - - -void setup() -{ - ExpatBase = OpenLibrary("expat.library", 4); - IExpat = (struct ExpatIFace*)GetInterface(ExpatBase, "main", 1, NULL); - if ( IExpat == 0 ) { - DebugPrintF("Can't open expat.library\n"); - } -} - - -void cleanup() -{ - if ( IExpat != 0 ) { - DropInterface((struct Interface*)IExpat); - IExpat = 0; - } - - if ( ExpatBase != 0 ) { - CloseLibrary(ExpatBase); - ExpatBase = 0; - } -} diff --git a/3rdparty/expat-2.0.1/amiga/stdlib.c b/3rdparty/expat-2.0.1/amiga/stdlib.c deleted file mode 100644 index 8c31f23bd6..0000000000 --- a/3rdparty/expat-2.0.1/amiga/stdlib.c +++ /dev/null @@ -1,109 +0,0 @@ -/* -** Copyright (c) 2001-2007 Expat maintainers. -** -** Permission is hereby granted, free of charge, to any person obtaining -** a copy of this software and associated documentation files (the -** "Software"), to deal in the Software without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Software, and to -** permit persons to whom the Software is furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include -#include -#include -#include - -void * malloc (size_t len) -{ - uint32 size = sizeof(uint32) + len; - - uint32 *mem = AllocMem(size, MEMF_SHARED); - if ( mem != 0 ) { - *mem = size; - ++mem; - } - - return mem; -} - - -void * realloc (void * mem, size_t len2) -{ - if ( mem == 0 ) { - return malloc(len2); - } - - if ( len2 == 0 ) { - free(mem); - return 0; - } - - void * new_mem = malloc(len2); - if ( new_mem == 0 ) { - return 0; - } - - uint32 mem_size = *(((uint32*)mem) - 1); - CopyMem(mem, new_mem, mem_size); - free(mem); - - return new_mem; -} - - -void free (void * mem) -{ - if ( mem != 0 ) { - uint32 * size_ptr = ((uint32*)mem) - 1; - FreeMem(size_ptr, *size_ptr); - } -} - - -int memcmp (const void * a, const void * b, size_t len) -{ - size_t i; - int diff; - - for ( i = 0; i < len; ++i ) { - diff = *((uint8 *)a++) - *((uint8 *)b++); - if ( diff ) { - return diff; - } - } - - return 0; -} - - -void * memcpy (void * t, const void * a, size_t len) -{ - CopyMem((APTR)a, t, len); - return t; -} - - -void * memmove (void * t1, const void * t2, size_t len) -{ - MoveMem((APTR)t2, t1, len); - return t1; -} - - -void * memset (void * t, int c, size_t len) -{ - return SetMem(t, c, len); -} diff --git a/3rdparty/expat-2.0.1/bcb5/README.txt b/3rdparty/expat-2.0.1/bcb5/README.txt deleted file mode 100644 index 99dc23ca85..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/README.txt +++ /dev/null @@ -1,87 +0,0 @@ - - Using a Borland compiler product - -The files in this directory support using both the free Borland command-line -compiler tools and the Borland C++ Builder IDE. The project files have been -tested with both versions 5 and 6 of the C++ Builder product. - - Using the free BCC32 command line compiler - -After downloading and installing the free C++ Builder commandline version, -perform the following steps (assuming it was installed under C:\Borland\BCC55): - -1) Add "C:\Borland\BCC55\BIN" to your path -2) Set the environment variable BCB to "C:\Borland\BCC55". -3) edit makefile.mak: enable or comment out the appropriate commands under - clean & distclean, depending on whether your OS can use deltree /y or - del /s/f/q. - -After that, you should simply cd to the bcb5 directory in your Expat directory -tree (same structure as CVS) and run "make all" or just "make". - - Naming - -The libraries have the base name "libexpat" followed optionally by an "s" -(static) or a "w" (unicode version), then an underscore and optionally -"mt" (multi-threaded) and "d" (dynamic RTL). - -To change the name of the library a project file produces, edit the project -option source (see step 1 under Unicode below) and change the name contained in -the PROJECT tag. In a make file, change the value assigned to the PROJECT -variable. Also, the LIBRARY entry in the .def file has to be changed to -correspond to the new executable name. - - - Unicode Considerations - -There are no facilities in the BCB 5 GUI to create a unicode-enabled -application. Fortunately, it is not hard to do by hand. - -1. The startup .obj system file must be changed to the unicode version. - Go to Project|Edit Option Source, and scroll down to the ALLOBJ tag. Change - c0x32.obj to c0x32w.obj. Editing this file can be quirky, but usually the - following kludge will make the change stick. Close and save the file - (CTRL-F4) then open the options dialog (CTRL-Shift-F11), then click OK on - the dialog immediately without changing anything in it. If this doesn't work, - you will have to close the project completely and edit the .bpr file by hand. - - If you are using a make file, just change the startup .obj file assigned - to the ALLOBJ variable. - -2. Add the macro define XML_UNICODE_WCHAR_T. In the GUI that goes in the options - dialog, Directories/Conditionals tab, in the Conditional define box. In a - make file, put it in the USERDEFINES variable. - -3. Of course, your code has to be written for unicode. As a start, the "main" - function is called "wmain". The tchar macros are an interesting way to - write code that can easily switch between unicode and utf-8. If these macros - are used, then simply adding the conditional define _UNICODE as well as - XML_UNICODE_WCHAR_T will bring in the unicode versions of the tchar macros. - Otherwise the utf-8 versions are used. xmlwf uses its own versions of the - tchar macros which are switched on and off by the XML_UNICODE macro, which - itself is set by the XML_UNICODE_WCHAR_T define. - - Threading - -The libexpat libraries are all built to link with the multi-threaded dynamic RTL's. -That means they require CC32xxMT.DLL present on the installation target. -To create single-threaded libs, do the following: - -1. The compiler option for multi-threading must be turned off. Following the - instructions above to edit the option source, remove the -tWM option from - the CFLAG1 tag. In a make file, remove it from the CFLAG1 variable. - -2. The single threaded RTL must be called. change the RTL in the ALLLIB tag or - variable (GUI or makefile repectively) to the version without the "mt" in the - name. For example, change cw32mti.lib to cw32i.lib. - - Static RTL's - -To build the libs with static RTL's do the following, - -1. For the static expatlibs, in the Tlib tab on the options dialog, uncheck the - "Use dynamic RTL" box. For the dynamic expatlibs, in the Linker tab on the - options dialog, uncheck "Use dynamic RTL". If you are using a make file, - remove the _RTLDLL assignment to the SYSDEFINES variable, and change the RTL - to the version without an "i" in the ALLLIB variable. For example, - cw32mti.lib would become cw32mt.lib. diff --git a/3rdparty/expat-2.0.1/bcb5/all_projects.bpg b/3rdparty/expat-2.0.1/bcb5/all_projects.bpg deleted file mode 100644 index 59a15cb6ee..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/all_projects.bpg +++ /dev/null @@ -1,49 +0,0 @@ -#------------------------------------------------------------------------------ -VERSION = BWS.01 -#------------------------------------------------------------------------------ -!ifndef ROOT -ROOT = $(MAKEDIR)\.. -!endif -#------------------------------------------------------------------------------ -MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** -DCC = $(ROOT)\bin\dcc32.exe $** -BRCC = $(ROOT)\bin\brcc32.exe $** -#------------------------------------------------------------------------------ -PROJECTS = setup libexpat_mtd.dll libexpats_mtd.lib libexpatw_mtd.dll \ - libexpatws_mtd.lib elements.exe outline.exe xmlwf.exe -#------------------------------------------------------------------------------ -default: $(PROJECTS) -#------------------------------------------------------------------------------ - -libexpat_mtd.dll: expat.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -libexpats_mtd.lib: expat_static.bpr - $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -libexpatw_mtd.dll: expatw.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -libexpatws_mtd.lib: expatw_static.bpr - $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -elements.exe: elements.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -outline.exe: outline.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -xmlwf.exe: xmlwf.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -setup: setup.bat - call $** - - diff --git a/3rdparty/expat-2.0.1/bcb5/elements.bpf b/3rdparty/expat-2.0.1/bcb5/elements.bpf deleted file mode 100644 index dced4da712..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/elements.bpf +++ /dev/null @@ -1,4 +0,0 @@ -USEUNIT("..\examples\elements.c"); -USELIB("Release\libexpats_mtd.lib"); -//--------------------------------------------------------------------------- -main diff --git a/3rdparty/expat-2.0.1/bcb5/elements.bpr b/3rdparty/expat-2.0.1/bcb5/elements.bpr deleted file mode 100644 index efaf2ce273..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/elements.bpr +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\examples;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=8 -Item0=..\examples;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\examples;$(BCB)\lib;..\examples\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);..\lib\Release-w_static -Item4=$(BCB)\lib;$(RELEASELIBPATH);..\lib\Release_static -Item5=$(BCB)\lib;$(RELEASELIBPATH);C:\src\expat\lib\Release_static -Item6=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item7=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=17 -Item0=WIN32;NDEBUG;_CONSOLE;XML_STATIC -Item1=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_STATIC -Item2=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE;XML_STATIC -Item3=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE -Item4=WIN32;NDEBUG;_CONSOLE;_DEBUG -Item5=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG -Item6=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG;_UNICODE -Item7=WIN32;NDEBUG;_CONSOLE;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T -Item8=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T -Item9=WIN32;NDEBUG;_CONSOLE;_UNICODE;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T -Item10=WIN32;NDEBUG;_CONSOLE;_UNICODE;XML_STATIC;_DEBUG;XML_UNICODE -Item11=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T;__WCHAR_T -Item12=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE -Item13=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE;_UNICODE -Item14=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG;XML_UNICODE -Item15=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC;_DEBUG -Item16=WIN32;NDEBUG;_CONSOLE;_MBCS;XML_STATIC - -[HistoryLists\hlIntOutputDir] -Count=5 -Item0=Release\obj\examples -Item1=Release\obj\elements -Item2=Release\obj\mts -Item3=..\examples\Release -Item4=Release - -[HistoryLists\hlFinalOutputDir] -Count=1 -Item0=Release\ - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/elements.mak b/3rdparty/expat-2.0.1/bcb5/elements.mak deleted file mode 100644 index 33cfb99330..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/elements.mak +++ /dev/null @@ -1,186 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\elements.exe -OBJFILES = Release\obj\examples\elements.obj -RESFILES = -MAINSOURCE = elements.bpf -RESDEPEN = $(RESFILES) -LIBFILES = Release\libexpats_mtd.lib -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ - dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi -SPARELIBS = -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .;..\examples -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = WIN32;NDEBUG;_CONSOLE;XML_STATIC -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\examples;$(BCB)\include -LIBPATH = ..\examples;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS= -w-par -w-8027 -w-8026 -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -I..\lib -c -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\examples -N0Release\obj\examples -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -IRelease\obj\examples -D"" -ap -Tpe -x -Gn -q -L..\LIB\RELEASE_STATIC -# --------------------------------------------------------------------------- -ALLOBJ = c0x32.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/expat.bpf b/3rdparty/expat-2.0.1/bcb5/expat.bpf deleted file mode 100644 index 4e49f06ac5..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat.bpf +++ /dev/null @@ -1,6 +0,0 @@ -USEUNIT("..\lib\xmlparse.c"); -USEUNIT("..\lib\xmlrole.c"); -USEUNIT("..\lib\xmltok.c"); -USEDEF("libexpat_mtd.def"); -//--------------------------------------------------------------------------- -#define DllEntryPoint diff --git a/3rdparty/expat-2.0.1/bcb5/expat.bpr b/3rdparty/expat-2.0.1/bcb5/expat.bpr deleted file mode 100644 index 4c2957a02f..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat.bpr +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\lib;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=5 -Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=8 -Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS -Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS -Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS -Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP -Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;_DEBUG;EXPAT_EXPORTS;COMPILED_FROM_DSP -Item5=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG -Item6=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG -Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP - -[HistoryLists\hlIntOutputDir] -Count=7 -Item0=Release\obj\libexpat -Item1=Release\obj\libexpat_static -Item2=Release\obj\mtd -Item3=Release\obj\mt -Item4=Release\obj -Item5=Release -Item6=..\lib\Release - -[HistoryLists\hlFinalOutputDir] -Count=1 -Item0=Release\ - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/expat.mak b/3rdparty/expat-2.0.1/bcb5/expat.mak deleted file mode 100644 index c32e12b00d..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat.mak +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\libexpat_mtd.dll -OBJFILES = Release\obj\libexpat\xmlparse.obj Release\obj\libexpat\xmlrole.obj \ - Release\obj\libexpat\xmltok.obj -RESFILES = -MAINSOURCE = expat.bpf -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ - dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi -SPARELIBS = -DEFFILE = libexpat_mtd.def -# --------------------------------------------------------------------------- -PATHCPP = .;..\lib -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\lib;$(BCB)\include -LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS= -w-rch -w-par -w-8027 -w-8026 -w-ccc -# --------------------------------------------------------------------------- -CFLAG1 = -WD -O2 -X- -a8 -b -k- -vi -q -tWM -c -tWD -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\libexpat -N0Release\obj\libexpat -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -IRelease\obj\libexpat -D"" -aa -Tpd -x -Gn -Gi -q -# --------------------------------------------------------------------------- -ALLOBJ = c0d32.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/expat_static.bpf b/3rdparty/expat-2.0.1/bcb5/expat_static.bpf deleted file mode 100644 index 4694385046..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat_static.bpf +++ /dev/null @@ -1,5 +0,0 @@ -USEUNIT("..\lib\xmlparse.c"); -USEUNIT("..\lib\xmlrole.c"); -USEUNIT("..\lib\xmltok.c"); -//--------------------------------------------------------------------------- -#define Library diff --git a/3rdparty/expat-2.0.1/bcb5/expat_static.bpr b/3rdparty/expat-2.0.1/bcb5/expat_static.bpr deleted file mode 100644 index 56923abe5a..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat_static.bpr +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\lib;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=5 -Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=7 -Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC -Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC -Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC -Item3=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG -Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP -Item5=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_MBCS -Item6=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP - -[HistoryLists\hlIntOutputDir] -Count=6 -Item0=Release\obj\libexpat_static -Item1=Release\obj\mts -Item2=Release\obj\mt -Item3=Release -Item4=..\lib\Release_static -Item5=Release_static - -[HistoryLists\hlFinalOutputDir] -Count=3 -Item0=Release\ -Item1=Release -Item2=Release_static\ - -[HistoryLists\hlTlibPageSize] -Count=1 -Item0=0x0010 - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/expat_static.mak b/3rdparty/expat-2.0.1/bcb5/expat_static.mak deleted file mode 100644 index 3e162d9fce..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expat_static.mak +++ /dev/null @@ -1,189 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\libexpats_mtd.lib -OBJFILES = Release\obj\libexpat_static\xmlparse.obj \ - Release\obj\libexpat_static\xmlrole.obj \ - Release\obj\libexpat_static\xmltok.obj -RESFILES = -MAINSOURCE = expat_static.bpf -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = -SPARELIBS = -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .;..\lib -PATHASM = .; -PATHPAS = .; -PATHRC = .; -LINKER = TLib -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\lib;$(BCB)\include -LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS = -w-rch -w-par -w-8027 -w-8026 -w-ccc -LISTFILE = -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -c -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\libexpat_static -N0Release\obj\libexpat_static -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = TLib -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -!if "$(LISTFILE)" == "" -COMMA = -!else -COMMA = , -!endif - -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) /u $@ @&&! - $(LFLAGS) $? $(COMMA) $(LISTFILE) - -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/expatw.bpf b/3rdparty/expat-2.0.1/bcb5/expatw.bpf deleted file mode 100644 index e8760e2891..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw.bpf +++ /dev/null @@ -1,6 +0,0 @@ -USEUNIT("..\lib\xmlparse.c"); -USEUNIT("..\lib\xmlrole.c"); -USEUNIT("..\lib\xmltok.c"); -USEDEF("libexpatw_mtd.def"); -//--------------------------------------------------------------------------- -#define DllEntryPoint diff --git a/3rdparty/expat-2.0.1/bcb5/expatw.bpr b/3rdparty/expat-2.0.1/bcb5/expatw.bpr deleted file mode 100644 index 6573027474..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw.bpr +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\lib;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=5 -Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=9 -Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T -Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T -Item2=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T -Item3=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG;XML_UNICODE_WCHAR_T -Item4=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG -Item5=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG -Item6=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T -Item7=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;XML_UNICODE -Item8=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T - -[HistoryLists\hlIntOutputDir] -Count=8 -Item0=Release\obj\libexpatw -Item1=Release\obj\libexpat -Item2=Release\obj\mtd -Item3=Release\obj\mt -Item4=Release_w\obj -Item5=Release-w\obj -Item6=Release-w -Item7=..\lib\Release-w - -[HistoryLists\hlFinalOutputDir] -Count=5 -Item0=Release\ -Item1=Release -Item2=Release_w\ -Item3=Release-w\ -Item4=Release-w - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/expatw.mak b/3rdparty/expat-2.0.1/bcb5/expatw.mak deleted file mode 100644 index 996723dab3..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw.mak +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\libexpatw_mtd.dll -OBJFILES = Release\obj\libexpatw\xmlparse.obj Release\obj\libexpatw\xmlrole.obj \ - Release\obj\libexpatw\xmltok.obj -RESFILES = -MAINSOURCE = expatw.bpf -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ - dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi -SPARELIBS = -DEFFILE = libexpatw_mtd.def -# --------------------------------------------------------------------------- -PATHCPP = .;..\lib -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\lib;$(BCB)\include -LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS= -w-rch -w-par -w-8027 -w-8026 -w-ccc -# --------------------------------------------------------------------------- -CFLAG1 = -WD -O2 -X- -a8 -b -k- -vi -q -tWM -c -tWD -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\libexpatw -N0Release\obj\libexpatw -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -IRelease\obj\libexpatw -D"" -aa -Tpd -x -Gn -Gi -w -q -# --------------------------------------------------------------------------- -ALLOBJ = c0d32w.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/expatw_static.bpf b/3rdparty/expat-2.0.1/bcb5/expatw_static.bpf deleted file mode 100644 index 4694385046..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw_static.bpf +++ /dev/null @@ -1,5 +0,0 @@ -USEUNIT("..\lib\xmlparse.c"); -USEUNIT("..\lib\xmlrole.c"); -USEUNIT("..\lib\xmltok.c"); -//--------------------------------------------------------------------------- -#define Library diff --git a/3rdparty/expat-2.0.1/bcb5/expatw_static.bpr b/3rdparty/expat-2.0.1/bcb5/expatw_static.bpr deleted file mode 100644 index c3e4c705f2..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw_static.bpr +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\lib;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=5 -Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=15 -Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T -Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T -Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T -Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T -Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T -Item5=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG -Item6=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__cplusplus -Item7=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG -Item8=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG -Item9=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__WCHAR_T -Item10=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;_UNICODE -Item11=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG;_UNICODE -Item12=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG -Item13=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T -Item14=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;XML_UNICODE - -[HistoryLists\hlIntOutputDir] -Count=6 -Item0=Release\obj\libexpatw_static -Item1=Release\obj\libexpat_static -Item2=Release\obj\mts -Item3=Release\obj\mt -Item4=..\lib\Release-w_static -Item5=Release-w_static - -[HistoryLists\hlFinalOutputDir] -Count=3 -Item0=Release\ -Item1=Release -Item2=Release-w_static\ - -[HistoryLists\hlTlibPageSize] -Count=1 -Item0=0x0010 - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/expatw_static.mak b/3rdparty/expat-2.0.1/bcb5/expatw_static.mak deleted file mode 100644 index b3fd3c1233..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/expatw_static.mak +++ /dev/null @@ -1,190 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\libexpatws_mtd.lib -OBJFILES = Release\obj\libexpatw_static\xmlparse.obj \ - Release\obj\libexpatw_static\xmlrole.obj \ - Release\obj\libexpatw_static\xmltok.obj -RESFILES = -MAINSOURCE = expatw_static.bpf -RESDEPEN = $(RESFILES) -LIBFILES = -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = -SPARELIBS = -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .;..\lib -PATHASM = .; -PATHPAS = .; -PATHRC = .; -LINKER = TLib -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\lib;$(BCB)\include -LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS = -w-rch -w-par -w-8027 -w-8026 -w-ccc -LISTFILE = -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -c -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\libexpatw_static -N0Release\obj\libexpatw_static -$Y- -$L- \ - -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -# --------------------------------------------------------------------------- -ALLOBJ = $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = TLib -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -!if "$(LISTFILE)" == "" -COMMA = -!else -COMMA = , -!endif - -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) /u $@ @&&! - $(LFLAGS) $? $(COMMA) $(LISTFILE) - -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/libexpat_mtd.def b/3rdparty/expat-2.0.1/bcb5/libexpat_mtd.def deleted file mode 100644 index 43fa566c16..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/libexpat_mtd.def +++ /dev/null @@ -1,141 +0,0 @@ -; DEF file for BCB5 -LIBRARY LIBEXPAT_MTD -DESCRIPTION "Implements an XML parser." -EXPORTS - _XML_DefaultCurrent @1 - _XML_ErrorString @2 - _XML_ExpatVersion @3 - _XML_ExpatVersionInfo @4 - _XML_ExternalEntityParserCreate @5 - _XML_GetBase @6 - _XML_GetBuffer @7 - _XML_GetCurrentByteCount @8 - _XML_GetCurrentByteIndex @9 - _XML_GetCurrentColumnNumber @10 - _XML_GetCurrentLineNumber @11 - _XML_GetErrorCode @12 - _XML_GetIdAttributeIndex @13 - _XML_GetInputContext @14 - _XML_GetSpecifiedAttributeCount @15 - _XML_Parse @16 - _XML_ParseBuffer @17 - _XML_ParserCreate @18 - _XML_ParserCreateNS @19 - _XML_ParserCreate_MM @20 - _XML_ParserFree @21 - _XML_SetAttlistDeclHandler @22 - _XML_SetBase @23 - _XML_SetCdataSectionHandler @24 - _XML_SetCharacterDataHandler @25 - _XML_SetCommentHandler @26 - _XML_SetDefaultHandler @27 - _XML_SetDefaultHandlerExpand @28 - _XML_SetDoctypeDeclHandler @29 - _XML_SetElementDeclHandler @30 - _XML_SetElementHandler @31 - _XML_SetEncoding @32 - _XML_SetEndCdataSectionHandler @33 - _XML_SetEndDoctypeDeclHandler @34 - _XML_SetEndElementHandler @35 - _XML_SetEndNamespaceDeclHandler @36 - _XML_SetEntityDeclHandler @37 - _XML_SetExternalEntityRefHandler @38 - _XML_SetExternalEntityRefHandlerArg @39 - _XML_SetNamespaceDeclHandler @40 - _XML_SetNotStandaloneHandler @41 - _XML_SetNotationDeclHandler @42 - _XML_SetParamEntityParsing @43 - _XML_SetProcessingInstructionHandler @44 - _XML_SetReturnNSTriplet @45 - _XML_SetStartCdataSectionHandler @46 - _XML_SetStartDoctypeDeclHandler @47 - _XML_SetStartElementHandler @48 - _XML_SetStartNamespaceDeclHandler @49 - _XML_SetUnknownEncodingHandler @50 - _XML_SetUnparsedEntityDeclHandler @51 - _XML_SetUserData @52 - _XML_SetXmlDeclHandler @53 - _XML_UseParserAsHandlerArg @54 -; added with version 1.95.3 - _XML_ParserReset @55 - _XML_SetSkippedEntityHandler @56 -; added with version 1.95.5 - _XML_GetFeatureList @57 - _XML_UseForeignDTD @58 -; added with version 1.95.6 - _XML_FreeContentModel @59 - _XML_MemMalloc @60 - _XML_MemRealloc @61 - _XML_MemFree @62 -; added with version 1.95.8 - _XML_StopParser @63 - _XML_ResumeParser @64 - _XML_GetParsingStatus @65 - -; Aliases for MS compatible names - XML_DefaultCurrent = _XML_DefaultCurrent - XML_ErrorString = _XML_ErrorString - XML_ExpatVersion = _XML_ExpatVersion - XML_ExpatVersionInfo = _XML_ExpatVersionInfo - XML_ExternalEntityParserCreate = _XML_ExternalEntityParserCreate - XML_GetBase = _XML_GetBase - XML_GetBuffer = _XML_GetBuffer - XML_GetCurrentByteCount = _XML_GetCurrentByteCount - XML_GetCurrentByteIndex = _XML_GetCurrentByteIndex - XML_GetCurrentColumnNumber = _XML_GetCurrentColumnNumber - XML_GetCurrentLineNumber = _XML_GetCurrentLineNumber - XML_GetErrorCode = _XML_GetErrorCode - XML_GetIdAttributeIndex = _XML_GetIdAttributeIndex - XML_GetInputContext = _XML_GetInputContext - XML_GetSpecifiedAttributeCount = _XML_GetSpecifiedAttributeCount - XML_Parse = _XML_Parse - XML_ParseBuffer = _XML_ParseBuffer - XML_ParserCreate = _XML_ParserCreate - XML_ParserCreateNS = _XML_ParserCreateNS - XML_ParserCreate_MM = _XML_ParserCreate_MM - XML_ParserFree = _XML_ParserFree - XML_SetAttlistDeclHandler = _XML_SetAttlistDeclHandler - XML_SetBase = _XML_SetBase - XML_SetCdataSectionHandler = _XML_SetCdataSectionHandler - XML_SetCharacterDataHandler = _XML_SetCharacterDataHandler - XML_SetCommentHandler = _XML_SetCommentHandler - XML_SetDefaultHandler = _XML_SetDefaultHandler - XML_SetDefaultHandlerExpand = _XML_SetDefaultHandlerExpand - XML_SetDoctypeDeclHandler = _XML_SetDoctypeDeclHandler - XML_SetElementDeclHandler = _XML_SetElementDeclHandler - XML_SetElementHandler = _XML_SetElementHandler - XML_SetEncoding = _XML_SetEncoding - XML_SetEndCdataSectionHandler = _XML_SetEndCdataSectionHandler - XML_SetEndDoctypeDeclHandler = _XML_SetEndDoctypeDeclHandler - XML_SetEndElementHandler = _XML_SetEndElementHandler - XML_SetEndNamespaceDeclHandler = _XML_SetEndNamespaceDeclHandler - XML_SetEntityDeclHandler = _XML_SetEntityDeclHandler - XML_SetExternalEntityRefHandler = _XML_SetExternalEntityRefHandler - XML_SetExternalEntityRefHandlerArg = _XML_SetExternalEntityRefHandlerArg - XML_SetNamespaceDeclHandler = _XML_SetNamespaceDeclHandler - XML_SetNotStandaloneHandler = _XML_SetNotStandaloneHandler - XML_SetNotationDeclHandler = _XML_SetNotationDeclHandler - XML_SetParamEntityParsing = _XML_SetParamEntityParsing - XML_SetProcessingInstructionHandler = _XML_SetProcessingInstructionHandler - XML_SetReturnNSTriplet = _XML_SetReturnNSTriplet - XML_SetStartCdataSectionHandler = _XML_SetStartCdataSectionHandler - XML_SetStartDoctypeDeclHandler = _XML_SetStartDoctypeDeclHandler - XML_SetStartElementHandler = _XML_SetStartElementHandler - XML_SetStartNamespaceDeclHandler = _XML_SetStartNamespaceDeclHandler - XML_SetUnknownEncodingHandler = _XML_SetUnknownEncodingHandler - XML_SetUnparsedEntityDeclHandler = _XML_SetUnparsedEntityDeclHandler - XML_SetUserData = _XML_SetUserData - XML_SetXmlDeclHandler = _XML_SetXmlDeclHandler - XML_UseParserAsHandlerArg = _XML_UseParserAsHandlerArg - XML_ParserReset = _XML_ParserReset - XML_SetSkippedEntityHandler = _XML_SetSkippedEntityHandler - XML_GetFeatureList = _XML_GetFeatureList - XML_UseForeignDTD = _XML_UseForeignDTD - XML_FreeContentModel = _XML_FreeContentModel - XML_MemMalloc = _XML_MemMalloc - XML_MemRealloc = _XML_MemRealloc - XML_MemFree = _XML_MemFree - XML_StopParser = _XML_StopParser - XML_ResumeParser = _XML_ResumeParser - XML_GetParsingStatus = _XML_GetParsingStatus - diff --git a/3rdparty/expat-2.0.1/bcb5/libexpatw_mtd.def b/3rdparty/expat-2.0.1/bcb5/libexpatw_mtd.def deleted file mode 100644 index a9f5e579f5..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/libexpatw_mtd.def +++ /dev/null @@ -1,140 +0,0 @@ -; DEF file for BCB5 -LIBRARY LIBEXPATW_MTD -DESCRIPTION "Implements an XML parser." -EXPORTS - _XML_DefaultCurrent @1 - _XML_ErrorString @2 - _XML_ExpatVersion @3 - _XML_ExpatVersionInfo @4 - _XML_ExternalEntityParserCreate @5 - _XML_GetBase @6 - _XML_GetBuffer @7 - _XML_GetCurrentByteCount @8 - _XML_GetCurrentByteIndex @9 - _XML_GetCurrentColumnNumber @10 - _XML_GetCurrentLineNumber @11 - _XML_GetErrorCode @12 - _XML_GetIdAttributeIndex @13 - _XML_GetInputContext @14 - _XML_GetSpecifiedAttributeCount @15 - _XML_Parse @16 - _XML_ParseBuffer @17 - _XML_ParserCreate @18 - _XML_ParserCreateNS @19 - _XML_ParserCreate_MM @20 - _XML_ParserFree @21 - _XML_SetAttlistDeclHandler @22 - _XML_SetBase @23 - _XML_SetCdataSectionHandler @24 - _XML_SetCharacterDataHandler @25 - _XML_SetCommentHandler @26 - _XML_SetDefaultHandler @27 - _XML_SetDefaultHandlerExpand @28 - _XML_SetDoctypeDeclHandler @29 - _XML_SetElementDeclHandler @30 - _XML_SetElementHandler @31 - _XML_SetEncoding @32 - _XML_SetEndCdataSectionHandler @33 - _XML_SetEndDoctypeDeclHandler @34 - _XML_SetEndElementHandler @35 - _XML_SetEndNamespaceDeclHandler @36 - _XML_SetEntityDeclHandler @37 - _XML_SetExternalEntityRefHandler @38 - _XML_SetExternalEntityRefHandlerArg @39 - _XML_SetNamespaceDeclHandler @40 - _XML_SetNotStandaloneHandler @41 - _XML_SetNotationDeclHandler @42 - _XML_SetParamEntityParsing @43 - _XML_SetProcessingInstructionHandler @44 - _XML_SetReturnNSTriplet @45 - _XML_SetStartCdataSectionHandler @46 - _XML_SetStartDoctypeDeclHandler @47 - _XML_SetStartElementHandler @48 - _XML_SetStartNamespaceDeclHandler @49 - _XML_SetUnknownEncodingHandler @50 - _XML_SetUnparsedEntityDeclHandler @51 - _XML_SetUserData @52 - _XML_SetXmlDeclHandler @53 - _XML_UseParserAsHandlerArg @54 -; added with version 1.95.3 - _XML_ParserReset @55 - _XML_SetSkippedEntityHandler @56 -; added with version 1.95.5 - _XML_GetFeatureList @57 - _XML_UseForeignDTD @58 -; added with version 1.95.6 - _XML_FreeContentModel @59 - _XML_MemMalloc @60 - _XML_MemRealloc @61 - _XML_MemFree @62 -; added with version 1.95.8 - _XML_StopParser @63 - _XML_ResumeParser @64 - _XML_GetParsingStatus @65 - -; Aliases for MS compatible names - XML_DefaultCurrent = _XML_DefaultCurrent - XML_ErrorString = _XML_ErrorString - XML_ExpatVersion = _XML_ExpatVersion - XML_ExpatVersionInfo = _XML_ExpatVersionInfo - XML_ExternalEntityParserCreate = _XML_ExternalEntityParserCreate - XML_GetBase = _XML_GetBase - XML_GetBuffer = _XML_GetBuffer - XML_GetCurrentByteCount = _XML_GetCurrentByteCount - XML_GetCurrentByteIndex = _XML_GetCurrentByteIndex - XML_GetCurrentColumnNumber = _XML_GetCurrentColumnNumber - XML_GetCurrentLineNumber = _XML_GetCurrentLineNumber - XML_GetErrorCode = _XML_GetErrorCode - XML_GetIdAttributeIndex = _XML_GetIdAttributeIndex - XML_GetInputContext = _XML_GetInputContext - XML_GetSpecifiedAttributeCount = _XML_GetSpecifiedAttributeCount - XML_Parse = _XML_Parse - XML_ParseBuffer = _XML_ParseBuffer - XML_ParserCreate = _XML_ParserCreate - XML_ParserCreateNS = _XML_ParserCreateNS - XML_ParserCreate_MM = _XML_ParserCreate_MM - XML_ParserFree = _XML_ParserFree - XML_SetAttlistDeclHandler = _XML_SetAttlistDeclHandler - XML_SetBase = _XML_SetBase - XML_SetCdataSectionHandler = _XML_SetCdataSectionHandler - XML_SetCharacterDataHandler = _XML_SetCharacterDataHandler - XML_SetCommentHandler = _XML_SetCommentHandler - XML_SetDefaultHandler = _XML_SetDefaultHandler - XML_SetDefaultHandlerExpand = _XML_SetDefaultHandlerExpand - XML_SetDoctypeDeclHandler = _XML_SetDoctypeDeclHandler - XML_SetElementDeclHandler = _XML_SetElementDeclHandler - XML_SetElementHandler = _XML_SetElementHandler - XML_SetEncoding = _XML_SetEncoding - XML_SetEndCdataSectionHandler = _XML_SetEndCdataSectionHandler - XML_SetEndDoctypeDeclHandler = _XML_SetEndDoctypeDeclHandler - XML_SetEndElementHandler = _XML_SetEndElementHandler - XML_SetEndNamespaceDeclHandler = _XML_SetEndNamespaceDeclHandler - XML_SetEntityDeclHandler = _XML_SetEntityDeclHandler - XML_SetExternalEntityRefHandler = _XML_SetExternalEntityRefHandler - XML_SetExternalEntityRefHandlerArg = _XML_SetExternalEntityRefHandlerArg - XML_SetNamespaceDeclHandler = _XML_SetNamespaceDeclHandler - XML_SetNotStandaloneHandler = _XML_SetNotStandaloneHandler - XML_SetNotationDeclHandler = _XML_SetNotationDeclHandler - XML_SetParamEntityParsing = _XML_SetParamEntityParsing - XML_SetProcessingInstructionHandler = _XML_SetProcessingInstructionHandler - XML_SetReturnNSTriplet = _XML_SetReturnNSTriplet - XML_SetStartCdataSectionHandler = _XML_SetStartCdataSectionHandler - XML_SetStartDoctypeDeclHandler = _XML_SetStartDoctypeDeclHandler - XML_SetStartElementHandler = _XML_SetStartElementHandler - XML_SetStartNamespaceDeclHandler = _XML_SetStartNamespaceDeclHandler - XML_SetUnknownEncodingHandler = _XML_SetUnknownEncodingHandler - XML_SetUnparsedEntityDeclHandler = _XML_SetUnparsedEntityDeclHandler - XML_SetUserData = _XML_SetUserData - XML_SetXmlDeclHandler = _XML_SetXmlDeclHandler - XML_UseParserAsHandlerArg = _XML_UseParserAsHandlerArg - XML_ParserReset = _XML_ParserReset - XML_SetSkippedEntityHandler = _XML_SetSkippedEntityHandler - XML_GetFeatureList = _XML_GetFeatureList - XML_UseForeignDTD = _XML_UseForeignDTD - XML_FreeContentModel = _XML_FreeContentModel - XML_MemMalloc = _XML_MemMalloc - XML_MemRealloc = _XML_MemRealloc - XML_MemFree = _XML_MemFree - XML_StopParser = _XML_StopParser - XML_ResumeParser = _XML_ResumeParser - XML_GetParsingStatus = _XML_GetParsingStatus diff --git a/3rdparty/expat-2.0.1/bcb5/makefile.mak b/3rdparty/expat-2.0.1/bcb5/makefile.mak deleted file mode 100644 index 8446aa6fac..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/makefile.mak +++ /dev/null @@ -1,37 +0,0 @@ -all: setup expat expatw expat_static expatw_static elements outline xmlwf - -setup: - setup - -expat: - make -l -fexpat.mak - -expatw: - make -l -fexpatw.mak - -expat_static: - make -l -fexpat_static.mak - -expatw_static: - make -l -fexpatw_static.mak - -elements: - make -l -felements.mak - -outline: - make -l -foutline.mak - -xmlwf: - make -l -fxmlwf.mak - -clean: -# works on Win98/ME -# deltree /y release\obj -# works on WinNT/2000 - del /s/f/q release\obj - -distclean: -# works on Win98/ME -# deltree /y release\*.* -# works on WinNT/2000 - del /s/f/q release\* diff --git a/3rdparty/expat-2.0.1/bcb5/outline.bpf b/3rdparty/expat-2.0.1/bcb5/outline.bpf deleted file mode 100644 index ad908eeb54..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/outline.bpf +++ /dev/null @@ -1,4 +0,0 @@ -USEUNIT("..\examples\outline.c"); -USELIB("Release\libexpat_mtd.lib"); -//--------------------------------------------------------------------------- -main diff --git a/3rdparty/expat-2.0.1/bcb5/outline.bpr b/3rdparty/expat-2.0.1/bcb5/outline.bpr deleted file mode 100644 index 614929dfa8..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/outline.bpr +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=3 -Item0=..\examples;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=4 -Item0=..\examples;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\examples;$(BCB)\lib;..\examples\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=6 -Item0=WIN32;NDEBUG;_CONSOLE -Item1=WIN32;NDEBUG;_CONSOLE;XML_STATIC -Item2=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_STATIC -Item3=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE;XML_STATIC -Item4=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE -Item5=WIN32;NDEBUG;_CONSOLE;_DEBUG - -[HistoryLists\hlIntOutputDir] -Count=4 -Item0=Release\obj\examples -Item1=Release\obj\outline -Item2=..\examples\Release -Item3=Release - -[HistoryLists\hlFinalOutputDir] -Count=1 -Item0=Release\ - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/outline.mak b/3rdparty/expat-2.0.1/bcb5/outline.mak deleted file mode 100644 index 18516b577e..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/outline.mak +++ /dev/null @@ -1,186 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\outline.exe -OBJFILES = Release\obj\examples\outline.obj -RESFILES = -MAINSOURCE = outline.bpf -RESDEPEN = $(RESFILES) -LIBFILES = Release\libexpat_mtd.lib -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ - dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi -SPARELIBS = -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .;..\examples -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = WIN32;NDEBUG;_CONSOLE -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\examples;$(BCB)\include -LIBPATH = ..\examples;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS= -w-par -w-8027 -w-8026 -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -I..\lib -c -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\examples -N0Release\obj\examples -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -IRelease\obj\examples -D"" -ap -Tpe -x -Gn -q -# --------------------------------------------------------------------------- -ALLOBJ = c0x32.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/bcb5/setup.bat b/3rdparty/expat-2.0.1/bcb5/setup.bat deleted file mode 100644 index 5020d4426a..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/setup.bat +++ /dev/null @@ -1,9 +0,0 @@ -REM CommandInterpreter: $(COMSPEC) -if not exist .\release\nul mkdir release -if not exist .\release\obj\nul mkdir release\obj -if not exist .\release\obj\libexpat\nul mkdir release\obj\libexpat -if not exist .\release\obj\libexpatw\nul mkdir release\obj\libexpatw -if not exist .\release\obj\libexpat_static\nul mkdir release\obj\libexpat_static -if not exist .\release\obj\libexpatw_static\nul mkdir release\obj\libexpatw_static -if not exist .\release\obj\examples\nul mkdir release\obj\examples -if not exist .\release\obj\xmlwf\nul mkdir release\obj\xmlwf diff --git a/3rdparty/expat-2.0.1/bcb5/xmlwf.bpf b/3rdparty/expat-2.0.1/bcb5/xmlwf.bpf deleted file mode 100644 index fa608323eb..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/xmlwf.bpf +++ /dev/null @@ -1,7 +0,0 @@ -USEUNIT("..\xmlwf\codepage.c"); -USEUNIT("..\xmlwf\win32filemap.c"); -USEUNIT("..\xmlwf\xmlfile.c"); -USEUNIT("..\xmlwf\xmlwf.c"); -USELIB("Release\libexpat_mtd.lib"); -//--------------------------------------------------------------------------- -main diff --git a/3rdparty/expat-2.0.1/bcb5/xmlwf.bpr b/3rdparty/expat-2.0.1/bcb5/xmlwf.bpr deleted file mode 100644 index 193e9df03e..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/xmlwf.bpr +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=4 -Item0=..\xmlwf;$(BCB)\include -Item1=$(BCB)\include -Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl -Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; - -[HistoryLists\hlLibraryPath] -Count=5 -Item0=..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH) -Item1=..\xmlwf;$(BCB)\lib;..\xmlwf\$(RELEASELIBPATH) -Item2=$(BCB)\lib;$(RELEASELIBPATH) -Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk -Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=6 -Item0=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP -Item1=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE -Item2=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T -Item3=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG -Item4=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE;XML_UNICODE_WCHAR_T -Item5=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE - -[HistoryLists\hlIntOutputDir] -Count=3 -Item0=Release\obj\xmlwf -Item1=..\xmlwf\Release -Item2=Release - -[HistoryLists\hlFinalOutputDir] -Count=3 -Item0=Release\ -Item1=Release -Item2=.\Release\ - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams=sample.xml -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/bcb5/xmlwf.mak b/3rdparty/expat-2.0.1/bcb5/xmlwf.mak deleted file mode 100644 index 5062600a3c..0000000000 --- a/3rdparty/expat-2.0.1/bcb5/xmlwf.mak +++ /dev/null @@ -1,187 +0,0 @@ -# --------------------------------------------------------------------------- -!if !$d(BCB) -BCB = $(MAKEDIR)\.. -!endif - -# --------------------------------------------------------------------------- -# IDE SECTION -# --------------------------------------------------------------------------- -# The following section of the project makefile is managed by the BCB IDE. -# It is recommended to use the IDE to change any of the values in this -# section. -# --------------------------------------------------------------------------- - -VERSION = BCB.05.03 -# --------------------------------------------------------------------------- -PROJECT = Release\xmlwf.exe -OBJFILES = Release\obj\xmlwf\codepage.obj Release\obj\xmlwf\win32filemap.obj \ - Release\obj\xmlwf\xmlfile.obj Release\obj\xmlwf\xmlwf.obj -RESFILES = -MAINSOURCE = xmlwf.bpf -RESDEPEN = $(RESFILES) -LIBFILES = Release\libexpat_mtd.lib -IDLFILES = -IDLGENFILES = -LIBRARIES = -PACKAGES = VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi \ - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi \ - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi \ - dclocx50.bpi bcb2kaxserver50.bpi dclusr50.bpi -SPARELIBS = -DEFFILE = -# --------------------------------------------------------------------------- -PATHCPP = .;..\xmlwf -PATHASM = .; -PATHPAS = .; -PATHRC = .; -DEBUGLIBPATH = $(BCB)\lib\debug -RELEASELIBPATH = $(BCB)\lib\release -USERDEFINES = NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP -SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -INCLUDEPATH = ..\xmlwf;$(BCB)\include -LIBPATH = ..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH) -WARNINGS= -w-8065 -w-par -w-8027 -w-8026 -# --------------------------------------------------------------------------- -CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -I..\lib -c -IDLCFLAGS = -I$(BCB)\include -PFLAGS = -N2Release\obj\xmlwf -N0Release\obj\xmlwf -$Y- -$L- -$D- -RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include -AFLAGS = /mx /w2 /zn -LFLAGS = -IRelease\obj\xmlwf -D"" -ap -Tpe -x -Gn -q -# --------------------------------------------------------------------------- -ALLOBJ = c0x32.obj $(OBJFILES) -ALLRES = $(RESFILES) -ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib -# --------------------------------------------------------------------------- -!ifdef IDEOPTIONS - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -!endif - - - - - -# --------------------------------------------------------------------------- -# MAKE SECTION -# --------------------------------------------------------------------------- -# This section of the project file is not used by the BCB IDE. It is for -# the benefit of building from the command-line using the MAKE utility. -# --------------------------------------------------------------------------- - -.autodepend -# --------------------------------------------------------------------------- -!if "$(USERDEFINES)" != "" -AUSERDEFINES = -d$(USERDEFINES:;= -d) -!else -AUSERDEFINES = -!endif - -!if !$d(BCC32) -BCC32 = bcc32 -!endif - -!if !$d(CPP32) -CPP32 = cpp32 -!endif - -!if !$d(DCC32) -DCC32 = dcc32 -!endif - -!if !$d(TASM32) -TASM32 = tasm32 -!endif - -!if !$d(LINKER) -LINKER = ilink32 -!endif - -!if !$d(BRCC32) -BRCC32 = brcc32 -!endif - - -# --------------------------------------------------------------------------- -!if $d(PATHCPP) -.PATH.CPP = $(PATHCPP) -.PATH.C = $(PATHCPP) -!endif - -!if $d(PATHPAS) -.PATH.PAS = $(PATHPAS) -!endif - -!if $d(PATHASM) -.PATH.ASM = $(PATHASM) -!endif - -!if $d(PATHRC) -.PATH.RC = $(PATHRC) -!endif -# --------------------------------------------------------------------------- -$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) - $(BCB)\BIN\$(LINKER) @&&! - $(LFLAGS) -L$(LIBPATH) + - $(ALLOBJ), + - $(PROJECT),, + - $(ALLLIB), + - $(DEFFILE), + - $(ALLRES) -! -# --------------------------------------------------------------------------- -.pas.hpp: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.pas.obj: - $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< } - -.cpp.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.obj: - $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< } - -.c.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.cpp.i: - $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< } - -.asm.obj: - $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@ - -.rc.res: - $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< -# --------------------------------------------------------------------------- - - - - diff --git a/3rdparty/expat-2.0.1/configure b/3rdparty/expat-2.0.1/configure deleted file mode 100644 index ac92bcdb5a..0000000000 --- a/3rdparty/expat-2.0.1/configure +++ /dev/null @@ -1,22017 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for expat 2.0.1. -# -# Report bugs to . -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME='expat' -PACKAGE_TARNAME='expat' -PACKAGE_VERSION='2.0.1' -PACKAGE_STRING='expat 2.0.1' -PACKAGE_BUGREPORT='expat-bugs@libexpat.org' - -ac_unique_file="Makefile.in" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBCURRENT LIBREVISION LIBAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA FILEMAP LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_CXXCPP_set=${CXXCPP+set} -ac_env_CXXCPP_value=$CXXCPP -ac_cv_env_CXXCPP_set=${CXXCPP+set} -ac_cv_env_CXXCPP_value=$CXXCPP -ac_env_F77_set=${F77+set} -ac_env_F77_value=$F77 -ac_cv_env_F77_set=${F77+set} -ac_cv_env_F77_value=$F77 -ac_env_FFLAGS_set=${FFLAGS+set} -ac_env_FFLAGS_value=$FFLAGS -ac_cv_env_FFLAGS_set=${FFLAGS+set} -ac_cv_env_FFLAGS_value=$FFLAGS - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures expat 2.0.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of expat 2.0.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] - build shared libraries [default=yes] - --enable-static[=PKGS] - build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] - include additional configurations [automatic] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF -expat configure 2.0.1 -generated by GNU Autoconf 2.59 - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by expat $as_me 2.0.1, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -ac_aux_dir= -for ac_dir in conftools $srcdir/conftools; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in conftools $srcdir/conftools" >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - - - - -LIBCURRENT=6 -LIBREVISION=2 -LIBAGE=5 - - ac_config_headers="$ac_config_headers expat_config.h" - - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This file is free software; the Free Software Foundation gives -## unlimited permission to copy and/or distribute it, with or without -## modifications, as long as this notice is preserved. - -# serial 48 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. - - - -# AC_PROG_LIBTOOL -# --------------- -# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. - - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. - - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -# AC_PROG_LD - - -# AC_PROG_LD_GNU -# -------------- -# AC_PROG_LD_GNU - - -# AC_PROG_LD_RELOAD_FLAG -# ---------------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -# AC_PROG_LD_RELOAD_FLAG - - -# AC_DEPLIBS_CHECK_METHOD -# ----------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. - -# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. - -# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. - -# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. - -# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. - -# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- - # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- - - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- - - - -# old names - - - - - - - - -# This is just to silence aclocal about the macro not being used - - - - - - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. - - - - - - - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi; - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi; - -# Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi; - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld - - -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 -NM="$lt_cv_path_NM" - -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 -fi - -echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | kfreebsd*-gnu | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - -fi; -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 3564 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -lt_cv_cc_needs_belf=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-cygwin* | *-*-mingw* | *-*-pw32*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - echo "$as_me:$LINENO: result: $DLLTOOL" >&5 -echo "${ECHO_T}$DLLTOOL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 -echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - DLLTOOL=$ac_ct_DLLTOOL -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -echo "${ECHO_T}$ac_ct_AS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - AS=$ac_ct_AS -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - OBJDUMP=$ac_ct_OBJDUMP -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; - -esac - -need_locks="$enable_libtool_lock" - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------------- ## -## Report this to expat-bugs@libexpat.org ## -## -------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CXX" && break -done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - - CXX=$ac_ct_CXX -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_F77" && break -done - - F77=$ac_ct_F77 -fi - - -# Provide some information about the compiler. -echo "$as_me:5296:" \ - "checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_f77_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - -# find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 -else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 -fi - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 -else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 -fi - -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 -objdir=$lt_cv_objdir - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - AR=$ac_ct_AR -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -enable_dlopen=no -enable_win32_dll=yes - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - -fi; -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - - -# Check whether --with-pic or --without-pic was given. -if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" -else - pic_mode=default -fi; -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6363: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:6367: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6631: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:6635: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 - -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6735: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:6739: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix3*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 -test "$ld_shlibs" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# Report which library types will actually be built -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags or --without-tags was given. -if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" -fi; - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_CXX=yes - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix3*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix3*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -solaris*) - case $cc_basename in - CC*) - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11524: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:11528: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 - -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11628: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:11632: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6 - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13198: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13202: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13302: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13306: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix3*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_F77=yes - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15509: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15513: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15777: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15781: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15881: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15885: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix3*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_GCJ=yes - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6 -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -if test "$GCC" = yes ; then - OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" - CFLAGS="$OLDCFLAGS -fexceptions" - echo "$as_me:$LINENO: checking whether $CC accepts -fexceptions" >&5 -echo $ECHO_N "checking whether $CC accepts -fexceptions... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; CFLAGS="$OLDCFLAGS" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` -fi - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - - -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_bigendian=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - echo $ac_n "cross-compiling... " 2>&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -if test $ac_cv_c_bigendian = unknown; then -echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 -echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 - -cat >conftest.c <&6 - ac_cv_c_bigendian=yes - fi - if test `grep -l LiTTleEnDian conftest.o` ; then - echo $ac_n ' little endian probe OK, ' 1>&6 - if test $ac_cv_c_bigendian = yes ; then - ac_cv_c_bigendian=unknown; - else - ac_cv_c_bigendian=no - fi - fi - echo $ac_n 'guessing bigendian ... ' >&6 - fi - fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -fi -if test $ac_cv_c_bigendian = yes; then - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - - BYTEORDER=4321 -else - BYTEORDER=1234 -fi - -cat >>confdefs.h <<_ACEOF -#define BYTEORDER $BYTEORDER -_ACEOF - -if test $ac_cv_c_bigendian = unknown; then - { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5 -echo "$as_me: error: unknown endianess - sorry" >&2;} - { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; } -fi - - -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_const=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((size_t *) 0) - return 0; -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_size_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned -_ACEOF - -fi - - - -for ac_func in memmove bcopy -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - -for ac_header in fcntl.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------------- ## -## Report this to expat-bugs@libexpat.org ## -## -------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (off_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 -if test $ac_cv_type_off_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long -_ACEOF - -fi - - - -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------------- ## -## Report this to expat-bugs@libexpat.org ## -## -------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !STDC_HEADERS && !HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - exit (1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - exit (1); - if (write (fd, data, pagesize) != pagesize) - exit (1); - close (fd); - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - exit (1); - data2 = (char *) malloc (2 * pagesize); - if (!data2) - exit (1); - data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit (1); - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - exit (1); - if (read (fd, data3, pagesize) != pagesize) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit (1); - close (fd); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF - -fi -rm -f conftest.mmap - - -if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then - FILEMAP=unixfilemap -else - FILEMAP=readfilemap -fi - - - -# AC_CPP_FUNC -# ------------------ # -# Checks to see if ANSI C99 CPP variable __func__ works. -# If not, perhaps __FUNCTION__ works instead. -# If not, we'll just define __func__ to "". -# AC_CPP_FUNC - - -echo "$as_me:$LINENO: checking for an ANSI C99-conforming __func__" >&5 -echo $ECHO_N "checking for an ANSI C99-conforming __func__... $ECHO_C" >&6 -if test "${ac_cv_cpp_func+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -char *foo = __func__; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_cpp_func=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -char *foo = __FUNCTION__; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_cpp_func=__FUNCTION__ -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cpp_func=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_cpp_func" >&5 -echo "${ECHO_T}$ac_cv_cpp_func" >&6 -if test $ac_cv_cpp_func = __FUNCTION__; then - -cat >>confdefs.h <<\_ACEOF -#define __func__ __FUNCTION__ -_ACEOF - -elif test $ac_cv_cpp_func = no; then - -cat >>confdefs.h <<\_ACEOF -#define __func__ "" -_ACEOF - -fi - - - - -cat >>confdefs.h <<\_ACEOF -#define XML_NS 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define XML_DTD 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define XML_CONTEXT_BYTES 1024 -_ACEOF - - - ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by expat $as_me 2.0.1, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -expat config.status 2.0.1 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "expat_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS expat_config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@EGREP@,$EGREP,;t t -s,@LN_S@,$LN_S,;t t -s,@ECHO@,$ECHO,;t t -s,@AR@,$AR,;t t -s,@ac_ct_AR@,$ac_ct_AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@DLLTOOL@,$DLLTOOL,;t t -s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t -s,@AS@,$AS,;t t -s,@ac_ct_AS@,$ac_ct_AS,;t t -s,@OBJDUMP@,$OBJDUMP,;t t -s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@CXXCPP@,$CXXCPP,;t t -s,@F77@,$F77,;t t -s,@FFLAGS@,$FFLAGS,;t t -s,@ac_ct_F77@,$ac_ct_F77,;t t -s,@LIBTOOL@,$LIBTOOL,;t t -s,@LIBCURRENT@,$LIBCURRENT,;t t -s,@LIBREVISION@,$LIBREVISION,;t t -s,@LIBAGE@,$LIBAGE,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@FILEMAP@,$FILEMAP,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - -abs_srcdir="`cd $srcdir && pwd`" -abs_builddir="`pwd`" -if test "$abs_srcdir" != "$abs_builddir"; then - make mkdir-init -fi diff --git a/3rdparty/expat-2.0.1/configure.in b/3rdparty/expat-2.0.1/configure.in deleted file mode 100644 index fb2f3a6b99..0000000000 --- a/3rdparty/expat-2.0.1/configure.in +++ /dev/null @@ -1,154 +0,0 @@ -dnl configuration script for expat -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright 2000 Clark Cooper -dnl -dnl This file is part of EXPAT. -dnl -dnl EXPAT is free software; you can redistribute it and/or modify it -dnl under the terms of the License (based on the MIT/X license) contained -dnl in the file COPYING that comes with this distribution. -dnl - -dnl Ensure that Expat is configured with autoconf 2.52 or newer -AC_PREREQ(2.52) - -dnl Get the version number of Expat, using m4's esyscmd() command to run -dnl the command at m4-generation time. This allows us to create an m4 -dnl symbol holding the correct version number. AC_INIT() requires the -dnl version number at m4-time, rather than when ./configure is run, so -dnl all this must happen as part of m4, not as part of the shell code -dnl contained in ./configure. -dnl -dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate -dnl test. I believe this test will work, but I don't have a place with non- -dnl GNU M4 to test it right now. -define([expat_version], ifdef([__gnu__], - [esyscmd(conftools/get-version.sh lib/expat.h)], - [2.0.x])) -AC_INIT(expat, expat_version, expat-bugs@libexpat.org) -undefine([expat_version]) - -AC_CONFIG_SRCDIR(Makefile.in) -AC_CONFIG_AUX_DIR(conftools) - - -dnl -dnl Increment LIBREVISION if source code has changed at all -dnl -dnl If the API has changed, increment LIBCURRENT and set LIBREVISION to 0 -dnl -dnl If the API changes compatibly (i.e. simply adding a new function -dnl without changing or removing earlier interfaces), then increment LIBAGE. -dnl -dnl If the API changes incompatibly set LIBAGE back to 0 -dnl - -LIBCURRENT=6 -LIBREVISION=2 -LIBAGE=5 - -AC_CONFIG_HEADER(expat_config.h) - -sinclude(conftools/libtool.m4) -sinclude(conftools/ac_c_bigendian_cross.m4) - -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -AC_SUBST(LIBCURRENT) -AC_SUBST(LIBREVISION) -AC_SUBST(LIBAGE) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL - -if test "$GCC" = yes ; then - dnl - dnl Be careful about adding the -fexceptions option; some versions of - dnl GCC don't support it and it causes extra warnings that are only - dnl distracting; avoid. - dnl - OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" - CFLAGS="$OLDCFLAGS -fexceptions" - AC_MSG_CHECKING(whether $CC accepts -fexceptions) - AC_TRY_LINK( , , - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") - CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` -fi - -dnl Checks for header files. -AC_HEADER_STDC - -dnl Checks for typedefs, structures, and compiler characteristics. - -dnl Note: Avoid using AC_C_BIGENDIAN because it does not -dnl work in a cross compile. -AC_C_BIGENDIAN_CROSS - -AC_C_CONST -AC_TYPE_SIZE_T -AC_CHECK_FUNCS(memmove bcopy) - -dnl Only needed for xmlwf: -AC_CHECK_HEADERS(fcntl.h unistd.h) -AC_TYPE_OFF_T -AC_FUNC_MMAP - -if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then - FILEMAP=unixfilemap -else - FILEMAP=readfilemap -fi -AC_SUBST(FILEMAP) - -dnl Needed for the test support code; this was found at -dnl http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html - -# AC_CPP_FUNC -# ------------------ # -# Checks to see if ANSI C99 CPP variable __func__ works. -# If not, perhaps __FUNCTION__ works instead. -# If not, we'll just define __func__ to "". -AC_DEFUN([AC_CPP_FUNC], -[AC_REQUIRE([AC_PROG_CC_STDC])dnl -AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], -[[char *foo = __func__;]])], - [ac_cv_cpp_func=yes], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], -[[char *foo = __FUNCTION__;]])], - [ac_cv_cpp_func=__FUNCTION__], - [ac_cv_cpp_func=no])])]) -if test $ac_cv_cpp_func = __FUNCTION__; then - AC_DEFINE(__func__,__FUNCTION__, - [Define to __FUNCTION__ or "" if `__func__' does not conform to -ANSI C.]) -elif test $ac_cv_cpp_func = no; then - AC_DEFINE(__func__,"", - [Define to __FUNCTION__ or "" if `__func__' does not conform to -ANSI C.]) -fi -])# AC_CPP_FUNC - -AC_CPP_FUNC - - -dnl Some basic configuration: -AC_DEFINE([XML_NS], 1, - [Define to make XML Namespaces functionality available.]) -AC_DEFINE([XML_DTD], 1, - [Define to make parameter entity parsing functionality available.]) -AC_DEFINE([XML_CONTEXT_BYTES], 1024, - [Define to specify how much context to retain around the current parse point.]) - -AC_CONFIG_FILES(Makefile) -AC_OUTPUT - -abs_srcdir="`cd $srcdir && pwd`" -abs_builddir="`pwd`" -if test "$abs_srcdir" != "$abs_builddir"; then - make mkdir-init -fi diff --git a/3rdparty/expat-2.0.1/conftools/PrintPath b/3rdparty/expat-2.0.1/conftools/PrintPath deleted file mode 100644 index 9bf25f2c39..0000000000 --- a/3rdparty/expat-2.0.1/conftools/PrintPath +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh -# Look for program[s] somewhere in $PATH. -# -# Options: -# -s -# Do not print out full pathname. (silent) -# -pPATHNAME -# Look in PATHNAME instead of $PATH -# -# Usage: -# PrintPath [-s] [-pPATHNAME] program [program ...] -# -# Initially written by Jim Jagielski for the Apache configuration mechanism -# (with kudos to Kernighan/Pike) -# -# This script falls under the Apache License. -# See http://www.apache.org/licenses/LICENSE - -## -# Some "constants" -## -pathname=$PATH -echo="yes" - -## -# Find out what OS we are running for later on -## -os=`(uname) 2>/dev/null` - -## -# Parse command line -## -for args in $* -do - case $args in - -s ) echo="no" ;; - -p* ) pathname="`echo $args | sed 's/^..//'`" ;; - * ) programs="$programs $args" ;; - esac -done - -## -# Now we make the adjustments required for OS/2 and everyone -# else :) -# -# First of all, all OS/2 programs have the '.exe' extension. -# Next, we adjust PATH (or what was given to us as PATH) to -# be whitespace separated directories. -# Finally, we try to determine the best flag to use for -# test/[] to look for an executable file. OS/2 just has '-r' -# but with other OSs, we do some funny stuff to check to see -# if test/[] knows about -x, which is the preferred flag. -## - -if [ "x$os" = "xOS/2" ] -then - ext=".exe" - pathname=`echo -E $pathname | - sed 's/^;/.;/ - s/;;/;.;/g - s/;$/;./ - s/;/ /g - s/\\\\/\\//g' ` - test_exec_flag="-r" -else - ext="" # No default extensions - pathname=`echo $pathname | - sed 's/^:/.:/ - s/::/:.:/g - s/:$/:./ - s/:/ /g' ` - # Here is how we test to see if test/[] can handle -x - testfile="pp.t.$$" - - cat > $testfile </dev/null`; then - test_exec_flag="-x" - else - test_exec_flag="-r" - fi - rm -f $testfile -fi - -for program in $programs -do - for path in $pathname - do - if [ $test_exec_flag $path/${program}${ext} ] && \ - [ ! -d $path/${program}${ext} ]; then - if [ "x$echo" = "xyes" ]; then - echo $path/${program}${ext} - fi - exit 0 - fi - -# Next try without extension (if one was used above) - if [ "x$ext" != "x" ]; then - if [ $test_exec_flag $path/${program} ] && \ - [ ! -d $path/${program} ]; then - if [ "x$echo" = "xyes" ]; then - echo $path/${program} - fi - exit 0 - fi - fi - done -done -exit 1 - diff --git a/3rdparty/expat-2.0.1/conftools/ac_c_bigendian_cross.m4 b/3rdparty/expat-2.0.1/conftools/ac_c_bigendian_cross.m4 deleted file mode 100644 index e00c66c398..0000000000 --- a/3rdparty/expat-2.0.1/conftools/ac_c_bigendian_cross.m4 +++ /dev/null @@ -1,81 +0,0 @@ -dnl @synopsis AC_C_BIGENDIAN_CROSS -dnl -dnl Check endianess even when crosscompiling -dnl (partially based on the original AC_C_BIGENDIAN). -dnl -dnl The implementation will create a binary, and instead of running -dnl the binary it will be grep'ed for some symbols that will look -dnl different for different endianess of the binary. -dnl -dnl @version $Id: ac_c_bigendian_cross.m4,v 1.2 2001/10/01 20:03:13 fdrake Exp $ -dnl @author Guido Draheim -dnl -AC_DEFUN([AC_C_BIGENDIAN_CROSS], -[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, -[ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -AC_TRY_COMPILE([#include -#include ], [ -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. -AC_TRY_COMPILE([#include -#include ], [ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) -if test $ac_cv_c_bigendian = unknown; then -AC_TRY_RUN([main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); -}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, -[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ]) -fi]) -if test $ac_cv_c_bigendian = unknown; then -AC_MSG_CHECKING(to probe for byte ordering) -[ -cat >conftest.c <&AC_FD_MSG - ac_cv_c_bigendian=yes - fi - if test `grep -l LiTTleEnDian conftest.o` ; then - echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG - if test $ac_cv_c_bigendian = yes ; then - ac_cv_c_bigendian=unknown; - else - ac_cv_c_bigendian=no - fi - fi - echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG - fi - fi -AC_MSG_RESULT($ac_cv_c_bigendian) -fi -if test $ac_cv_c_bigendian = yes; then - AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian]) - BYTEORDER=4321 -else - BYTEORDER=1234 -fi -AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN]) -if test $ac_cv_c_bigendian = unknown; then - AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian) -fi -]) diff --git a/3rdparty/expat-2.0.1/conftools/config.guess b/3rdparty/expat-2.0.1/conftools/config.guess deleted file mode 100644 index d1e4e5c19b..0000000000 --- a/3rdparty/expat-2.0.1/conftools/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/3rdparty/expat-2.0.1/conftools/config.sub b/3rdparty/expat-2.0.1/conftools/config.sub deleted file mode 100644 index 4a0308d3c7..0000000000 --- a/3rdparty/expat-2.0.1/conftools/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/3rdparty/expat-2.0.1/conftools/expat.m4 b/3rdparty/expat-2.0.1/conftools/expat.m4 deleted file mode 100644 index 2d4f876f8a..0000000000 --- a/3rdparty/expat-2.0.1/conftools/expat.m4 +++ /dev/null @@ -1,43 +0,0 @@ -dnl Check if --with-expat[=PREFIX] is specified and -dnl Expat >= 1.95.0 is installed in the system. -dnl If yes, substitute EXPAT_CFLAGS, EXPAT_LIBS with regard to -dnl the specified PREFIX and set with_expat to PREFIX, or 'yes' if PREFIX -dnl has not been specified. Also HAVE_LIBEXPAT, HAVE_EXPAT_H are defined. -dnl If --with-expat has not been specified, set with_expat to 'no'. -dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly. -dnl This is necessary to adapt a whole lot of packages that have expat -dnl bundled as a static library. -AC_DEFUN(AM_WITH_EXPAT, -[ AC_ARG_WITH(expat, - [ --with-expat=PREFIX Use system Expat library], - , with_expat=no) - - AM_CONDITIONAL(EXPAT_INSTALLED, test $with_expat != no) - - EXPAT_CFLAGS= - EXPAT_LIBS= - if test $with_expat != no; then - if test $with_expat != yes; then - EXPAT_CFLAGS="-I$with_expat/include" - EXPAT_LIBS="-L$with_expat/lib" - fi - AC_CHECK_LIB(expat, XML_ParserCreate, - [ EXPAT_LIBS="$EXPAT_LIBS -lexpat" - expat_found=yes ], - [ expat_found=no ], - "$EXPAT_LIBS") - if test $expat_found = no; then - AC_MSG_ERROR([Could not find the Expat library]) - fi - expat_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $EXPAT_CFLAGS" - AC_CHECK_HEADERS(expat.h, , expat_found=no) - if test $expat_found = no; then - AC_MSG_ERROR([Could not find expat.h]) - fi - CFLAGS="$expat_save_CFLAGS" - fi - - AC_SUBST(EXPAT_CFLAGS) - AC_SUBST(EXPAT_LIBS) -]) diff --git a/3rdparty/expat-2.0.1/conftools/get-version.sh b/3rdparty/expat-2.0.1/conftools/get-version.sh deleted file mode 100644 index a70e0fb47a..0000000000 --- a/3rdparty/expat-2.0.1/conftools/get-version.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# USAGE: get-version.sh path/to/expat.h -# -# This script will print Expat's version number on stdout. For example: -# -# $ ./conftools/get-version.sh ./lib/expat.h -# 1.95.3 -# $ -# - -if test $# = 0; then - echo "ERROR: pathname for expat.h was not provided." - echo "" - echo "USAGE: $0 path/to/expat.h" - exit 1 -fi -if test $# != 1; then - echo "ERROR: too many arguments were provided." - echo "" - echo "USAGE: $0 path/to/expat.h" - exit 1 -fi - -hdr="$1" -if test ! -r "$hdr"; then - echo "ERROR: '$hdr' does not exist, or is not readable." - exit 1 -fi - -MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" -MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" -MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" - -# Determine how to tell echo not to print the trailing \n. This is -# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't -# generate this file via autoconf (in fact, get-version.sh is used -# to *create* ./configure), so we just do something similar inline. -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ;; - *c*,* ) ECHO_N=-n ECHO_C= ;; - *) ECHO_N= ECHO_C='\c' ;; -esac - -echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C" diff --git a/3rdparty/expat-2.0.1/conftools/install-sh b/3rdparty/expat-2.0.1/conftools/install-sh deleted file mode 100644 index 7dc2f28973..0000000000 --- a/3rdparty/expat-2.0.1/conftools/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/3rdparty/expat-2.0.1/conftools/libtool.m4 b/3rdparty/expat-2.0.1/conftools/libtool.m4 deleted file mode 100644 index cf05d759eb..0000000000 --- a/3rdparty/expat-2.0.1/conftools/libtool.m4 +++ /dev/null @@ -1,6397 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This file is free software; the Free Software Foundation gives -## unlimited permission to copy and/or distribute it, with or without -## modifications, as long as this notice is preserved. - -# serial 48 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix3*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_MSG_RESULT([$SED]) -]) diff --git a/3rdparty/expat-2.0.1/conftools/ltmain.sh b/3rdparty/expat-2.0.1/conftools/ltmain.sh deleted file mode 100644 index 06823e057a..0000000000 --- a/3rdparty/expat-2.0.1/conftools/ltmain.sh +++ /dev/null @@ -1,6863 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - fi - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/3rdparty/expat-2.0.1/conftools/mkinstalldirs b/3rdparty/expat-2.0.1/conftools/mkinstalldirs deleted file mode 100644 index 6aa9743ab6..0000000000 --- a/3rdparty/expat-2.0.1/conftools/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1 2000/09/18 16:26:21 coopercc Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/3rdparty/expat-2.0.1/doc/expat.png b/3rdparty/expat-2.0.1/doc/expat.png deleted file mode 100644 index 5bc0726cfd..0000000000 Binary files a/3rdparty/expat-2.0.1/doc/expat.png and /dev/null differ diff --git a/3rdparty/expat-2.0.1/doc/reference.html b/3rdparty/expat-2.0.1/doc/reference.html deleted file mode 100644 index 042c358da9..0000000000 --- a/3rdparty/expat-2.0.1/doc/reference.html +++ /dev/null @@ -1,2341 +0,0 @@ - - - - - - Expat XML Parser - - - - - - - - - - - - - - -
(Expat logo)
Release 2.0.1
-
- -

Expat is a library, written in C, for parsing XML documents. It's -the underlying XML parser for the open source Mozilla project, Perl's -XML::Parser, Python's xml.parsers.expat, and -other open-source XML parsers.

- -

This library is the creation of James Clark, who's also given us -groff (an nroff look-alike), Jade (an implemention of ISO's DSSSL -stylesheet language for SGML), XP (a Java XML parser package), XT (a -Java XSL engine). James was also the technical lead on the XML -Working Group at W3C that produced the XML specification.

- -

This is free software, licensed under the MIT/X Consortium license. You may download it -from the Expat home page. -

- -

The bulk of this document was originally commissioned as an article -by XML.com. They graciously allowed -Clark Cooper to retain copyright and to distribute it with Expat. -This version has been substantially extended to include documentation -on features which have been added since the original article was -published, and additional information on using the original -interface.

- -
-

Table of Contents

- - -
-

Overview

- -

Expat is a stream-oriented parser. You register callback (or -handler) functions with the parser and then start feeding it the -document. As the parser recognizes parts of the document, it will -call the appropriate handler for that part (if you've registered one.) -The document is fed to the parser in pieces, so you can start parsing -before you have all the document. This also allows you to parse really -huge documents that won't fit into memory.

- -

Expat can be intimidating due to the many kinds of handlers and -options you can set. But you only need to learn four functions in -order to do 90% of what you'll want to do with it:

- -
- -
XML_ParserCreate
-
Create a new parser object.
- -
XML_SetElementHandler
-
Set handlers for start and end tags.
- -
XML_SetCharacterDataHandler
-
Set handler for text.
- -
XML_Parse
-
Pass a buffer full of document to the parser
-
- -

These functions and others are described in the reference part of this document. The reference -section also describes in detail the parameters passed to the -different types of handlers.

- -

Let's look at a very simple example program that only uses 3 of the -above functions (it doesn't need to set a character handler.) The -program outline.c prints an -element outline, indenting child elements to distinguish them from the -parent element that contains them. The start handler does all the -work. It prints two indenting spaces for every level of ancestor -elements, then it prints the element and attribute -information. Finally it increments the global Depth -variable.

- -
-int Depth;
-
-void XMLCALL
-start(void *data, const char *el, const char **attr) {
-  int i;
-
-  for (i = 0; i < Depth; i++)
-    printf("  ");
-
-  printf("%s", el);
-
-  for (i = 0; attr[i]; i += 2) {
-    printf(" %s='%s'", attr[i], attr[i + 1]);
-  }
-
-  printf("\n");
-  Depth++;
-}  /* End of start handler */
-
- -

The end tag simply does the bookkeeping work of decrementing -Depth.

-
-void XMLCALL
-end(void *data, const char *el) {
-  Depth--;
-}  /* End of end handler */
-
- -

Note the XMLCALL annotation used for the callbacks. -This is used to ensure that the Expat and the callbacks are using the -same calling convention in case the compiler options used for Expat -itself and the client code are different. Expat tries not to care -what the default calling convention is, though it may require that it -be compiled with a default convention of "cdecl" on some platforms. -For code which uses Expat, however, the calling convention is -specified by the XMLCALL annotation on most platforms; -callbacks should be defined using this annotation.

- -

The XMLCALL annotation was added in Expat 1.95.7, but -existing working Expat applications don't need to add it (since they -are already using the "cdecl" calling convention, or they wouldn't be -working). The annotation is only needed if the default calling -convention may be something other than "cdecl". To use the annotation -safely with older versions of Expat, you can conditionally define it -after including Expat's header file:

- -
-#include <expat.h>
-
-#ifndef XMLCALL
-#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
-#define XMLCALL __cdecl
-#elif defined(__GNUC__)
-#define XMLCALL __attribute__((cdecl))
-#else
-#define XMLCALL
-#endif
-#endif
-
- -

After creating the parser, the main program just has the job of -shoveling the document to the parser so that it can do its work.

- -
-

Building and Installing Expat

- -

The Expat distribution comes as a compressed (with GNU gzip) tar -file. You may download the latest version from Source Forge. After -unpacking this, cd into the directory. Then follow either the Win32 -directions or Unix directions below.

- -

Building under Win32

- -

If you're using the GNU compiler under cygwin, follow the Unix -directions in the next section. Otherwise if you have Microsoft's -Developer Studio installed, then from Windows Explorer double-click on -"expat.dsp" in the lib directory and build and install in the usual -manner.

- -

Alternatively, you may download the Win32 binary package that -contains the "expat.h" include file and a pre-built DLL.

- -

Building under Unix (or GNU)

- -

First you'll need to run the configure shell script in order to -configure the Makefiles and headers for your system.

- -

If you're happy with all the defaults that configure picks for you, -and you have permission on your system to install into /usr/local, you -can install Expat with this sequence of commands:

- -
-./configure
-make
-make install
-
- -

There are some options that you can provide to this script, but the -only one we'll mention here is the --prefix option. You -can find out all the options available by running configure with just -the --help option.

- -

By default, the configure script sets things up so that the library -gets installed in /usr/local/lib and the associated -header file in /usr/local/include. But if you were to -give the option, --prefix=/home/me/mystuff, then the -library and header would get installed in -/home/me/mystuff/lib and -/home/me/mystuff/include respectively.

- -

Configuring Expat Using the Pre-Processor

- -

Expat's feature set can be configured using a small number of -pre-processor definitions. The definition of this symbols does not -affect the set of entry points for Expat, only the behavior of the API -and the definition of character types in the case of -XML_UNICODE_WCHAR_T. The symbols are:

- -
-
XML_DTD
-
Include support for using and reporting DTD-based content. If -this is defined, default attribute values from an external DTD subset -are reported and attribute value normalization occurs based on the -type of attributes defined in the external subset. Without -this, Expat has a smaller memory footprint and can be faster, but will -not load external entities or process conditional sections. This does -not affect the set of functions available in the API.
- -
XML_NS
-
When defined, support for the Namespaces in XML -specification is included.
- -
XML_UNICODE
-
When defined, character data reported to the application is -encoded in UTF-16 using wide characters of the type -XML_Char. This is implied if -XML_UNICODE_WCHAR_T is defined.
- -
XML_UNICODE_WCHAR_T
-
If defined, causes the XML_Char character type to be -defined using the wchar_t type; otherwise, unsigned -short is used. Defining this implies -XML_UNICODE.
- -
XML_LARGE_SIZE
-
If defined, causes the XML_Size and XML_Index -integer types to be at least 64 bits in size. This is intended to support -processing of very large input streams, where the return values of -XML_GetCurrentByteIndex, -XML_GetCurrentLineNumber and -XML_GetCurrentColumnNumber -could overflow. It may not be supported by all compilers, and is turned -off by default.
- -
XML_CONTEXT_BYTES
-
The number of input bytes of markup context which the parser will -ensure are available for reporting via XML_GetInputContext. This is -normally set to 1024, and must be set to a positive interger. If this -is not defined, the input context will not be available and XML_GetInputContext will -always report NULL. Without this, Expat has a smaller memory -footprint and can be faster.
- -
XML_STATIC
-
On Windows, this should be set if Expat is going to be linked -statically with the code that calls it; this is required to get all -the right MSVC magic annotations correct. This is ignored on other -platforms.
-
- -
-

Using Expat

- -

Compiling and Linking Against Expat

- -

Unless you installed Expat in a location not expected by your -compiler and linker, all you have to do to use Expat in your programs -is to include the Expat header (#include <expat.h>) -in your files that make calls to it and to tell the linker that it -needs to link against the Expat library. On Unix systems, this would -usually be done with the -lexpat argument. Otherwise, -you'll need to tell the compiler where to look for the Expat header -and the linker where to find the Expat library. You may also need to -take steps to tell the operating system where to find this library at -run time.

- -

On a Unix-based system, here's what a Makefile might look like when -Expat is installed in a standard location:

- -
-CC=cc
-LDFLAGS=
-LIBS= -lexpat
-xmlapp: xmlapp.o
-        $(CC) $(LDFLAGS) -o xmlapp xmlapp.o $(LIBS)
-
- -

If you installed Expat in, say, /home/me/mystuff, then -the Makefile would look like this:

- -
-CC=cc
-CFLAGS= -I/home/me/mystuff/include
-LDFLAGS=
-LIBS= -L/home/me/mystuff/lib -lexpat
-xmlapp: xmlapp.o
-        $(CC) $(LDFLAGS) -o xmlapp xmlapp.o $(LIBS)
-
- -

You'd also have to set the environment variable -LD_LIBRARY_PATH to /home/me/mystuff/lib (or -to ${LD_LIBRARY_PATH}:/home/me/mystuff/lib if -LD_LIBRARY_PATH already has some directories in it) in order to run -your application.

- -

Expat Basics

- -

As we saw in the example in the overview, the first step in parsing -an XML document with Expat is to create a parser object. There are three functions in the Expat API for creating a -parser object. However, only two of these (XML_ParserCreate and XML_ParserCreateNS) can be used for -constructing a parser for a top-level document. The object returned -by these functions is an opaque pointer (i.e. "expat.h" declares it as -void *) to data with further internal structure. In order to free the -memory associated with this object you must call XML_ParserFree. Note that if you have -provided any user data that gets stored in the -parser, then your application is responsible for freeing it prior to -calling XML_ParserFree.

- -

The objects returned by the parser creation functions are good for -parsing only one XML document or external parsed entity. If your -application needs to parse many XML documents, then it needs to create -a parser object for each one. The best way to deal with this is to -create a higher level object that contains all the default -initialization you want for your parser objects.

- -

Walking through a document hierarchy with a stream oriented parser -will require a good stack mechanism in order to keep track of current -context. For instance, to answer the simple question, "What element -does this text belong to?" requires a stack, since the parser may have -descended into other elements that are children of the current one and -has encountered this text on the way out.

- -

The things you're likely to want to keep on a stack are the -currently opened element and it's attributes. You push this -information onto the stack in the start handler and you pop it off in -the end handler.

- -

For some tasks, it is sufficient to just keep information on what -the depth of the stack is (or would be if you had one.) The outline -program shown above presents one example. Another such task would be -skipping over a complete element. When you see the start tag for the -element you want to skip, you set a skip flag and record the depth at -which the element started. When the end tag handler encounters the -same depth, the skipped element has ended and the flag may be -cleared. If you follow the convention that the root element starts at -1, then you can use the same variable for skip flag and skip -depth.

- -
-void
-init_info(Parseinfo *info) {
-  info->skip = 0;
-  info->depth = 1;
-  /* Other initializations here */
-}  /* End of init_info */
-
-void XMLCALL
-rawstart(void *data, const char *el, const char **attr) {
-  Parseinfo *inf = (Parseinfo *) data;
-
-  if (! inf->skip) {
-    if (should_skip(inf, el, attr)) {
-      inf->skip = inf->depth;
-    }
-    else
-      start(inf, el, attr);     /* This does rest of start handling */
-  }
-
-  inf->depth++;
-}  /* End of rawstart */
-
-void XMLCALL
-rawend(void *data, const char *el) {
-  Parseinfo *inf = (Parseinfo *) data;
-
-  inf->depth--;
-
-  if (! inf->skip)
-    end(inf, el);              /* This does rest of end handling */
-
-  if (inf->skip == inf->depth)
-    inf->skip = 0;
-}  /* End rawend */
-
- -

Notice in the above example the difference in how depth is -manipulated in the start and end handlers. The end tag handler should -be the mirror image of the start tag handler. This is necessary to -properly model containment. Since, in the start tag handler, we -incremented depth after the main body of start tag code, then -in the end handler, we need to manipulate it before the main -body. If we'd decided to increment it first thing in the start -handler, then we'd have had to decrement it last thing in the end -handler.

- -

Communicating between handlers

- -

In order to be able to pass information between different handlers -without using globals, you'll need to define a data structure to hold -the shared variables. You can then tell Expat (with the XML_SetUserData function) to pass a -pointer to this structure to the handlers. This is the first -argument received by most handlers. In the reference section, an argument to a callback function is named -userData and have type void * if the user -data is passed; it will have the type XML_Parser if the -parser itself is passed. When the parser is passed, the user data may -be retrieved using XML_GetUserData.

- -

One common case where multiple calls to a single handler may need -to communicate using an application data structure is the case when -content passed to the character data handler (set by XML_SetCharacterDataHandler) needs to be accumulated. A -common first-time mistake with any of the event-oriented interfaces to -an XML parser is to expect all the text contained in an element to be -reported by a single call to the character data handler. Expat, like -many other XML parsers, reports such data as a sequence of calls; -there's no way to know when the end of the sequence is reached until a -different callback is made. A buffer referenced by the user data -structure proves both an effective and convenient place to accumulate -character data.

- - - - -

XML Version

- -

Expat is an XML 1.0 parser, and as such never complains based on -the value of the version pseudo-attribute in the XML -declaration, if present.

- -

If an application needs to check the version number (to support -alternate processing), it should use the XML_SetXmlDeclHandler function to -set a handler that uses the information in the XML declaration to -determine what to do. This example shows how to check that only a -version number of "1.0" is accepted:

- -
-static int wrong_version;
-static XML_Parser parser;
-
-static void XMLCALL
-xmldecl_handler(void            *userData,
-                const XML_Char  *version,
-                const XML_Char  *encoding,
-                int              standalone)
-{
-  static const XML_Char Version_1_0[] = {'1', '.', '0', 0};
-
-  int i;
-
-  for (i = 0; i < (sizeof(Version_1_0) / sizeof(Version_1_0[0])); ++i) {
-    if (version[i] != Version_1_0[i]) {
-      wrong_version = 1;
-      /* also clear all other handlers: */
-      XML_SetCharacterDataHandler(parser, NULL);
-      ...
-      return;
-    }
-  }
-  ...
-}
-
- -

Namespace Processing

- -

When the parser is created using the XML_ParserCreateNS, function, Expat -performs namespace processing. Under namespace processing, Expat -consumes xmlns and xmlns:... attributes, -which declare namespaces for the scope of the element in which they -occur. This means that your start handler will not see these -attributes. Your application can still be informed of these -declarations by setting namespace declaration handlers with XML_SetNamespaceDeclHandler.

- -

Element type and attribute names that belong to a given namespace -are passed to the appropriate handler in expanded form. By default -this expanded form is a concatenation of the namespace URI, the -separator character (which is the 2nd argument to XML_ParserCreateNS), and the local -name (i.e. the part after the colon). Names with undeclared prefixes -are not well-formed when namespace processing is enabled, and will -trigger an error. Unprefixed attribute names are never expanded, -and unprefixed element names are only expanded when they are in the -scope of a default namespace.

- -

However if XML_SetReturnNSTriplet has been called with a non-zero -do_nst parameter, then the expanded form for names with -an explicit prefix is a concatenation of: URI, separator, local name, -separator, prefix.

- -

You can set handlers for the start of a namespace declaration and -for the end of a scope of a declaration with the XML_SetNamespaceDeclHandler -function. The StartNamespaceDeclHandler is called prior to the start -tag handler and the EndNamespaceDeclHandler is called after the -corresponding end tag that ends the namespace's scope. The namespace -start handler gets passed the prefix and URI for the namespace. For a -default namespace declaration (xmlns='...'), the prefix will be null. -The URI will be null for the case where the default namespace is being -unset. The namespace end handler just gets the prefix for the closing -scope.

- -

These handlers are called for each declaration. So if, for -instance, a start tag had three namespace declarations, then the -StartNamespaceDeclHandler would be called three times before the start -tag handler is called, once for each declaration.

- -

Character Encodings

- -

While XML is based on Unicode, and every XML processor is required -to recognized UTF-8 and UTF-16 (1 and 2 byte encodings of Unicode), -other encodings may be declared in XML documents or entities. For the -main document, an XML declaration may contain an encoding -declaration:

-
-<?xml version="1.0" encoding="ISO-8859-2"?>
-
- -

External parsed entities may begin with a text declaration, which -looks like an XML declaration with just an encoding declaration:

-
-<?xml encoding="Big5"?>
-
- -

With Expat, you may also specify an encoding at the time of -creating a parser. This is useful when the encoding information may -come from a source outside the document itself (like a higher level -protocol.)

- -

There are four built-in encodings -in Expat:

-
    -
  • UTF-8
  • -
  • UTF-16
  • -
  • ISO-8859-1
  • -
  • US-ASCII
  • -
- -

Anything else discovered in an encoding declaration or in the -protocol encoding specified in the parser constructor, triggers a call -to the UnknownEncodingHandler. This handler gets passed -the encoding name and a pointer to an XML_Encoding data -structure. Your handler must fill in this structure and return -XML_STATUS_OK if it knows how to deal with the -encoding. Otherwise the handler should return -XML_STATUS_ERROR. The handler also gets passed a pointer -to an optional application data structure that you may indicate when -you set the handler.

- -

Expat places restrictions on character encodings that it can -support by filling in the XML_Encoding structure. -include file:

-
    -
  1. Every ASCII character that can appear in a well-formed XML document -must be represented by a single byte, and that byte must correspond to -it's ASCII encoding (except for the characters $@\^'{}~)
  2. -
  3. Characters must be encoded in 4 bytes or less.
  4. -
  5. All characters encoded must have Unicode scalar values less than or -equal to 65535 (0xFFFF)This does not apply to the built-in support -for UTF-16 and UTF-8
  6. -
  7. No character may be encoded by more that one distinct sequence of -bytes
  8. -
- -

XML_Encoding contains an array of integers that -correspond to the 1st byte of an encoding sequence. If the value in -the array for a byte is zero or positive, then the byte is a single -byte encoding that encodes the Unicode scalar value contained in the -array. A -1 in this array indicates a malformed byte. If the value is --2, -3, or -4, then the byte is the beginning of a 2, 3, or 4 byte -sequence respectively. Multi-byte sequences are sent to the convert -function pointed at in the XML_Encoding structure. This -function should return the Unicode scalar value for the sequence or -1 -if the sequence is malformed.

- -

One pitfall that novice Expat users are likely to fall into is that -although Expat may accept input in various encodings, the strings that -it passes to the handlers are always encoded in UTF-8 or UTF-16 -(depending on how Expat was compiled). Your application is responsible -for any translation of these strings into other encodings.

- -

Handling External Entity References

- -

Expat does not read or parse external entities directly. Note that -any external DTD is a special case of an external entity. If you've -set no ExternalEntityRefHandler, then external entity -references are silently ignored. Otherwise, it calls your handler with -the information needed to read and parse the external entity.

- -

Your handler isn't actually responsible for parsing the entity, but -it is responsible for creating a subsidiary parser with XML_ExternalEntityParserCreate that will do the job. This -returns an instance of XML_Parser that has handlers and -other data structures initialized from the parent parser. You may then -use XML_Parse or XML_ParseBuffer calls against this -parser. Since external entities my refer to other external entities, -your handler should be prepared to be called recursively.

- -

Parsing DTDs

- -

In order to parse parameter entities, before starting the parse, -you must call XML_SetParamEntityParsing with one of the following -arguments:

-
-
XML_PARAM_ENTITY_PARSING_NEVER
-
Don't parse parameter entities or the external subset
-
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
-
Parse parameter entites and the external subset unless -standalone was set to "yes" in the XML declaration.
-
XML_PARAM_ENTITY_PARSING_ALWAYS
-
Always parse parameter entities and the external subset
-
- -

In order to read an external DTD, you also have to set an external -entity reference handler as described above.

- -

Temporarily Stopping Parsing

- -

Expat 1.95.8 introduces a new feature: its now possible to stop -parsing temporarily from within a handler function, even if more data -has already been passed into the parser. Applications for this -include

- -
    -
  • Supporting the XInclude specification.
  • - -
  • Delaying further processing until additional information is - available from some other source.
  • - -
  • Adjusting processor load as task priorities shift within an - application.
  • - -
  • Stopping parsing completely (simply free or reset the parser - instead of resuming in the outer parsing loop). This can be useful - if a application-domain error is found in the XML being parsed or if - the result of the parse is determined not to be useful after - all.
  • -
- -

To take advantage of this feature, the main parsing loop of an -application needs to support this specifically. It cannot be -supported with a parsing loop compatible with Expat 1.95.7 or -earlier (though existing loops will continue to work without -supporting the stop/resume feature).

- -

An application that uses this feature for a single parser will have -the rough structure (in pseudo-code):

- -
-fd = open_input()
-p = create_parser()
-
-if parse_xml(p, fd) {
-  /* suspended */
-
-  int suspended = 1;
-
-  while (suspended) {
-    do_something_else()
-    if ready_to_resume() {
-      suspended = continue_parsing(p, fd);
-    }
-  }
-}
-
- -

An application that may resume any of several parsers based on -input (either from the XML being parsed or some other source) will -certainly have more interesting control structures.

- -

This C function could be used for the parse_xml -function mentioned in the pseudo-code above:

- -
-#define BUFF_SIZE 10240
-
-/* Parse a document from the open file descriptor 'fd' until the parse
-   is complete (the document has been completely parsed, or there's
-   been an error), or the parse is stopped.  Return non-zero when
-   the parse is merely suspended.
-*/
-int
-parse_xml(XML_Parser p, int fd)
-{
-  for (;;) {
-    int last_chunk;
-    int bytes_read;
-    enum XML_Status status;
-
-    void *buff = XML_GetBuffer(p, BUFF_SIZE);
-    if (buff == NULL) {
-      /* handle error... */
-      return 0;
-    }
-    bytes_read = read(fd, buff, BUFF_SIZE);
-    if (bytes_read < 0) {
-      /* handle error... */
-      return 0;
-    }
-    status = XML_ParseBuffer(p, bytes_read, bytes_read == 0);
-    switch (status) {
-      case XML_STATUS_ERROR:
-        /* handle error... */
-        return 0;
-      case XML_STATUS_SUSPENDED:
-        return 1;
-    }
-    if (bytes_read == 0)
-      return 0;
-  }
-}
-
- -

The corresponding continue_parsing function is -somewhat simpler, since it only need deal with the return code from -XML_ResumeParser; it can -delegate the input handling to the parse_xml -function:

- -
-/* Continue parsing a document which had been suspended.  The 'p' and
-   'fd' arguments are the same as passed to parse_xml().  Return
-   non-zero when the parse is suspended.
-*/
-int
-continue_parsing(XML_Parser p, int fd)
-{
-  enum XML_Status status = XML_ResumeParser(p);
-  switch (status) {
-    case XML_STATUS_ERROR:
-      /* handle error... */
-      return 0;
-    case XML_ERROR_NOT_SUSPENDED:
-      /* handle error... */
-      return 0;.
-    case XML_STATUS_SUSPENDED:
-      return 1;
-  }
-  return parse_xml(p, fd);
-}
-
- -

Now that we've seen what a mess the top-level parsing loop can -become, what have we gained? Very simply, we can now use the XML_StopParser function to stop -parsing, without having to go to great lengths to avoid additional -processing that we're expecting to ignore. As a bonus, we get to stop -parsing temporarily, and come back to it when we're -ready.

- -

To stop parsing from a handler function, use the XML_StopParser function. This function -takes two arguments; the parser being stopped and a flag indicating -whether the parse can be resumed in the future.

- - - - -
- - -

Expat Reference

- -

Parser Creation

- -
-XML_Parser XMLCALL
-XML_ParserCreate(const XML_Char *encoding);
-
-
-Construct a new parser. If encoding is non-null, it specifies a -character encoding to use for the document. This overrides the document -encoding declaration. There are four built-in encodings: -
    -
  • US-ASCII
  • -
  • UTF-8
  • -
  • UTF-16
  • -
  • ISO-8859-1
  • -
-Any other value will invoke a call to the UnknownEncodingHandler. -
- -
-XML_Parser XMLCALL
-XML_ParserCreateNS(const XML_Char *encoding,
-                   XML_Char sep);
-
-
-Constructs a new parser that has namespace processing in effect. Namespace -expanded element names and attribute names are returned as a concatenation -of the namespace URI, sep, and the local part of the name. This -means that you should pick a character for sep that can't be -part of a legal URI. There is a special case when sep is the null -character '\0': the namespace URI and the local part will be -concatenated without any separator - this is intended to support RDF processors. -It is a programming error to use the null separator with -namespace triplets.
- -
-XML_Parser XMLCALL
-XML_ParserCreate_MM(const XML_Char *encoding,
-                    const XML_Memory_Handling_Suite *ms,
-		    const XML_Char *sep);
-
-
-typedef struct {
-  void *(XMLCALL *malloc_fcn)(size_t size);
-  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);
-  void (XMLCALL *free_fcn)(void *ptr);
-} XML_Memory_Handling_Suite;
-
-
-

Construct a new parser using the suite of memory handling functions -specified in ms. If ms is NULL, then use the -standard set of memory management functions. If sep is -non NULL, then namespace processing is enabled in the created parser -and the character pointed at by sep is used as the separator between -the namespace URI and the local part of the name.

-
- -
-XML_Parser XMLCALL
-XML_ExternalEntityParserCreate(XML_Parser p,
-                               const XML_Char *context,
-                               const XML_Char *encoding);
-
-
-Construct a new XML_Parser object for parsing an external -general entity. Context is the context argument passed in a call to a -ExternalEntityRefHandler. Other state information such as handlers, -user data, namespace processing is inherited from the parser passed as -the 1st argument. So you shouldn't need to call any of the behavior -changing functions on this parser (unless you want it to act -differently than the parent parser). -
- -
-void XMLCALL
-XML_ParserFree(XML_Parser p);
-
-
-Free memory used by the parser. Your application is responsible for -freeing any memory associated with user data. -
- -
-XML_Bool XMLCALL
-XML_ParserReset(XML_Parser p,
-                const XML_Char *encoding);
-
-
-Clean up the memory structures maintained by the parser so that it may -be used again. After this has been called, parser is -ready to start parsing a new document. All handlers are cleared from -the parser, except for the unknownEncodingHandler. The parser's external -state is re-initialized except for the values of ns and ns_triplets. -This function may not be used on a parser created using XML_ExternalEntityParserCreate; it will return XML_FALSE in that case. Returns -XML_TRUE on success. Your application is responsible for -dealing with any memory associated with user data. -
- -

Parsing

- -

To state the obvious: the three parsing functions XML_Parse, -XML_ParseBuffer and -XML_GetBuffer must not be called from within a handler -unless they operate on a separate parser instance, that is, one that -did not call the handler. For example, it is OK to call the parsing -functions from within an XML_ExternalEntityRefHandler, -if they apply to the parser created by -XML_ExternalEntityParserCreate.

- -

Note: the len argument passed to these functions -should be considerably less than the maximum value for an integer, -as it could create an integer overflow situation if the added -lengths of a buffer and the unprocessed portion of the previous buffer -exceed the maximum integer value. Input data at the end of a buffer -will remain unprocessed if it is part of an XML token for which the -end is not part of that buffer.

- -
-enum XML_Status XMLCALL
-XML_Parse(XML_Parser p,
-          const char *s,
-          int len,
-          int isFinal);
-
-
-enum XML_Status {
-  XML_STATUS_ERROR = 0,
-  XML_STATUS_OK = 1
-};
-
-
-Parse some more of the document. The string s is a buffer -containing part (or perhaps all) of the document. The number of bytes of s -that are part of the document is indicated by len. This means -that s doesn't have to be null terminated. It also means that -if len is larger than the number of bytes in the block of -memory that s points at, then a memory fault is likely. The -isFinal parameter informs the parser that this is the last -piece of the document. Frequently, the last piece is empty (i.e. -len is zero.) -If a parse error occurred, it returns XML_STATUS_ERROR. -Otherwise it returns XML_STATUS_OK value. -
- -
-enum XML_Status XMLCALL
-XML_ParseBuffer(XML_Parser p,
-                int len,
-                int isFinal);
-
-
-This is just like XML_Parse, -except in this case Expat provides the buffer. By obtaining the -buffer from Expat with the XML_GetBuffer function, the application can avoid double -copying of the input. -
- -
-void * XMLCALL
-XML_GetBuffer(XML_Parser p,
-              int len);
-
-
-Obtain a buffer of size len to read a piece of the document -into. A NULL value is returned if Expat can't allocate enough memory for -this buffer. This has to be called prior to every call to -XML_ParseBuffer. A -typical use would look like this: - -
-for (;;) {
-  int bytes_read;
-  void *buff = XML_GetBuffer(p, BUFF_SIZE);
-  if (buff == NULL) {
-    /* handle error */
-  }
-
-  bytes_read = read(docfd, buff, BUFF_SIZE);
-  if (bytes_read < 0) {
-    /* handle error */
-  }
-
-  if (! XML_ParseBuffer(p, bytes_read, bytes_read == 0)) {
-    /* handle parse error */
-  }
-
-  if (bytes_read == 0)
-    break;
-}
-
-
- -
-enum XML_Status XMLCALL
-XML_StopParser(XML_Parser p,
-               XML_Bool resumable);
-
-
- -

Stops parsing, causing XML_Parse or XML_ParseBuffer to return. Must be called from within a -call-back handler, except when aborting (when resumable -is XML_FALSE) an already suspended parser. Some -call-backs may still follow because they would otherwise get -lost, including -

    -
  • the end element handler for empty elements when stopped in the - start element handler,
  • -
  • the end namespace declaration handler when stopped in the end - element handler,
  • -
  • the character data handler when stopped in the character data handler - while making multiple call-backs on a contiguous chunk of characters,
  • -
-and possibly others.

- -

This can be called from most handlers, including DTD related -call-backs, except when parsing an external parameter entity and -resumable is XML_TRUE. Returns -XML_STATUS_OK when successful, -XML_STATUS_ERROR otherwise. The possible error codes -are:

-
-
XML_ERROR_SUSPENDED
-
when suspending an already suspended parser.
-
XML_ERROR_FINISHED
-
when the parser has already finished.
-
XML_ERROR_SUSPEND_PE
-
when suspending while parsing an external PE.
-
- -

Since the stop/resume feature requires application support in the -outer parsing loop, it is an error to call this function for a parser -not being handled appropriately; see Temporarily Stopping Parsing for more information.

- -

When resumable is XML_TRUE then parsing -is suspended, that is, XML_Parse and XML_ParseBuffer return XML_STATUS_SUSPENDED. -Otherwise, parsing is aborted, that is, XML_Parse and XML_ParseBuffer return -XML_STATUS_ERROR with error code -XML_ERROR_ABORTED.

- -

Note: -This will be applied to the current parser instance only, that is, if -there is a parent parser then it will continue parsing when the -external entity reference handler returns. It is up to the -implementation of that handler to call XML_StopParser on the parent parser -(recursively), if one wants to stop parsing altogether.

- -

When suspended, parsing can be resumed by calling XML_ResumeParser.

- -

New in Expat 1.95.8.

-
- -
-enum XML_Status XMLCALL
-XML_ResumeParser(XML_Parser p);
-
-
-

Resumes parsing after it has been suspended with XML_StopParser. Must not be called from -within a handler call-back. Returns same status codes as XML_Parse or XML_ParseBuffer. An additional error -code, XML_ERROR_NOT_SUSPENDED, will be returned if the -parser was not currently suspended.

- -

Note: -This must be called on the most deeply nested child parser instance -first, and on its parent parser only after the child parser has -finished, to be applied recursively until the document entity's parser -is restarted. That is, the parent parser will not resume by itself -and it is up to the application to call XML_ResumeParser on it at the -appropriate moment.

- -

New in Expat 1.95.8.

-
- -
-void XMLCALL
-XML_GetParsingStatus(XML_Parser p,
-                     XML_ParsingStatus *status);
-
-
-enum XML_Parsing {
-  XML_INITIALIZED,
-  XML_PARSING,
-  XML_FINISHED,
-  XML_SUSPENDED
-};
-
-typedef struct {
-  enum XML_Parsing parsing;
-  XML_Bool finalBuffer;
-} XML_ParsingStatus;
-
-
-

Returns status of parser with respect to being initialized, -parsing, finished, or suspended, and whether the final buffer is being -processed. The status parameter must not be -NULL.

- -

New in Expat 1.95.8.

-
- - -

Handler Setting

- -

Although handlers are typically set prior to parsing and left alone, an -application may choose to set or change the handler for a parsing event -while the parse is in progress. For instance, your application may choose -to ignore all text not descended from a para element. One -way it could do this is to set the character handler when a para start tag -is seen, and unset it for the corresponding end tag.

- -

A handler may be unset by providing a NULL pointer to the -appropriate handler setter. None of the handler setting functions have -a return value.

- -

Your handlers will be receiving strings in arrays of type -XML_Char. This type is conditionally defined in expat.h as -either char, wchar_t or unsigned short. -The former implies UTF-8 encoding, the latter two imply UTF-16 encoding. -Note that you'll receive them in this form independent of the original -encoding of the document.

- -
-
-void XMLCALL
-XML_SetStartElementHandler(XML_Parser p,
-                           XML_StartElementHandler start);
-
-
-typedef void
-(XMLCALL *XML_StartElementHandler)(void *userData,
-                                   const XML_Char *name,
-                                   const XML_Char **atts);
-
-

Set handler for start (and empty) tags. Attributes are passed to the start -handler as a pointer to a vector of char pointers. Each attribute seen in -a start (or empty) tag occupies 2 consecutive places in this vector: the -attribute name followed by the attribute value. These pairs are terminated -by a null pointer.

-

Note that an empty tag generates a call to both start and end handlers -(in that order).

-
- -
-
-void XMLCALL
-XML_SetEndElementHandler(XML_Parser p,
-                         XML_EndElementHandler);
-
-
-typedef void
-(XMLCALL *XML_EndElementHandler)(void *userData,
-                                 const XML_Char *name);
-
-

Set handler for end (and empty) tags. As noted above, an empty tag -generates a call to both start and end handlers.

-
- -
-
-void XMLCALL
-XML_SetElementHandler(XML_Parser p,
-                      XML_StartElementHandler start,
-                      XML_EndElementHandler end);
-
-

Set handlers for start and end tags with one call.

-
- -
-
-void XMLCALL
-XML_SetCharacterDataHandler(XML_Parser p,
-                            XML_CharacterDataHandler charhndl)
-
-
-typedef void
-(XMLCALL *XML_CharacterDataHandler)(void *userData,
-                                    const XML_Char *s,
-                                    int len);
-
-

Set a text handler. The string your handler receives -is NOT nul-terminated. You have to use the length argument -to deal with the end of the string. A single block of contiguous text -free of markup may still result in a sequence of calls to this handler. -In other words, if you're searching for a pattern in the text, it may -be split across calls to this handler. Note: Setting this handler to NULL -may NOT immediately terminate call-backs if the parser is currently -processing such a single block of contiguous markup-free text, as the parser -will continue calling back until the end of the block is reached.

-
- -
-
-void XMLCALL
-XML_SetProcessingInstructionHandler(XML_Parser p,
-                                    XML_ProcessingInstructionHandler proc)
-
-
-typedef void
-(XMLCALL *XML_ProcessingInstructionHandler)(void *userData,
-                                            const XML_Char *target,
-                                            const XML_Char *data);
-
-
-

Set a handler for processing instructions. The target is the first word -in the processing instruction. The data is the rest of the characters in -it after skipping all whitespace after the initial word.

-
- -
-
-void XMLCALL
-XML_SetCommentHandler(XML_Parser p,
-                      XML_CommentHandler cmnt)
-
-
-typedef void
-(XMLCALL *XML_CommentHandler)(void *userData,
-                              const XML_Char *data);
-
-

Set a handler for comments. The data is all text inside the comment -delimiters.

-
- -
-
-void XMLCALL
-XML_SetStartCdataSectionHandler(XML_Parser p,
-                                XML_StartCdataSectionHandler start);
-
-
-typedef void
-(XMLCALL *XML_StartCdataSectionHandler)(void *userData);
-
-

Set a handler that gets called at the beginning of a CDATA section.

-
- -
-
-void XMLCALL
-XML_SetEndCdataSectionHandler(XML_Parser p,
-                              XML_EndCdataSectionHandler end);
-
-
-typedef void
-(XMLCALL *XML_EndCdataSectionHandler)(void *userData);
-
-

Set a handler that gets called at the end of a CDATA section.

-
- -
-
-void XMLCALL
-XML_SetCdataSectionHandler(XML_Parser p,
-                           XML_StartCdataSectionHandler start,
-                           XML_EndCdataSectionHandler end)
-
-

Sets both CDATA section handlers with one call.

-
- -
-
-void XMLCALL
-XML_SetDefaultHandler(XML_Parser p,
-                      XML_DefaultHandler hndl)
-
-
-typedef void
-(XMLCALL *XML_DefaultHandler)(void *userData,
-                              const XML_Char *s,
-                              int len);
-
- -

Sets a handler for any characters in the document which wouldn't -otherwise be handled. This includes both data for which no handlers -can be set (like some kinds of DTD declarations) and data which could -be reported but which currently has no handler set. The characters -are passed exactly as they were present in the XML document except -that they will be encoded in UTF-8 or UTF-16. Line boundaries are not -normalized. Note that a byte order mark character is not passed to the -default handler. There are no guarantees about how characters are -divided between calls to the default handler: for example, a comment -might be split between multiple calls. Setting the handler with -this call has the side effect of turning off expansion of references -to internally defined general entities. Instead these references are -passed to the default handler.

- -

See also XML_DefaultCurrent.

-
- -
-
-void XMLCALL
-XML_SetDefaultHandlerExpand(XML_Parser p,
-                            XML_DefaultHandler hndl)
-
-
-typedef void
-(XMLCALL *XML_DefaultHandler)(void *userData,
-                              const XML_Char *s,
-                              int len);
-
-

This sets a default handler, but doesn't inhibit the expansion of -internal entity references. The entity reference will not be passed -to the default handler.

- -

See also XML_DefaultCurrent.

-
- -
-
-void XMLCALL
-XML_SetExternalEntityRefHandler(XML_Parser p,
-                                XML_ExternalEntityRefHandler hndl)
-
-
-typedef int
-(XMLCALL *XML_ExternalEntityRefHandler)(XML_Parser p,
-                                        const XML_Char *context,
-                                        const XML_Char *base,
-                                        const XML_Char *systemId,
-                                        const XML_Char *publicId);
-
-

Set an external entity reference handler. This handler is also -called for processing an external DTD subset if parameter entity parsing -is in effect. (See -XML_SetParamEntityParsing.)

- -

The context parameter specifies the parsing context in -the format expected by the context argument to XML_ExternalEntityParserCreate. code is -valid only until the handler returns, so if the referenced entity is -to be parsed later, it must be copied. context is NULL -only when the entity is a parameter entity, which is how one can -differentiate between general and parameter entities.

- -

The base parameter is the base to use for relative -system identifiers. It is set by XML_SetBase and may be NULL. The -publicId parameter is the public id given in the entity -declaration and may be NULL. systemId is the system -identifier specified in the entity declaration and is never NULL.

- -

There are a couple of ways in which this handler differs from -others. First, this handler returns a status indicator (an -integer). XML_STATUS_OK should be returned for successful -handling of the external entity reference. Returning -XML_STATUS_ERROR indicates failure, and causes the -calling parser to return an -XML_ERROR_EXTERNAL_ENTITY_HANDLING error.

- -

Second, instead of having the user data as its first argument, it -receives the parser that encountered the entity reference. This, along -with the context parameter, may be used as arguments to a call to -XML_ExternalEntityParserCreate. Using the returned -parser, the body of the external entity can be recursively parsed.

- -

Since this handler may be called recursively, it should not be saving -information into global or static variables.

-
- -
-void XMLCALL
-XML_SetExternalEntityRefHandlerArg(XML_Parser p,
-                                   void *arg)
-
-
-

Set the argument passed to the ExternalEntityRefHandler. If -arg is not NULL, it is the new value passed to the -handler set using XML_SetExternalEntityRefHandler; if arg is -NULL, the argument passed to the handler function will be the parser -object itself.

- -

Note: -The type of arg and the type of the first argument to the -ExternalEntityRefHandler do not match. This function takes a -void * to be passed to the handler, while the handler -accepts an XML_Parser. This is a historical accident, -but will not be corrected before Expat 2.0 (at the earliest) to avoid -causing compiler warnings for code that's known to work with this -API. It is the responsibility of the application code to know the -actual type of the argument passed to the handler and to manage it -properly.

-
- -
-
-void XMLCALL
-XML_SetSkippedEntityHandler(XML_Parser p,
-                            XML_SkippedEntityHandler handler)
-
-
-typedef void
-(XMLCALL *XML_SkippedEntityHandler)(void *userData,
-                                    const XML_Char *entityName,
-                                    int is_parameter_entity);
-
-

Set a skipped entity handler. This is called in two situations:

-
    -
  1. An entity reference is encountered for which no declaration - has been read and this is not an error.
  2. -
  3. An internal entity reference is read, but not expanded, because - XML_SetDefaultHandler - has been called.
  4. -
-

The is_parameter_entity argument will be non-zero for -a parameter entity and zero for a general entity.

Note: skipped -parameter entities in declarations and skipped general entities in -attribute values cannot be reported, because the event would be out of -sync with the reporting of the declarations or attribute values

-
- -
-
-void XMLCALL
-XML_SetUnknownEncodingHandler(XML_Parser p,
-                              XML_UnknownEncodingHandler enchandler,
-			      void *encodingHandlerData)
-
-
-typedef int
-(XMLCALL *XML_UnknownEncodingHandler)(void *encodingHandlerData,
-                                      const XML_Char *name,
-                                      XML_Encoding *info);
-
-typedef struct {
-  int map[256];
-  void *data;
-  int (XMLCALL *convert)(void *data, const char *s);
-  void (XMLCALL *release)(void *data);
-} XML_Encoding;
-
-

Set a handler to deal with encodings other than the built in set. This should be done before -XML_Parse or XML_ParseBuffer have been called on the -given parser.

If the handler knows how to deal with an encoding -with the given name, it should fill in the info data -structure and return XML_STATUS_OK. Otherwise it -should return XML_STATUS_ERROR. The handler will be called -at most once per parsed (external) entity. The optional application -data pointer encodingHandlerData will be passed back to -the handler.

- -

The map array contains information for every possible possible leading -byte in a byte sequence. If the corresponding value is >= 0, then it's -a single byte sequence and the byte encodes that Unicode value. If the -value is -1, then that byte is invalid as the initial byte in a sequence. -If the value is -n, where n is an integer > 1, then n is the number of -bytes in the sequence and the actual conversion is accomplished by a -call to the function pointed at by convert. This function may return -1 -if the sequence itself is invalid. The convert pointer may be null if -there are only single byte codes. The data parameter passed to the convert -function is the data pointer from XML_Encoding. The -string s is NOT nul-terminated and points at the sequence of -bytes to be converted.

- -

The function pointed at by release is called by the -parser when it is finished with the encoding. It may be NULL.

-
- -
-
-void XMLCALL
-XML_SetStartNamespaceDeclHandler(XML_Parser p,
-			         XML_StartNamespaceDeclHandler start);
-
-
-typedef void
-(XMLCALL *XML_StartNamespaceDeclHandler)(void *userData,
-                                         const XML_Char *prefix,
-                                         const XML_Char *uri);
-
-

Set a handler to be called when a namespace is declared. Namespace -declarations occur inside start tags. But the namespace declaration start -handler is called before the start tag handler for each namespace declared -in that start tag.

-
- -
-
-void XMLCALL
-XML_SetEndNamespaceDeclHandler(XML_Parser p,
-			       XML_EndNamespaceDeclHandler end);
-
-
-typedef void
-(XMLCALL *XML_EndNamespaceDeclHandler)(void *userData,
-                                       const XML_Char *prefix);
-
-

Set a handler to be called when leaving the scope of a namespace -declaration. This will be called, for each namespace declaration, -after the handler for the end tag of the element in which the -namespace was declared.

-
- -
-
-void XMLCALL
-XML_SetNamespaceDeclHandler(XML_Parser p,
-                            XML_StartNamespaceDeclHandler start,
-                            XML_EndNamespaceDeclHandler end)
-
-

Sets both namespace declaration handlers with a single call.

-
- -
-
-void XMLCALL
-XML_SetXmlDeclHandler(XML_Parser p,
-		      XML_XmlDeclHandler xmldecl);
-
-
-typedef void
-(XMLCALL *XML_XmlDeclHandler)(void            *userData,
-                              const XML_Char  *version,
-                              const XML_Char  *encoding,
-                              int             standalone);
-
-

Sets a handler that is called for XML declarations and also for -text declarations discovered in external entities. The way to -distinguish is that the version parameter will be NULL -for text declarations. The encoding parameter may be NULL -for an XML declaration. The standalone argument will -contain -1, 0, or 1 indicating respectively that there was no -standalone parameter in the declaration, that it was given as no, or -that it was given as yes.

-
- -
-
-void XMLCALL
-XML_SetStartDoctypeDeclHandler(XML_Parser p,
-			       XML_StartDoctypeDeclHandler start);
-
-
-typedef void
-(XMLCALL *XML_StartDoctypeDeclHandler)(void           *userData,
-                                       const XML_Char *doctypeName,
-                                       const XML_Char *sysid,
-                                       const XML_Char *pubid,
-                                       int            has_internal_subset);
-
-

Set a handler that is called at the start of a DOCTYPE declaration, -before any external or internal subset is parsed. Both sysid -and pubid may be NULL. The has_internal_subset -will be non-zero if the DOCTYPE declaration has an internal subset.

-
- -
-
-void XMLCALL
-XML_SetEndDoctypeDeclHandler(XML_Parser p,
-			     XML_EndDoctypeDeclHandler end);
-
-
-typedef void
-(XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);
-
-

Set a handler that is called at the end of a DOCTYPE declaration, -after parsing any external subset.

-
- -
-
-void XMLCALL
-XML_SetDoctypeDeclHandler(XML_Parser p,
-			  XML_StartDoctypeDeclHandler start,
-			  XML_EndDoctypeDeclHandler end);
-
-

Set both doctype handlers with one call.

-
- -
-
-void XMLCALL
-XML_SetElementDeclHandler(XML_Parser p,
-			  XML_ElementDeclHandler eldecl);
-
-
-typedef void
-(XMLCALL *XML_ElementDeclHandler)(void *userData,
-                                  const XML_Char *name,
-                                  XML_Content *model);
-
-
-enum XML_Content_Type {
-  XML_CTYPE_EMPTY = 1,
-  XML_CTYPE_ANY,
-  XML_CTYPE_MIXED,
-  XML_CTYPE_NAME,
-  XML_CTYPE_CHOICE,
-  XML_CTYPE_SEQ
-};
-
-enum XML_Content_Quant {
-  XML_CQUANT_NONE,
-  XML_CQUANT_OPT,
-  XML_CQUANT_REP,
-  XML_CQUANT_PLUS
-};
-
-typedef struct XML_cp XML_Content;
-
-struct XML_cp {
-  enum XML_Content_Type		type;
-  enum XML_Content_Quant	quant;
-  const XML_Char *		name;
-  unsigned int			numchildren;
-  XML_Content *			children;
-};
-
-

Sets a handler for element declarations in a DTD. The handler gets -called with the name of the element in the declaration and a pointer -to a structure that contains the element model. It is the -application's responsibility to free this data structure using -XML_FreeContentModel.

- -

The model argument is the root of a tree of -XML_Content nodes. If type equals -XML_CTYPE_EMPTY or XML_CTYPE_ANY, then -quant will be XML_CQUANT_NONE, and the other -fields will be zero or NULL. If type is -XML_CTYPE_MIXED, then quant will be -XML_CQUANT_NONE or XML_CQUANT_REP and -numchildren will contain the number of elements that are -allowed to be mixed in and children points to an array of -XML_Content structures that will all have type -XML_CTYPE_NAME with no quantification. Only the root node can be type -XML_CTYPE_EMPTY, XML_CTYPE_ANY, or -XML_CTYPE_MIXED.

- -

For type XML_CTYPE_NAME, the name field -points to the name and the numchildren and -children fields will be zero and NULL. The -quant field will indicate any quantifiers placed on the -name.

- -

Types XML_CTYPE_CHOICE and XML_CTYPE_SEQ -indicate a choice or sequence respectively. The -numchildren field indicates how many nodes in the choice -or sequence and children points to the nodes.

-
- -
-
-void XMLCALL
-XML_SetAttlistDeclHandler(XML_Parser p,
-                          XML_AttlistDeclHandler attdecl);
-
-
-typedef void
-(XMLCALL *XML_AttlistDeclHandler)(void           *userData,
-                                  const XML_Char *elname,
-                                  const XML_Char *attname,
-                                  const XML_Char *att_type,
-                                  const XML_Char *dflt,
-                                  int            isrequired);
-
-

Set a handler for attlist declarations in the DTD. This handler is -called for each attribute. So a single attlist declaration -with multiple attributes declared will generate multiple calls to this -handler. The elname parameter returns the name of the -element for which the attribute is being declared. The attribute name -is in the attname parameter. The attribute type is in the -att_type parameter. It is the string representing the -type in the declaration with whitespace removed.

- -

The dflt parameter holds the default value. It will be -NULL in the case of "#IMPLIED" or "#REQUIRED" attributes. You can -distinguish these two cases by checking the isrequired -parameter, which will be true in the case of "#REQUIRED" attributes. -Attributes which are "#FIXED" will have also have a true -isrequired, but they will have the non-NULL fixed value -in the dflt parameter.

-
- -
-
-void XMLCALL
-XML_SetEntityDeclHandler(XML_Parser p,
-			 XML_EntityDeclHandler handler);
-
-
-typedef void
-(XMLCALL *XML_EntityDeclHandler)(void           *userData,
-                                 const XML_Char *entityName,
-                                 int            is_parameter_entity,
-                                 const XML_Char *value,
-                                 int            value_length, 
-                                 const XML_Char *base,
-                                 const XML_Char *systemId,
-                                 const XML_Char *publicId,
-                                 const XML_Char *notationName);
-
-

Sets a handler that will be called for all entity declarations. -The is_parameter_entity argument will be non-zero in the -case of parameter entities and zero otherwise.

- -

For internal entities (<!ENTITY foo "bar">), -value will be non-NULL and systemId, -publicId, and notationName will all be NULL. -The value string is not NULL terminated; the length is -provided in the value_length parameter. Do not use -value_length to test for internal entities, since it is -legal to have zero-length values. Instead check for whether or not -value is NULL.

The notationName -argument will have a non-NULL value only for unparsed entity -declarations.

-
- -
-
-void XMLCALL
-XML_SetUnparsedEntityDeclHandler(XML_Parser p,
-                                 XML_UnparsedEntityDeclHandler h)
-
-
-typedef void
-(XMLCALL *XML_UnparsedEntityDeclHandler)(void *userData,
-                                         const XML_Char *entityName, 
-                                         const XML_Char *base,
-                                         const XML_Char *systemId,
-                                         const XML_Char *publicId,
-                                         const XML_Char *notationName);
-
-

Set a handler that receives declarations of unparsed entities. These -are entity declarations that have a notation (NDATA) field:

- -
-<!ENTITY logo SYSTEM "images/logo.gif" NDATA gif>
-
-

This handler is obsolete and is provided for backwards -compatibility. Use instead XML_SetEntityDeclHandler.

-
- -
-
-void XMLCALL
-XML_SetNotationDeclHandler(XML_Parser p,
-                           XML_NotationDeclHandler h)
-
-
-typedef void
-(XMLCALL *XML_NotationDeclHandler)(void *userData, 
-                                   const XML_Char *notationName,
-                                   const XML_Char *base,
-                                   const XML_Char *systemId,
-                                   const XML_Char *publicId);
-
-

Set a handler that receives notation declarations.

-
- -
-
-void XMLCALL
-XML_SetNotStandaloneHandler(XML_Parser p,
-                            XML_NotStandaloneHandler h)
-
-
-typedef int 
-(XMLCALL *XML_NotStandaloneHandler)(void *userData);
-
-

Set a handler that is called if the document is not "standalone". -This happens when there is an external subset or a reference to a -parameter entity, but does not have standalone set to "yes" in an XML -declaration. If this handler returns XML_STATUS_ERROR, -then the parser will throw an XML_ERROR_NOT_STANDALONE -error.

-
- -

Parse position and error reporting functions

- -

These are the functions you'll want to call when the parse -functions return XML_STATUS_ERROR (a parse error has -occurred), although the position reporting functions are useful outside -of errors. The position reported is the byte position (in the original -document or entity encoding) of the first of the sequence of -characters that generated the current event (or the error that caused -the parse functions to return XML_STATUS_ERROR.) The -exceptions are callbacks trigged by declarations in the document -prologue, in which case they exact position reported is somewhere in the -relevant markup, but not necessarily as meaningful as for other -events.

- -

The position reporting functions are accurate only outside of the -DTD. In other words, they usually return bogus information when -called from within a DTD declaration handler.

- -
-enum XML_Error XMLCALL
-XML_GetErrorCode(XML_Parser p);
-
-
-Return what type of error has occurred. -
- -
-const XML_LChar * XMLCALL
-XML_ErrorString(enum XML_Error code);
-
-
-Return a string describing the error corresponding to code. -The code should be one of the enums that can be returned from -XML_GetErrorCode. -
- -
-XML_Index XMLCALL
-XML_GetCurrentByteIndex(XML_Parser p);
-
-
-Return the byte offset of the position. This always corresponds to -the values returned by XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber. -
- -
-XML_Size XMLCALL
-XML_GetCurrentLineNumber(XML_Parser p);
-
-
-Return the line number of the position. The first line is reported as -1. -
- -
-XML_Size XMLCALL
-XML_GetCurrentColumnNumber(XML_Parser p);
-
-
-Return the offset, from the beginning of the current line, of -the position. -
- -
-int XMLCALL
-XML_GetCurrentByteCount(XML_Parser p);
-
-
-Return the number of bytes in the current event. Returns -0 if the event is inside a reference to an internal -entity and for the end-tag event for empty element tags (the later can -be used to distinguish empty-element tags from empty elements using -separate start and end tags). -
- -
-const char * XMLCALL
-XML_GetInputContext(XML_Parser p,
-                    int *offset,
-                    int *size);
-
-
- -

Returns the parser's input buffer, sets the integer pointed at by -offset to the offset within this buffer of the current -parse position, and set the integer pointed at by size to -the size of the returned buffer.

- -

This should only be called from within a handler during an active -parse and the returned buffer should only be referred to from within -the handler that made the call. This input buffer contains the -untranslated bytes of the input.

- -

Only a limited amount of context is kept, so if the event -triggering a call spans over a very large amount of input, the actual -parse position may be before the beginning of the buffer.

- -

If XML_CONTEXT_BYTES is not defined, this will always -return NULL.

-
- -

Miscellaneous functions

- -

The functions in this section either obtain state information from -the parser or can be used to dynamicly set parser options.

- -
-void XMLCALL
-XML_SetUserData(XML_Parser p,
-                void *userData);
-
-
-This sets the user data pointer that gets passed to handlers. It -overwrites any previous value for this pointer. Note that the -application is responsible for freeing the memory associated with -userData when it is finished with the parser. So if you -call this when there's already a pointer there, and you haven't freed -the memory associated with it, then you've probably just leaked -memory. -
- -
-void * XMLCALL
-XML_GetUserData(XML_Parser p);
-
-
-This returns the user data pointer that gets passed to handlers. -It is actually implemented as a macro. -
- -
-void XMLCALL
-XML_UseParserAsHandlerArg(XML_Parser p);
-
-
-After this is called, handlers receive the parser in their -userData arguments. The user data can still be obtained -using the XML_GetUserData function. -
- -
-enum XML_Status XMLCALL
-XML_SetBase(XML_Parser p,
-            const XML_Char *base);
-
-
-Set the base to be used for resolving relative URIs in system -identifiers. The return value is XML_STATUS_ERROR if -there's no memory to store base, otherwise it's -XML_STATUS_OK. -
- -
-const XML_Char * XMLCALL
-XML_GetBase(XML_Parser p);
-
-
-Return the base for resolving relative URIs. -
- -
-int XMLCALL
-XML_GetSpecifiedAttributeCount(XML_Parser p);
-
-
-When attributes are reported to the start handler in the atts vector, -attributes that were explicitly set in the element occur before any -attributes that receive their value from default information in an -ATTLIST declaration. This function returns the number of attributes -that were explicitly set times two, thus giving the offset in the -atts array passed to the start tag handler of the first -attribute set due to defaults. It supplies information for the last -call to a start handler. If called inside a start handler, then that -means the current call. -
- -
-int XMLCALL
-XML_GetIdAttributeIndex(XML_Parser p);
-
-
-Returns the index of the ID attribute passed in the atts array in the -last call to XML_StartElementHandler, or -1 if there is no ID -attribute. If called inside a start handler, then that means the -current call. -
- -
-enum XML_Status XMLCALL
-XML_SetEncoding(XML_Parser p,
-                const XML_Char *encoding);
-
-
-Set the encoding to be used by the parser. It is equivalent to -passing a non-null encoding argument to the parser creation functions. -It must not be called after XML_Parse or XML_ParseBuffer have been called on the given parser. -Returns XML_STATUS_OK on success or -XML_STATUS_ERROR on error. -
- -
-int XMLCALL
-XML_SetParamEntityParsing(XML_Parser p,
-                          enum XML_ParamEntityParsing code);
-
-
-This enables parsing of parameter entities, including the external -parameter entity that is the external DTD subset, according to -code. -The choices for code are: -
    -
  • XML_PARAM_ENTITY_PARSING_NEVER
  • -
  • XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
  • -
  • XML_PARAM_ENTITY_PARSING_ALWAYS
  • -
-
- -
-enum XML_Error XMLCALL
-XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
-
-
-

This function allows an application to provide an external subset -for the document type declaration for documents which do not specify -an external subset of their own. For documents which specify an -external subset in their DOCTYPE declaration, the application-provided -subset will be ignored. If the document does not contain a DOCTYPE -declaration at all and useDTD is true, the -application-provided subset will be parsed, but the -startDoctypeDeclHandler and -endDoctypeDeclHandler functions, if set, will not be -called. The setting of parameter entity parsing, controlled using -XML_SetParamEntityParsing, will be honored.

- -

The application-provided external subset is read by calling the -external entity reference handler set via XML_SetExternalEntityRefHandler with both -publicId and systemId set to NULL.

- -

If this function is called after parsing has begun, it returns -XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING and ignores -useDTD. If called when Expat has been compiled without -DTD support, it returns -XML_ERROR_FEATURE_REQUIRES_XML_DTD. Otherwise, it -returns XML_ERROR_NONE.

- -

Note: For the purpose of checking WFC: Entity Declared, passing -useDTD == XML_TRUE will make the parser behave as if -the document had a DTD with an external subset. This holds true even if -the external entity reference handler returns without action.

-
- -
-void XMLCALL
-XML_SetReturnNSTriplet(XML_Parser parser,
-                       int        do_nst);
-
-
-

-This function only has an effect when using a parser created with -XML_ParserCreateNS, -i.e. when namespace processing is in effect. The do_nst -sets whether or not prefixes are returned with names qualified with a -namespace prefix. If this function is called with do_nst -non-zero, then afterwards namespace qualified names (that is qualified -with a prefix as opposed to belonging to a default namespace) are -returned as a triplet with the three parts separated by the namespace -separator specified when the parser was created. The order of -returned parts is URI, local name, and prefix.

If -do_nst is zero, then namespaces are reported in the -default manner, URI then local_name separated by the namespace -separator.

-
- -
-void XMLCALL
-XML_DefaultCurrent(XML_Parser parser);
-
-
-This can be called within a handler for a start element, end element, -processing instruction or character data. It causes the corresponding -markup to be passed to the default handler set by XML_SetDefaultHandler or -XML_SetDefaultHandlerExpand. It does nothing if there is -not a default handler. -
- -
-XML_LChar * XMLCALL
-XML_ExpatVersion();
-
-
-Return the library version as a string (e.g. "expat_1.95.1"). -
- -
-struct XML_Expat_Version XMLCALL
-XML_ExpatVersionInfo();
-
-
-typedef struct {
-  int major;
-  int minor;
-  int micro;
-} XML_Expat_Version;
-
-
-Return the library version information as a structure. -Some macros are also defined that support compile-time tests of the -library version: -
    -
  • XML_MAJOR_VERSION
  • -
  • XML_MINOR_VERSION
  • -
  • XML_MICRO_VERSION
  • -
-Testing these constants is currently the best way to determine if -particular parts of the Expat API are available. -
- -
-const XML_Feature * XMLCALL
-XML_GetFeatureList();
-
-
-enum XML_FeatureEnum {
-  XML_FEATURE_END = 0,
-  XML_FEATURE_UNICODE,
-  XML_FEATURE_UNICODE_WCHAR_T,
-  XML_FEATURE_DTD,
-  XML_FEATURE_CONTEXT_BYTES,
-  XML_FEATURE_MIN_SIZE,
-  XML_FEATURE_SIZEOF_XML_CHAR,
-  XML_FEATURE_SIZEOF_XML_LCHAR,
-  XML_FEATURE_NS,
-  XML_FEATURE_LARGE_SIZE
-};
-
-typedef struct {
-  enum XML_FeatureEnum  feature;
-  XML_LChar            *name;
-  long int              value;
-} XML_Feature;
-
-
-

Returns a list of "feature" records, providing details on how -Expat was configured at compile time. Most applications should not -need to worry about this, but this information is otherwise not -available from Expat. This function allows code that does need to -check these features to do so at runtime.

- -

The return value is an array of XML_Feature, -terminated by a record with a feature of -XML_FEATURE_END and name of NULL, -identifying the feature-test macros Expat was compiled with. Since an -application that requires this kind of information needs to determine -the type of character the name points to, records for the -XML_FEATURE_SIZEOF_XML_CHAR and -XML_FEATURE_SIZEOF_XML_LCHAR will be located at the -beginning of the list, followed by XML_FEATURE_UNICODE -and XML_FEATURE_UNICODE_WCHAR_T, if they are present at -all.

- -

Some features have an associated value. If there isn't an -associated value, the value field is set to 0. At this -time, the following features have been defined to have values:

- -
-
XML_FEATURE_SIZEOF_XML_CHAR
-
The number of bytes occupied by one XML_Char - character.
-
XML_FEATURE_SIZEOF_XML_LCHAR
-
The number of bytes occupied by one XML_LChar - character.
-
XML_FEATURE_CONTEXT_BYTES
-
The maximum number of characters of context which can be - reported by XML_GetInputContext.
-
-
- -
-void XMLCALL
-XML_FreeContentModel(XML_Parser parser, XML_Content *model);
-
-
-Function to deallocate the model argument passed to the -XML_ElementDeclHandler callback set using XML_ElementDeclHandler. -This function should not be used for any other purpose. -
- -

The following functions allow external code to share the memory -allocator an XML_Parser has been configured to use. This -is especially useful for third-party libraries that interact with a -parser object created by application code, or heavily layered -applications. This can be essential when using dynamically loaded -libraries which use different C standard libraries (this can happen on -Windows, at least).

- -
-void * XMLCALL
-XML_MemMalloc(XML_Parser parser, size_t size);
-
-
-Allocate size bytes of memory using the allocator the -parser object has been configured to use. Returns a -pointer to the memory or NULL on failure. Memory allocated in this -way must be freed using XML_MemFree. -
- -
-void * XMLCALL
-XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
-
-
-Allocate size bytes of memory using the allocator the -parser object has been configured to use. -ptr must point to a block of memory allocated by XML_MemMalloc or -XML_MemRealloc, or be NULL. This function tries to -expand the block pointed to by ptr if possible. Returns -a pointer to the memory or NULL on failure. On success, the original -block has either been expanded or freed. On failure, the original -block has not been freed; the caller is responsible for freeing the -original block. Memory allocated in this way must be freed using -XML_MemFree. -
- -
-void XMLCALL
-XML_MemFree(XML_Parser parser, void *ptr);
-
-
-Free a block of memory pointed to by ptr. The block must -have been allocated by XML_MemMalloc or XML_MemRealloc, or be NULL. -
- -
-

Valid XHTML 1.0!

-
- - diff --git a/3rdparty/expat-2.0.1/doc/style.css b/3rdparty/expat-2.0.1/doc/style.css deleted file mode 100644 index 9cd6d9ff77..0000000000 --- a/3rdparty/expat-2.0.1/doc/style.css +++ /dev/null @@ -1,101 +0,0 @@ -body { - background-color: white; - border: 0px; - margin: 0px; - padding: 0px; -} - -.corner { - width: 200px; - height: 80px; - text-align: center; -} - -.banner { - background-color: rgb(110,139,61); - color: rgb(255,236,176); - padding-left: 2em; -} - -.banner h1 { - font-size: 200%; -} - -.content { - padding: 0em 2em 1em 2em; -} - -.releaseno { - background-color: rgb(110,139,61); - color: rgb(255,236,176); - padding-bottom: 0.3em; - padding-top: 0.5em; - text-align: center; - font-weight: bold; -} - -.noborder { - border-width: 0px; -} - -.eg { - padding-left: 1em; - padding-top: .5em; - padding-bottom: .5em; - border: solid thin; - margin: 1em 0; - background-color: tan; - margin-left: 2em; - margin-right: 10%; -} - -.pseudocode { - padding-left: 1em; - padding-top: .5em; - padding-bottom: .5em; - border: solid thin; - margin: 1em 0; - background-color: rgb(250,220,180); - margin-left: 2em; - margin-right: 10%; -} - -.handler { - width: 100%; - border-top-width: thin; - margin-bottom: 1em; -} - -.handler p { - margin-left: 2em; -} - -.setter { - font-weight: bold; -} - -.signature { - color: navy; -} - -.fcndec { - width: 100%; - border-top-width: thin; - font-weight: bold; -} - -.fcndef { - margin-left: 2em; - margin-bottom: 2em; -} - -dd { - margin-bottom: 2em; -} - -.cpp-symbols dt { - font-family: monospace; -} -.cpp-symbols dd { - margin-bottom: 1em; -} diff --git a/3rdparty/expat-2.0.1/doc/valid-xhtml10.png b/3rdparty/expat-2.0.1/doc/valid-xhtml10.png deleted file mode 100644 index 4c23f48fe0..0000000000 Binary files a/3rdparty/expat-2.0.1/doc/valid-xhtml10.png and /dev/null differ diff --git a/3rdparty/expat-2.0.1/doc/xmlwf.1 b/3rdparty/expat-2.0.1/doc/xmlwf.1 deleted file mode 100644 index f607555b5a..0000000000 --- a/3rdparty/expat-2.0.1/doc/xmlwf.1 +++ /dev/null @@ -1,251 +0,0 @@ -.\" This manpage has been automatically generated by docbook2man -.\" from a DocBook document. This tool can be found at: -.\" -.\" Please send any bug reports, improvements, comments, patches, -.\" etc. to Steve Cheng . -.TH "XMLWF" "1" "24 January 2003" "" "" -.SH NAME -xmlwf \- Determines if an XML document is well-formed -.SH SYNOPSIS - -\fBxmlwf\fR [ \fB-s\fR] [ \fB-n\fR] [ \fB-p\fR] [ \fB-x\fR] [ \fB-e \fIencoding\fB\fR] [ \fB-w\fR] [ \fB-d \fIoutput-dir\fB\fR] [ \fB-c\fR] [ \fB-m\fR] [ \fB-r\fR] [ \fB-t\fR] [ \fB-v\fR] [ \fBfile ...\fR] - -.SH "DESCRIPTION" -.PP -\fBxmlwf\fR uses the Expat library to -determine if an XML document is well-formed. It is -non-validating. -.PP -If you do not specify any files on the command-line, and you -have a recent version of \fBxmlwf\fR, the -input file will be read from standard input. -.SH "WELL-FORMED DOCUMENTS" -.PP -A well-formed document must adhere to the -following rules: -.TP 0.2i -\(bu -The file begins with an XML declaration. For instance, -. -\fBNOTE:\fR -\fBxmlwf\fR does not currently -check for a valid XML declaration. -.TP 0.2i -\(bu -Every start tag is either empty () -or has a corresponding end tag. -.TP 0.2i -\(bu -There is exactly one root element. This element must contain -all other elements in the document. Only comments, white -space, and processing instructions may come after the close -of the root element. -.TP 0.2i -\(bu -All elements nest properly. -.TP 0.2i -\(bu -All attribute values are enclosed in quotes (either single -or double). -.PP -If the document has a DTD, and it strictly complies with that -DTD, then the document is also considered \fBvalid\fR. -\fBxmlwf\fR is a non-validating parser -- -it does not check the DTD. However, it does support -external entities (see the \fB-x\fR option). -.SH "OPTIONS" -.PP -When an option includes an argument, you may specify the argument either -separately ("\fB-d\fR output") or concatenated with the -option ("\fB-d\fRoutput"). \fBxmlwf\fR -supports both. -.TP -\fB-c\fR -If the input file is well-formed and \fBxmlwf\fR -doesn't encounter any errors, the input file is simply copied to -the output directory unchanged. -This implies no namespaces (turns off \fB-n\fR) and -requires \fB-d\fR to specify an output file. -.TP -\fB-d output-dir\fR -Specifies a directory to contain transformed -representations of the input files. -By default, \fB-d\fR outputs a canonical representation -(described below). -You can select different output formats using \fB-c\fR -and \fB-m\fR. - -The output filenames will -be exactly the same as the input filenames or "STDIN" if the input is -coming from standard input. Therefore, you must be careful that the -output file does not go into the same directory as the input -file. Otherwise, \fBxmlwf\fR will delete the -input file before it generates the output file (just like running -cat < file > file in most shells). - -Two structurally equivalent XML documents have a byte-for-byte -identical canonical XML representation. -Note that ignorable white space is considered significant and -is treated equivalently to data. -More on canonical XML can be found at -http://www.jclark.com/xml/canonxml.html . -.TP -\fB-e encoding\fR -Specifies the character encoding for the document, overriding -any document encoding declaration. \fBxmlwf\fR -supports four built-in encodings: -US-ASCII, -UTF-8, -UTF-16, and -ISO-8859-1. -Also see the \fB-w\fR option. -.TP -\fB-m\fR -Outputs some strange sort of XML file that completely -describes the input file, including character positions. -Requires \fB-d\fR to specify an output file. -.TP -\fB-n\fR -Turns on namespace processing. (describe namespaces) -\fB-c\fR disables namespaces. -.TP -\fB-p\fR -Tells xmlwf to process external DTDs and parameter -entities. - -Normally \fBxmlwf\fR never parses parameter -entities. \fB-p\fR tells it to always parse them. -\fB-p\fR implies \fB-x\fR. -.TP -\fB-r\fR -Normally \fBxmlwf\fR memory-maps the XML file -before parsing; this can result in faster parsing on many -platforms. -\fB-r\fR turns off memory-mapping and uses normal file -IO calls instead. -Of course, memory-mapping is automatically turned off -when reading from standard input. - -Use of memory-mapping can cause some platforms to report -substantially higher memory usage for -\fBxmlwf\fR, but this appears to be a matter of -the operating system reporting memory in a strange way; there is -not a leak in \fBxmlwf\fR. -.TP -\fB-s\fR -Prints an error if the document is not standalone. -A document is standalone if it has no external subset and no -references to parameter entities. -.TP -\fB-t\fR -Turns on timings. This tells Expat to parse the entire file, -but not perform any processing. -This gives a fairly accurate idea of the raw speed of Expat itself -without client overhead. -\fB-t\fR turns off most of the output options -(\fB-d\fR, \fB-m\fR, \fB-c\fR, -\&...). -.TP -\fB-v\fR -Prints the version of the Expat library being used, including some -information on the compile-time configuration of the library, and -then exits. -.TP -\fB-w\fR -Enables support for Windows code pages. -Normally, \fBxmlwf\fR will throw an error if it -runs across an encoding that it is not equipped to handle itself. With -\fB-w\fR, xmlwf will try to use a Windows code -page. See also \fB-e\fR. -.TP -\fB-x\fR -Turns on parsing external entities. - -Non-validating parsers are not required to resolve external -entities, or even expand entities at all. -Expat always expands internal entities (?), -but external entity parsing must be enabled explicitly. - -External entities are simply entities that obtain their -data from outside the XML file currently being parsed. - -This is an example of an internal entity: - -.nf - -.fi - -And here are some examples of external entities: - -.nf - (parsed) - (unparsed) -.fi -.TP -\fB--\fR -(Two hyphens.) -Terminates the list of options. This is only needed if a filename -starts with a hyphen. For example: - -.nf -xmlwf -- -myfile.xml -.fi - -will run \fBxmlwf\fR on the file -\fI-myfile.xml\fR. -.PP -Older versions of \fBxmlwf\fR do not support -reading from standard input. -.SH "OUTPUT" -.PP -If an input file is not well-formed, -\fBxmlwf\fR prints a single line describing -the problem to standard output. If a file is well formed, -\fBxmlwf\fR outputs nothing. -Note that the result code is \fBnot\fR set. -.SH "BUGS" -.PP -According to the W3C standard, an XML file without a -declaration at the beginning is not considered well-formed. -However, \fBxmlwf\fR allows this to pass. -.PP -\fBxmlwf\fR returns a 0 - noerr result, -even if the file is not well-formed. There is no good way for -a program to use \fBxmlwf\fR to quickly -check a file -- it must parse \fBxmlwf\fR's -standard output. -.PP -The errors should go to standard error, not standard output. -.PP -There should be a way to get \fB-d\fR to send its -output to standard output rather than forcing the user to send -it to a file. -.PP -I have no idea why anyone would want to use the -\fB-d\fR, \fB-c\fR, and -\fB-m\fR options. If someone could explain it to -me, I'd like to add this information to this manpage. -.SH "ALTERNATIVES" -.PP -Here are some XML validators on the web: - -.nf -http://www.hcrc.ed.ac.uk/~richard/xml-check.html -http://www.stg.brown.edu/service/xmlvalid/ -http://www.scripting.com/frontier5/xml/code/xmlValidator.html -http://www.xml.com/pub/a/tools/ruwf/check.html -.fi -.SH "SEE ALSO" -.PP - -.nf -The Expat home page: http://www.libexpat.org/ -The W3 XML specification: http://www.w3.org/TR/REC-xml -.fi -.SH "AUTHOR" -.PP -This manual page was written by Scott Bronson for -the Debian GNU/Linux system (but may be used by others). Permission is -granted to copy, distribute and/or modify this document under -the terms of the GNU Free Documentation -License, Version 1.1. diff --git a/3rdparty/expat-2.0.1/doc/xmlwf.sgml b/3rdparty/expat-2.0.1/doc/xmlwf.sgml deleted file mode 100644 index 537ec574cf..0000000000 --- a/3rdparty/expat-2.0.1/doc/xmlwf.sgml +++ /dev/null @@ -1,473 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - --> - - - Scott"> - Bronson"> - - December 5, 2001"> - - 1"> - bronson@rinspin.com"> - - XMLWF"> - - - Debian GNU/Linux"> - GNU"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2001 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - Determines if an XML document is well-formed - - - - &dhpackage; - - - - - - - - - - - - - - - - - - file ... - - - - - DESCRIPTION - - - &dhpackage; uses the Expat library to - determine if an XML document is well-formed. It is - non-validating. - - - - If you do not specify any files on the command-line, and you - have a recent version of &dhpackage;, the - input file will be read from standard input. - - - - - - WELL-FORMED DOCUMENTS - - - A well-formed document must adhere to the - following rules: - - - - - The file begins with an XML declaration. For instance, - <?xml version="1.0" standalone="yes"?>. - NOTE: - &dhpackage; does not currently - check for a valid XML declaration. - - - Every start tag is either empty (<tag/>) - or has a corresponding end tag. - - - There is exactly one root element. This element must contain - all other elements in the document. Only comments, white - space, and processing instructions may come after the close - of the root element. - - - All elements nest properly. - - - All attribute values are enclosed in quotes (either single - or double). - - - - - If the document has a DTD, and it strictly complies with that - DTD, then the document is also considered valid. - &dhpackage; is a non-validating parser -- - it does not check the DTD. However, it does support - external entities (see the option). - - - - - OPTIONS - - -When an option includes an argument, you may specify the argument either -separately (" output") or concatenated with the -option ("output"). &dhpackage; -supports both. - - - - - - - - - If the input file is well-formed and &dhpackage; - doesn't encounter any errors, the input file is simply copied to - the output directory unchanged. - This implies no namespaces (turns off ) and - requires to specify an output file. - - - - - - - - - Specifies a directory to contain transformed - representations of the input files. - By default, outputs a canonical representation - (described below). - You can select different output formats using - and . - - - The output filenames will - be exactly the same as the input filenames or "STDIN" if the input is - coming from standard input. Therefore, you must be careful that the - output file does not go into the same directory as the input - file. Otherwise, &dhpackage; will delete the - input file before it generates the output file (just like running - cat < file > file in most shells). - - - Two structurally equivalent XML documents have a byte-for-byte - identical canonical XML representation. - Note that ignorable white space is considered significant and - is treated equivalently to data. - More on canonical XML can be found at - http://www.jclark.com/xml/canonxml.html . - - - - - - - - - Specifies the character encoding for the document, overriding - any document encoding declaration. &dhpackage; - supports four built-in encodings: - US-ASCII, - UTF-8, - UTF-16, and - ISO-8859-1. - Also see the option. - - - - - - - - - Outputs some strange sort of XML file that completely - describes the the input file, including character postitions. - Requires to specify an output file. - - - - - - - - - Turns on namespace processing. (describe namespaces) - disables namespaces. - - - - - - - - - Tells xmlwf to process external DTDs and parameter - entities. - - - Normally &dhpackage; never parses parameter - entities. tells it to always parse them. - implies . - - - - - - - - - Normally &dhpackage; memory-maps the XML file - before parsing; this can result in faster parsing on many - platforms. - turns off memory-mapping and uses normal file - IO calls instead. - Of course, memory-mapping is automatically turned off - when reading from standard input. - - - Use of memory-mapping can cause some platforms to report - substantially higher memory usage for - &dhpackage;, but this appears to be a matter of - the operating system reporting memory in a strange way; there is - not a leak in &dhpackage;. - - - - - - - - - Prints an error if the document is not standalone. - A document is standalone if it has no external subset and no - references to parameter entities. - - - - - - - - - Turns on timings. This tells Expat to parse the entire file, - but not perform any processing. - This gives a fairly accurate idea of the raw speed of Expat itself - without client overhead. - turns off most of the output options - (, , , - ...). - - - - - - - - - Prints the version of the Expat library being used, including some - information on the compile-time configuration of the library, and - then exits. - - - - - - - - - Enables support for Windows code pages. - Normally, &dhpackage; will throw an error if it - runs across an encoding that it is not equipped to handle itself. With - , &dhpackage; will try to use a Windows code - page. See also . - - - - - - - - - Turns on parsing external entities. - - - Non-validating parsers are not required to resolve external - entities, or even expand entities at all. - Expat always expands internal entities (?), - but external entity parsing must be enabled explicitly. - - - External entities are simply entities that obtain their - data from outside the XML file currently being parsed. - - - This is an example of an internal entity: - -<!ENTITY vers '1.0.2'> - - - - And here are some examples of external entities: - - -<!ENTITY header SYSTEM "header-&vers;.xml"> (parsed) -<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed) - - - - - - - - - - - (Two hyphens.) - Terminates the list of options. This is only needed if a filename - starts with a hyphen. For example: - - -&dhpackage; -- -myfile.xml - - - will run &dhpackage; on the file - -myfile.xml. - - - - - - - Older versions of &dhpackage; do not support - reading from standard input. - - - - - OUTPUT - - If an input file is not well-formed, - &dhpackage; prints a single line describing - the problem to standard output. If a file is well formed, - &dhpackage; outputs nothing. - Note that the result code is not set. - - - - - BUGS - - According to the W3C standard, an XML file without a - declaration at the beginning is not considered well-formed. - However, &dhpackage; allows this to pass. - - - &dhpackage; returns a 0 - noerr result, - even if the file is not well-formed. There is no good way for - a program to use &dhpackage; to quickly - check a file -- it must parse &dhpackage;'s - standard output. - - - The errors should go to standard error, not standard output. - - - There should be a way to get to send its - output to standard output rather than forcing the user to send - it to a file. - - - I have no idea why anyone would want to use the - , , and - options. If someone could explain it to - me, I'd like to add this information to this manpage. - - - - - ALTERNATIVES - - Here are some XML validators on the web: - - -http://www.hcrc.ed.ac.uk/~richard/xml-check.html -http://www.stg.brown.edu/service/xmlvalid/ -http://www.scripting.com/frontier5/xml/code/xmlValidator.html -http://www.xml.com/pub/a/tools/ruwf/check.html - - - - - - - SEE ALSO - - - -The Expat home page: http://www.libexpat.org/ -The W3 XML specification: http://www.w3.org/TR/REC-xml - - - - - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the GNU Free Documentation - License, Version 1.1. - - -
- - diff --git a/3rdparty/expat-2.0.1/examples/elements.c b/3rdparty/expat-2.0.1/examples/elements.c deleted file mode 100644 index 6b8f85501b..0000000000 --- a/3rdparty/expat-2.0.1/examples/elements.c +++ /dev/null @@ -1,65 +0,0 @@ -/* This is simple demonstration of how to use expat. This program - reads an XML document from standard input and writes a line with - the name of each element to standard output indenting child - elements by one tab stop more than their parent element. - It must be used with Expat compiled for UTF-8 output. -*/ - -#include -#include "expat.h" - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -#ifdef XML_LARGE_SIZE -#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 -#define XML_FMT_INT_MOD "I64" -#else -#define XML_FMT_INT_MOD "ll" -#endif -#else -#define XML_FMT_INT_MOD "l" -#endif - -static void XMLCALL -startElement(void *userData, const char *name, const char **atts) -{ - int i; - int *depthPtr = (int *)userData; - for (i = 0; i < *depthPtr; i++) - putchar('\t'); - puts(name); - *depthPtr += 1; -} - -static void XMLCALL -endElement(void *userData, const char *name) -{ - int *depthPtr = (int *)userData; - *depthPtr -= 1; -} - -int -main(int argc, char *argv[]) -{ - char buf[BUFSIZ]; - XML_Parser parser = XML_ParserCreate(NULL); - int done; - int depth = 0; - XML_SetUserData(parser, &depth); - XML_SetElementHandler(parser, startElement, endElement); - do { - int len = (int)fread(buf, 1, sizeof(buf), stdin); - done = len < sizeof(buf); - if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { - fprintf(stderr, - "%s at line %" XML_FMT_INT_MOD "u\n", - XML_ErrorString(XML_GetErrorCode(parser)), - XML_GetCurrentLineNumber(parser)); - return 1; - } - } while (!done); - XML_ParserFree(parser); - return 0; -} diff --git a/3rdparty/expat-2.0.1/examples/elements.dsp b/3rdparty/expat-2.0.1/examples/elements.dsp deleted file mode 100644 index 6730358dfc..0000000000 --- a/3rdparty/expat-2.0.1/examples/elements.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=elements - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "elements.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "elements - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release-elements" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" - -!ELSEIF "$(CFG)" == "elements - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug-elements" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" - -!ENDIF - -# Begin Target - -# Name "elements - Win32 Release" -# Name "elements - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\elements.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/examples/outline.c b/3rdparty/expat-2.0.1/examples/outline.c deleted file mode 100644 index 3a3c838551..0000000000 --- a/3rdparty/expat-2.0.1/examples/outline.c +++ /dev/null @@ -1,106 +0,0 @@ -/***************************************************************** - * outline.c - * - * Copyright 1999, Clark Cooper - * All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the license contained in the - * COPYING file that comes with the expat distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Read an XML document from standard input and print an element - * outline on standard output. - * Must be used with Expat compiled for UTF-8 output. - */ - - -#include -#include - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -#ifdef XML_LARGE_SIZE -#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 -#define XML_FMT_INT_MOD "I64" -#else -#define XML_FMT_INT_MOD "ll" -#endif -#else -#define XML_FMT_INT_MOD "l" -#endif - -#define BUFFSIZE 8192 - -char Buff[BUFFSIZE]; - -int Depth; - -static void XMLCALL -start(void *data, const char *el, const char **attr) -{ - int i; - - for (i = 0; i < Depth; i++) - printf(" "); - - printf("%s", el); - - for (i = 0; attr[i]; i += 2) { - printf(" %s='%s'", attr[i], attr[i + 1]); - } - - printf("\n"); - Depth++; -} - -static void XMLCALL -end(void *data, const char *el) -{ - Depth--; -} - -int -main(int argc, char *argv[]) -{ - XML_Parser p = XML_ParserCreate(NULL); - if (! p) { - fprintf(stderr, "Couldn't allocate memory for parser\n"); - exit(-1); - } - - XML_SetElementHandler(p, start, end); - - for (;;) { - int done; - int len; - - len = (int)fread(Buff, 1, BUFFSIZE, stdin); - if (ferror(stdin)) { - fprintf(stderr, "Read error\n"); - exit(-1); - } - done = feof(stdin); - - if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) { - fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n", - XML_GetCurrentLineNumber(p), - XML_ErrorString(XML_GetErrorCode(p))); - exit(-1); - } - - if (done) - break; - } - XML_ParserFree(p); - return 0; -} diff --git a/3rdparty/expat-2.0.1/examples/outline.dsp b/3rdparty/expat-2.0.1/examples/outline.dsp deleted file mode 100644 index 62d1932af1..0000000000 --- a/3rdparty/expat-2.0.1/examples/outline.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=outline - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "outline.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "outline - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release-outline" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386 - -!ELSEIF "$(CFG)" == "outline - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug-outline" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 - -!ENDIF - -# Begin Target - -# Name "outline - Win32 Release" -# Name "outline - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\outline.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/expat.dsw b/3rdparty/expat-2.0.1/expat.dsw deleted file mode 100644 index 9282da5a72..0000000000 --- a/3rdparty/expat-2.0.1/expat.dsw +++ /dev/null @@ -1,110 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "elements"=.\examples\elements.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name expat_static - End Project Dependency -}}} - -############################################################################### - -Project: "expat"=.\lib\expat.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "outline"=.\examples\outline.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name expat - End Project Dependency -}}} - -############################################################################### - -Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name expat - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/3rdparty/expat-2.0.1/expat_config.h.in b/3rdparty/expat-2.0.1/expat_config.h.in deleted file mode 100644 index bca7bafcf9..0000000000 --- a/3rdparty/expat-2.0.1/expat_config.h.in +++ /dev/null @@ -1,92 +0,0 @@ -/* expat_config.h.in. Generated from configure.in by autoheader. */ - -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#undef BYTEORDER - -/* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* whether byteorder is bigendian */ -#undef WORDS_BIGENDIAN - -/* Define to specify how much context to retain around the current parse - point. */ -#undef XML_CONTEXT_BYTES - -/* Define to make parameter entity parsing functionality available. */ -#undef XML_DTD - -/* Define to make XML Namespaces functionality available. */ -#undef XML_NS - -/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ -#undef __func__ - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define to `unsigned' if does not define. */ -#undef size_t diff --git a/3rdparty/expat-2.0.1/lib/Makefile.MPW b/3rdparty/expat-2.0.1/lib/Makefile.MPW deleted file mode 100644 index 046af00514..0000000000 --- a/3rdparty/expat-2.0.1/lib/Makefile.MPW +++ /dev/null @@ -1,206 +0,0 @@ -# File: Makefile.MPW -# Targets: All, Dynamic, Static (and Clean, Clean-All) -# Created: Tuesday, July 02, 2002 -# -# MPW Makefile for building expat under the "classic" (i.e. pre-X) Mac OS -# Copyright © 2002 Daryle Walker -# Portions Copyright © 2002 Thomas Wegner -# See the COPYING file for distribution information -# -# Description: -# This Makefile lets you build static, dynamic (i.e. shared) and stub -# versions of the expat library as well as the elements.c and outline.c -# examples (built as tools for MPW). This is for PPC only; it should be -# no problem to build a 68K version of the expat library, though. -# -# Usage: -# Buildprogram All -# or Buildprogram Dynamic -# or Buildprogram Static -# -# Note: You first have to rename this file to "Makefile", or the Buildprogram -# commando will not recognize it. -# - -MAKEFILE = Makefile -¥MondoBuild¥ = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified - -ObjDir = : -SrcDir = : -HdrDir = : - -ToolDir = ::examples: - -Includes = -i {HdrDir} - -Sym-PPC = -sym off - -Defines = -d MACOS_CLASSIC - -PPCCOptions = {Includes} {Sym-PPC} -w 35 {Defines} - -FragName = libexpat - - -### Source Files ### - -SrcFiles = ¶ - "{SrcDir}xmlparse.c" ¶ - "{SrcDir}xmlrole.c" ¶ - "{SrcDir}xmltok.c" - -ToolSrcFiles = ¶ - "{ToolDir}elements.c" ¶ - "{ToolDir}outline.c" - - -### Object Files ### - -ObjFiles-PPC = ¶ - "{ObjDir}xmlparse.c.o" ¶ - "{ObjDir}xmlrole.c.o" ¶ - "{ObjDir}xmltok.c.o" - -ElementToolObjFile = "{ObjDir}elements.c.o" - -OutlineToolObjFile = "{ObjDir}outline.c.o" - - -### Libraries ### - -StLibFiles-PPC = ¶ - "{PPCLibraries}StdCRuntime.o" ¶ - "{PPCLibraries}PPCCRuntime.o" ¶ - "{PPCLibraries}PPCToolLibs.o" - -ShLibFiles-PPC = ¶ - "{SharedLibraries}InterfaceLib" ¶ - "{SharedLibraries}StdCLib" ¶ - "{SharedLibraries}MathLib" - -LibFiles-PPC = ¶ - {StLibFiles-PPC} ¶ - {ShLibFiles-PPC} - - -### Special Files ### - -ExportFile = "{ObjDir}{FragName}.exp" - -StLibFile = "{ObjDir}{FragName}.MrC.o" - -ShLibFile = "{ObjDir}{FragName}" - -StubFile = "{ObjDir}{FragName}.stub" - -ElementsTool = "{ToolDir}elements" - -OutlineTool = "{ToolDir}outline" - - -### Default Rules ### - -.c.o Ä .c {¥MondoBuild¥} - {PPCC} {depDir}{default}.c -o {targDir}{default}.c.o {PPCCOptions} - - -### Build Rules ### - -All Ä Dynamic {ElementsTool} {OutlineTool} - -Static Ä {StLibFile} - -Dynamic Ä Static {ShLibFile} {StubFile} - -{StLibFile} ÄÄ {ObjFiles-PPC} {StLibFiles-PPC} {¥MondoBuild¥} - PPCLink ¶ - -o {Targ} ¶ - {ObjFiles-PPC} ¶ - {StLibFiles-PPC} ¶ - {Sym-PPC} ¶ - -mf -d ¶ - -t 'XCOF' ¶ - -c 'MPS ' ¶ - -xm l - -{ShLibFile} ÄÄ {StLibFile} {ShLibFiles-PPC} {ExportFile} {¥MondoBuild¥} - PPCLink ¶ - -o {Targ} ¶ - {StLibFile} ¶ - {ShLibFiles-PPC} ¶ - {Sym-PPC} ¶ - -@export {ExportFile} ¶ - -fragname {FragName} ¶ - -mf -d ¶ - -t 'shlb' ¶ - -c '????' ¶ - -xm s - -{StubFile} ÄÄ {ShLibFile} {¥MondoBuild¥} - shlb2stub -o {Targ} {ShLibFile} - -{ElementsTool} ÄÄ {ElementToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥} - PPCLink ¶ - -o {Targ} ¶ - {ElementToolObjFile} ¶ - {StLibFile} ¶ - {LibFiles-PPC} ¶ - {Sym-PPC} ¶ - -mf -d ¶ - -t 'MPST' ¶ - -c 'MPS ' - -{OutlineTool} ÄÄ {OutlineToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥} - PPCLink ¶ - -o {Targ} ¶ - {OutlineToolObjFile} ¶ - {StLibFile} ¶ - {LibFiles-PPC} ¶ - {Sym-PPC} ¶ - -mf -d ¶ - -t 'MPST' ¶ - -c 'MPS ' - - -### Special Rules ### - -{ExportFile} ÄÄ "{HdrDir}expat.h" {¥MondoBuild¥} - StreamEdit -d ¶ - -e "/¥('XMLPARSEAPI('Å') ')Ç0,1È'XML_'([A-Za-z0-9_]+)¨1'('/ Print 'XML_' ¨1" ¶ - "{HdrDir}expat.h" > {Targ} - - -### Required Dependencies ### - -"{ObjDir}xmlparse.c.o" Ä "{SrcDir}xmlparse.c" -"{ObjDir}xmlrole.c.o" Ä "{SrcDir}xmlrole.c" -"{ObjDir}xmltok.c.o" Ä "{SrcDir}xmltok.c" - -"{ObjDir}elements.c.o" Ä "{ToolDir}elements.c" -"{ObjDir}outline.c.o" Ä "{ToolDir}outline.c" - - -### Optional Dependencies ### -### Build this target to clean out generated intermediate files. ### - -Clean Ä - Delete {ObjFiles-PPC} {ExportFile} {ElementToolObjFile} {OutlineToolObjFile} - -### Build this target to clean out all generated files. ### - -Clean-All Ä Clean - Delete {StLibFile} {ShLibFile} {StubFile} {ElementsTool} {OutlineTool} - -### Build this target to generate "include file" dependencies. ### - -Dependencies Ä $OutOfDate - MakeDepend ¶ - -append {MAKEFILE} ¶ - -ignore "{CIncludes}" ¶ - -objdir "{ObjDir}" ¶ - -objext .o ¶ - {Defines} ¶ - {Includes} ¶ - {SrcFiles} - - diff --git a/3rdparty/expat-2.0.1/lib/amigaconfig.h b/3rdparty/expat-2.0.1/lib/amigaconfig.h deleted file mode 100644 index 86c6115040..0000000000 --- a/3rdparty/expat-2.0.1/lib/amigaconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef AMIGACONFIG_H -#define AMIGACONFIG_H - -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#define BYTEORDER 4321 - -/* Define to 1 if you have the `bcopy' function. */ -#define HAVE_BCOPY 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_CHECK_H - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* whether byteorder is bigendian */ -#define WORDS_BIGENDIAN - -/* Define to specify how much context to retain around the current parse - point. */ -#define XML_CONTEXT_BYTES 1024 - -/* Define to make parameter entity parsing functionality available. */ -#define XML_DTD - -/* Define to make XML Namespaces functionality available. */ -#define XML_NS - -#endif /* AMIGACONFIG_H */ diff --git a/3rdparty/expat-2.0.1/lib/ascii.h b/3rdparty/expat-2.0.1/lib/ascii.h deleted file mode 100644 index d10530b09b..0000000000 --- a/3rdparty/expat-2.0.1/lib/ascii.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#define ASCII_A 0x41 -#define ASCII_B 0x42 -#define ASCII_C 0x43 -#define ASCII_D 0x44 -#define ASCII_E 0x45 -#define ASCII_F 0x46 -#define ASCII_G 0x47 -#define ASCII_H 0x48 -#define ASCII_I 0x49 -#define ASCII_J 0x4A -#define ASCII_K 0x4B -#define ASCII_L 0x4C -#define ASCII_M 0x4D -#define ASCII_N 0x4E -#define ASCII_O 0x4F -#define ASCII_P 0x50 -#define ASCII_Q 0x51 -#define ASCII_R 0x52 -#define ASCII_S 0x53 -#define ASCII_T 0x54 -#define ASCII_U 0x55 -#define ASCII_V 0x56 -#define ASCII_W 0x57 -#define ASCII_X 0x58 -#define ASCII_Y 0x59 -#define ASCII_Z 0x5A - -#define ASCII_a 0x61 -#define ASCII_b 0x62 -#define ASCII_c 0x63 -#define ASCII_d 0x64 -#define ASCII_e 0x65 -#define ASCII_f 0x66 -#define ASCII_g 0x67 -#define ASCII_h 0x68 -#define ASCII_i 0x69 -#define ASCII_j 0x6A -#define ASCII_k 0x6B -#define ASCII_l 0x6C -#define ASCII_m 0x6D -#define ASCII_n 0x6E -#define ASCII_o 0x6F -#define ASCII_p 0x70 -#define ASCII_q 0x71 -#define ASCII_r 0x72 -#define ASCII_s 0x73 -#define ASCII_t 0x74 -#define ASCII_u 0x75 -#define ASCII_v 0x76 -#define ASCII_w 0x77 -#define ASCII_x 0x78 -#define ASCII_y 0x79 -#define ASCII_z 0x7A - -#define ASCII_0 0x30 -#define ASCII_1 0x31 -#define ASCII_2 0x32 -#define ASCII_3 0x33 -#define ASCII_4 0x34 -#define ASCII_5 0x35 -#define ASCII_6 0x36 -#define ASCII_7 0x37 -#define ASCII_8 0x38 -#define ASCII_9 0x39 - -#define ASCII_TAB 0x09 -#define ASCII_SPACE 0x20 -#define ASCII_EXCL 0x21 -#define ASCII_QUOT 0x22 -#define ASCII_AMP 0x26 -#define ASCII_APOS 0x27 -#define ASCII_MINUS 0x2D -#define ASCII_PERIOD 0x2E -#define ASCII_COLON 0x3A -#define ASCII_SEMI 0x3B -#define ASCII_LT 0x3C -#define ASCII_EQUALS 0x3D -#define ASCII_GT 0x3E -#define ASCII_LSQB 0x5B -#define ASCII_RSQB 0x5D -#define ASCII_UNDERSCORE 0x5F -#define ASCII_LPAREN 0x28 -#define ASCII_RPAREN 0x29 -#define ASCII_FF 0x0C -#define ASCII_SLASH 0x2F -#define ASCII_HASH 0x23 -#define ASCII_PIPE 0x7C -#define ASCII_COMMA 0x2C diff --git a/3rdparty/expat-2.0.1/lib/asciitab.h b/3rdparty/expat-2.0.1/lib/asciitab.h deleted file mode 100644 index 79a15c28ca..0000000000 --- a/3rdparty/expat-2.0.1/lib/asciitab.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, -/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML, -/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, -/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, -/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, -/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, -/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, -/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, -/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, -/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, -/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, -/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, -/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, -/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, -/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, -/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, -/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, -/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, diff --git a/3rdparty/expat-2.0.1/lib/expat.dsp b/3rdparty/expat-2.0.1/lib/expat.dsp deleted file mode 100644 index 1fc17d4c96..0000000000 --- a/3rdparty/expat-2.0.1/lib/expat.dsp +++ /dev/null @@ -1,185 +0,0 @@ -# Microsoft Developer Studio Project File - Name="expat" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=expat - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "expat.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "expat.mak" CFG="expat - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "expat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "expat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "expat - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILED_FROM_DSP" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release/libexpat.dll" - -!ELSEIF "$(CFG)" == "expat - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug/libexpat.dll" - -!ENDIF - -# Begin Target - -# Name "expat - Win32 Release" -# Name "expat - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\libexpat.def -# End Source File -# Begin Source File - -SOURCE=.\xmlparse.c - -!IF "$(CFG)" == "expat - Win32 Release" - -!ELSEIF "$(CFG)" == "expat - Win32 Debug" - -# ADD CPP /GX- /Od - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_ns.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ascii.h -# End Source File -# Begin Source File - -SOURCE=.\asciitab.h -# End Source File -# Begin Source File - -SOURCE=.\expat.h -# End Source File -# Begin Source File - -SOURCE=.\expat_external.h -# End Source File -# Begin Source File - -SOURCE=.\iasciitab.h -# End Source File -# Begin Source File - -SOURCE=.\internal.h -# End Source File -# Begin Source File - -SOURCE=.\latin1tab.h -# End Source File -# Begin Source File - -SOURCE=.\nametab.h -# End Source File -# Begin Source File - -SOURCE=.\utf8tab.h -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/lib/expat.h b/3rdparty/expat-2.0.1/lib/expat.h deleted file mode 100644 index 20a8278f78..0000000000 --- a/3rdparty/expat-2.0.1/lib/expat.h +++ /dev/null @@ -1,1014 +0,0 @@ -/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#ifndef Expat_INCLUDED -#define Expat_INCLUDED 1 - -#ifdef __VMS -/* 0 1 2 3 0 1 2 3 - 1234567890123456789012345678901 1234567890123456789012345678901 */ -#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler -#define XML_SetUnparsedEntityDeclHandler XML_SetUnparsedEntDeclHandler -#define XML_SetStartNamespaceDeclHandler XML_SetStartNamespcDeclHandler -#define XML_SetExternalEntityRefHandlerArg XML_SetExternalEntRefHandlerArg -#endif - -#include -#include "expat_external.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct XML_ParserStruct; -typedef struct XML_ParserStruct *XML_Parser; - -/* Should this be defined using stdbool.h when C99 is available? */ -typedef unsigned char XML_Bool; -#define XML_TRUE ((XML_Bool) 1) -#define XML_FALSE ((XML_Bool) 0) - -/* The XML_Status enum gives the possible return values for several - API functions. The preprocessor #defines are included so this - stanza can be added to code that still needs to support older - versions of Expat 1.95.x: - - #ifndef XML_STATUS_OK - #define XML_STATUS_OK 1 - #define XML_STATUS_ERROR 0 - #endif - - Otherwise, the #define hackery is quite ugly and would have been - dropped. -*/ -enum XML_Status { - XML_STATUS_ERROR = 0, -#define XML_STATUS_ERROR XML_STATUS_ERROR - XML_STATUS_OK = 1, -#define XML_STATUS_OK XML_STATUS_OK - XML_STATUS_SUSPENDED = 2 -#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED -}; - -enum XML_Error { - XML_ERROR_NONE, - XML_ERROR_NO_MEMORY, - XML_ERROR_SYNTAX, - XML_ERROR_NO_ELEMENTS, - XML_ERROR_INVALID_TOKEN, - XML_ERROR_UNCLOSED_TOKEN, - XML_ERROR_PARTIAL_CHAR, - XML_ERROR_TAG_MISMATCH, - XML_ERROR_DUPLICATE_ATTRIBUTE, - XML_ERROR_JUNK_AFTER_DOC_ELEMENT, - XML_ERROR_PARAM_ENTITY_REF, - XML_ERROR_UNDEFINED_ENTITY, - XML_ERROR_RECURSIVE_ENTITY_REF, - XML_ERROR_ASYNC_ENTITY, - XML_ERROR_BAD_CHAR_REF, - XML_ERROR_BINARY_ENTITY_REF, - XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, - XML_ERROR_MISPLACED_XML_PI, - XML_ERROR_UNKNOWN_ENCODING, - XML_ERROR_INCORRECT_ENCODING, - XML_ERROR_UNCLOSED_CDATA_SECTION, - XML_ERROR_EXTERNAL_ENTITY_HANDLING, - XML_ERROR_NOT_STANDALONE, - XML_ERROR_UNEXPECTED_STATE, - XML_ERROR_ENTITY_DECLARED_IN_PE, - XML_ERROR_FEATURE_REQUIRES_XML_DTD, - XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, - /* Added in 1.95.7. */ - XML_ERROR_UNBOUND_PREFIX, - /* Added in 1.95.8. */ - XML_ERROR_UNDECLARING_PREFIX, - XML_ERROR_INCOMPLETE_PE, - XML_ERROR_XML_DECL, - XML_ERROR_TEXT_DECL, - XML_ERROR_PUBLICID, - XML_ERROR_SUSPENDED, - XML_ERROR_NOT_SUSPENDED, - XML_ERROR_ABORTED, - XML_ERROR_FINISHED, - XML_ERROR_SUSPEND_PE, - /* Added in 2.0. */ - XML_ERROR_RESERVED_PREFIX_XML, - XML_ERROR_RESERVED_PREFIX_XMLNS, - XML_ERROR_RESERVED_NAMESPACE_URI -}; - -enum XML_Content_Type { - XML_CTYPE_EMPTY = 1, - XML_CTYPE_ANY, - XML_CTYPE_MIXED, - XML_CTYPE_NAME, - XML_CTYPE_CHOICE, - XML_CTYPE_SEQ -}; - -enum XML_Content_Quant { - XML_CQUANT_NONE, - XML_CQUANT_OPT, - XML_CQUANT_REP, - XML_CQUANT_PLUS -}; - -/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be - XML_CQUANT_NONE, and the other fields will be zero or NULL. - If type == XML_CTYPE_MIXED, then quant will be NONE or REP and - numchildren will contain number of elements that may be mixed in - and children point to an array of XML_Content cells that will be - all of XML_CTYPE_NAME type with no quantification. - - If type == XML_CTYPE_NAME, then the name points to the name, and - the numchildren field will be zero and children will be NULL. The - quant fields indicates any quantifiers placed on the name. - - CHOICE and SEQ will have name NULL, the number of children in - numchildren and children will point, recursively, to an array - of XML_Content cells. - - The EMPTY, ANY, and MIXED types will only occur at top level. -*/ - -typedef struct XML_cp XML_Content; - -struct XML_cp { - enum XML_Content_Type type; - enum XML_Content_Quant quant; - XML_Char * name; - unsigned int numchildren; - XML_Content * children; -}; - - -/* This is called for an element declaration. See above for - description of the model argument. It's the caller's responsibility - to free model when finished with it. -*/ -typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData, - const XML_Char *name, - XML_Content *model); - -XMLPARSEAPI(void) -XML_SetElementDeclHandler(XML_Parser parser, - XML_ElementDeclHandler eldecl); - -/* The Attlist declaration handler is called for *each* attribute. So - a single Attlist declaration with multiple attributes declared will - generate multiple calls to this handler. The "default" parameter - may be NULL in the case of the "#IMPLIED" or "#REQUIRED" - keyword. The "isrequired" parameter will be true and the default - value will be NULL in the case of "#REQUIRED". If "isrequired" is - true and default is non-NULL, then this is a "#FIXED" default. -*/ -typedef void (XMLCALL *XML_AttlistDeclHandler) ( - void *userData, - const XML_Char *elname, - const XML_Char *attname, - const XML_Char *att_type, - const XML_Char *dflt, - int isrequired); - -XMLPARSEAPI(void) -XML_SetAttlistDeclHandler(XML_Parser parser, - XML_AttlistDeclHandler attdecl); - -/* The XML declaration handler is called for *both* XML declarations - and text declarations. The way to distinguish is that the version - parameter will be NULL for text declarations. The encoding - parameter may be NULL for XML declarations. The standalone - parameter will be -1, 0, or 1 indicating respectively that there - was no standalone parameter in the declaration, that it was given - as no, or that it was given as yes. -*/ -typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData, - const XML_Char *version, - const XML_Char *encoding, - int standalone); - -XMLPARSEAPI(void) -XML_SetXmlDeclHandler(XML_Parser parser, - XML_XmlDeclHandler xmldecl); - - -typedef struct { - void *(*malloc_fcn)(size_t size); - void *(*realloc_fcn)(void *ptr, size_t size); - void (*free_fcn)(void *ptr); -} XML_Memory_Handling_Suite; - -/* Constructs a new parser; encoding is the encoding specified by the - external protocol or NULL if there is none specified. -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreate(const XML_Char *encoding); - -/* Constructs a new parser and namespace processor. Element type - names and attribute names that belong to a namespace will be - expanded; unprefixed attribute names are never expanded; unprefixed - element type names are expanded only if there is a default - namespace. The expanded name is the concatenation of the namespace - URI, the namespace separator character, and the local part of the - name. If the namespace separator is '\0' then the namespace URI - and the local part will be concatenated without any separator. - It is a programming error to use the separator '\0' with namespace - triplets (see XML_SetReturnNSTriplet). -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); - - -/* Constructs a new parser using the memory management suite referred to - by memsuite. If memsuite is NULL, then use the standard library memory - suite. If namespaceSeparator is non-NULL it creates a parser with - namespace processing as described above. The character pointed at - will serve as the namespace separator. - - All further memory operations used for the created parser will come from - the given suite. -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreate_MM(const XML_Char *encoding, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *namespaceSeparator); - -/* Prepare a parser object to be re-used. This is particularly - valuable when memory allocation overhead is disproportionatly high, - such as when a large number of small documnents need to be parsed. - All handlers are cleared from the parser, except for the - unknownEncodingHandler. The parser's external state is re-initialized - except for the values of ns and ns_triplets. - - Added in Expat 1.95.3. -*/ -XMLPARSEAPI(XML_Bool) -XML_ParserReset(XML_Parser parser, const XML_Char *encoding); - -/* atts is array of name/value pairs, terminated by 0; - names and values are 0 terminated. -*/ -typedef void (XMLCALL *XML_StartElementHandler) (void *userData, - const XML_Char *name, - const XML_Char **atts); - -typedef void (XMLCALL *XML_EndElementHandler) (void *userData, - const XML_Char *name); - - -/* s is not 0 terminated. */ -typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData, - const XML_Char *s, - int len); - -/* target and data are 0 terminated */ -typedef void (XMLCALL *XML_ProcessingInstructionHandler) ( - void *userData, - const XML_Char *target, - const XML_Char *data); - -/* data is 0 terminated */ -typedef void (XMLCALL *XML_CommentHandler) (void *userData, - const XML_Char *data); - -typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData); -typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData); - -/* This is called for any characters in the XML document for which - there is no applicable handler. This includes both characters that - are part of markup which is of a kind that is not reported - (comments, markup declarations), or characters that are part of a - construct which could be reported but for which no handler has been - supplied. The characters are passed exactly as they were in the XML - document except that they will be encoded in UTF-8 or UTF-16. - Line boundaries are not normalized. Note that a byte order mark - character is not passed to the default handler. There are no - guarantees about how characters are divided between calls to the - default handler: for example, a comment might be split between - multiple calls. -*/ -typedef void (XMLCALL *XML_DefaultHandler) (void *userData, - const XML_Char *s, - int len); - -/* This is called for the start of the DOCTYPE declaration, before - any DTD or internal subset is parsed. -*/ -typedef void (XMLCALL *XML_StartDoctypeDeclHandler) ( - void *userData, - const XML_Char *doctypeName, - const XML_Char *sysid, - const XML_Char *pubid, - int has_internal_subset); - -/* This is called for the start of the DOCTYPE declaration when the - closing > is encountered, but after processing any external - subset. -*/ -typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData); - -/* This is called for entity declarations. The is_parameter_entity - argument will be non-zero if the entity is a parameter entity, zero - otherwise. - - For internal entities (), value will - be non-NULL and systemId, publicID, and notationName will be NULL. - The value string is NOT nul-terminated; the length is provided in - the value_length argument. Since it is legal to have zero-length - values, do not use this argument to test for internal entities. - - For external entities, value will be NULL and systemId will be - non-NULL. The publicId argument will be NULL unless a public - identifier was provided. The notationName argument will have a - non-NULL value only for unparsed entity declarations. - - Note that is_parameter_entity can't be changed to XML_Bool, since - that would break binary compatibility. -*/ -typedef void (XMLCALL *XML_EntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -XMLPARSEAPI(void) -XML_SetEntityDeclHandler(XML_Parser parser, - XML_EntityDeclHandler handler); - -/* OBSOLETE -- OBSOLETE -- OBSOLETE - This handler has been superceded by the EntityDeclHandler above. - It is provided here for backward compatibility. - - This is called for a declaration of an unparsed (NDATA) entity. - The base argument is whatever was set by XML_SetBase. The - entityName, systemId and notationName arguments will never be - NULL. The other arguments may be. -*/ -typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -/* This is called for a declaration of notation. The base argument is - whatever was set by XML_SetBase. The notationName will never be - NULL. The other arguments can be. -*/ -typedef void (XMLCALL *XML_NotationDeclHandler) ( - void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -/* When namespace processing is enabled, these are called once for - each namespace declaration. The call to the start and end element - handlers occur between the calls to the start and end namespace - declaration handlers. For an xmlns attribute, prefix will be - NULL. For an xmlns="" attribute, uri will be NULL. -*/ -typedef void (XMLCALL *XML_StartNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix, - const XML_Char *uri); - -typedef void (XMLCALL *XML_EndNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix); - -/* This is called if the document is not standalone, that is, it has an - external subset or a reference to a parameter entity, but does not - have standalone="yes". If this handler returns XML_STATUS_ERROR, - then processing will not continue, and the parser will return a - XML_ERROR_NOT_STANDALONE error. - If parameter entity parsing is enabled, then in addition to the - conditions above this handler will only be called if the referenced - entity was actually read. -*/ -typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData); - -/* This is called for a reference to an external parsed general - entity. The referenced entity is not automatically parsed. The - application can parse it immediately or later using - XML_ExternalEntityParserCreate. - - The parser argument is the parser parsing the entity containing the - reference; it can be passed as the parser argument to - XML_ExternalEntityParserCreate. The systemId argument is the - system identifier as specified in the entity declaration; it will - not be NULL. - - The base argument is the system identifier that should be used as - the base for resolving systemId if systemId was relative; this is - set by XML_SetBase; it may be NULL. - - The publicId argument is the public identifier as specified in the - entity declaration, or NULL if none was specified; the whitespace - in the public identifier will have been normalized as required by - the XML spec. - - The context argument specifies the parsing context in the format - expected by the context argument to XML_ExternalEntityParserCreate; - context is valid only until the handler returns, so if the - referenced entity is to be parsed later, it must be copied. - context is NULL only when the entity is a parameter entity. - - The handler should return XML_STATUS_ERROR if processing should not - continue because of a fatal error in the handling of the external - entity. In this case the calling parser will return an - XML_ERROR_EXTERNAL_ENTITY_HANDLING error. - - Note that unlike other handlers the first argument is the parser, - not userData. -*/ -typedef int (XMLCALL *XML_ExternalEntityRefHandler) ( - XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -/* This is called in two situations: - 1) An entity reference is encountered for which no declaration - has been read *and* this is not an error. - 2) An internal entity reference is read, but not expanded, because - XML_SetDefaultHandler has been called. - Note: skipped parameter entities in declarations and skipped general - entities in attribute values cannot be reported, because - the event would be out of sync with the reporting of the - declarations or attribute values -*/ -typedef void (XMLCALL *XML_SkippedEntityHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity); - -/* This structure is filled in by the XML_UnknownEncodingHandler to - provide information to the parser about encodings that are unknown - to the parser. - - The map[b] member gives information about byte sequences whose - first byte is b. - - If map[b] is c where c is >= 0, then b by itself encodes the - Unicode scalar value c. - - If map[b] is -1, then the byte sequence is malformed. - - If map[b] is -n, where n >= 2, then b is the first byte of an - n-byte sequence that encodes a single Unicode scalar value. - - The data member will be passed as the first argument to the convert - function. - - The convert function is used to convert multibyte sequences; s will - point to a n-byte sequence where map[(unsigned char)*s] == -n. The - convert function must return the Unicode scalar value represented - by this byte sequence or -1 if the byte sequence is malformed. - - The convert function may be NULL if the encoding is a single-byte - encoding, that is if map[b] >= -1 for all bytes b. - - When the parser is finished with the encoding, then if release is - not NULL, it will call release passing it the data member; once - release has been called, the convert function will not be called - again. - - Expat places certain restrictions on the encodings that are supported - using this mechanism. - - 1. Every ASCII character that can appear in a well-formed XML document, - other than the characters - - $@\^`{}~ - - must be represented by a single byte, and that byte must be the - same byte that represents that character in ASCII. - - 2. No character may require more than 4 bytes to encode. - - 3. All characters encoded must have Unicode scalar values <= - 0xFFFF, (i.e., characters that would be encoded by surrogates in - UTF-16 are not allowed). Note that this restriction doesn't - apply to the built-in support for UTF-8 and UTF-16. - - 4. No Unicode character may be encoded by more than one distinct - sequence of bytes. -*/ -typedef struct { - int map[256]; - void *data; - int (XMLCALL *convert)(void *data, const char *s); - void (XMLCALL *release)(void *data); -} XML_Encoding; - -/* This is called for an encoding that is unknown to the parser. - - The encodingHandlerData argument is that which was passed as the - second argument to XML_SetUnknownEncodingHandler. - - The name argument gives the name of the encoding as specified in - the encoding declaration. - - If the callback can provide information about the encoding, it must - fill in the XML_Encoding structure, and return XML_STATUS_OK. - Otherwise it must return XML_STATUS_ERROR. - - If info does not describe a suitable encoding, then the parser will - return an XML_UNKNOWN_ENCODING error. -*/ -typedef int (XMLCALL *XML_UnknownEncodingHandler) ( - void *encodingHandlerData, - const XML_Char *name, - XML_Encoding *info); - -XMLPARSEAPI(void) -XML_SetElementHandler(XML_Parser parser, - XML_StartElementHandler start, - XML_EndElementHandler end); - -XMLPARSEAPI(void) -XML_SetStartElementHandler(XML_Parser parser, - XML_StartElementHandler handler); - -XMLPARSEAPI(void) -XML_SetEndElementHandler(XML_Parser parser, - XML_EndElementHandler handler); - -XMLPARSEAPI(void) -XML_SetCharacterDataHandler(XML_Parser parser, - XML_CharacterDataHandler handler); - -XMLPARSEAPI(void) -XML_SetProcessingInstructionHandler(XML_Parser parser, - XML_ProcessingInstructionHandler handler); -XMLPARSEAPI(void) -XML_SetCommentHandler(XML_Parser parser, - XML_CommentHandler handler); - -XMLPARSEAPI(void) -XML_SetCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start, - XML_EndCdataSectionHandler end); - -XMLPARSEAPI(void) -XML_SetStartCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start); - -XMLPARSEAPI(void) -XML_SetEndCdataSectionHandler(XML_Parser parser, - XML_EndCdataSectionHandler end); - -/* This sets the default handler and also inhibits expansion of - internal entities. These entity references will be passed to the - default handler, or to the skipped entity handler, if one is set. -*/ -XMLPARSEAPI(void) -XML_SetDefaultHandler(XML_Parser parser, - XML_DefaultHandler handler); - -/* This sets the default handler but does not inhibit expansion of - internal entities. The entity reference will not be passed to the - default handler. -*/ -XMLPARSEAPI(void) -XML_SetDefaultHandlerExpand(XML_Parser parser, - XML_DefaultHandler handler); - -XMLPARSEAPI(void) -XML_SetDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start, - XML_EndDoctypeDeclHandler end); - -XMLPARSEAPI(void) -XML_SetStartDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start); - -XMLPARSEAPI(void) -XML_SetEndDoctypeDeclHandler(XML_Parser parser, - XML_EndDoctypeDeclHandler end); - -XMLPARSEAPI(void) -XML_SetUnparsedEntityDeclHandler(XML_Parser parser, - XML_UnparsedEntityDeclHandler handler); - -XMLPARSEAPI(void) -XML_SetNotationDeclHandler(XML_Parser parser, - XML_NotationDeclHandler handler); - -XMLPARSEAPI(void) -XML_SetNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start, - XML_EndNamespaceDeclHandler end); - -XMLPARSEAPI(void) -XML_SetStartNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start); - -XMLPARSEAPI(void) -XML_SetEndNamespaceDeclHandler(XML_Parser parser, - XML_EndNamespaceDeclHandler end); - -XMLPARSEAPI(void) -XML_SetNotStandaloneHandler(XML_Parser parser, - XML_NotStandaloneHandler handler); - -XMLPARSEAPI(void) -XML_SetExternalEntityRefHandler(XML_Parser parser, - XML_ExternalEntityRefHandler handler); - -/* If a non-NULL value for arg is specified here, then it will be - passed as the first argument to the external entity ref handler - instead of the parser object. -*/ -XMLPARSEAPI(void) -XML_SetExternalEntityRefHandlerArg(XML_Parser parser, - void *arg); - -XMLPARSEAPI(void) -XML_SetSkippedEntityHandler(XML_Parser parser, - XML_SkippedEntityHandler handler); - -XMLPARSEAPI(void) -XML_SetUnknownEncodingHandler(XML_Parser parser, - XML_UnknownEncodingHandler handler, - void *encodingHandlerData); - -/* This can be called within a handler for a start element, end - element, processing instruction or character data. It causes the - corresponding markup to be passed to the default handler. -*/ -XMLPARSEAPI(void) -XML_DefaultCurrent(XML_Parser parser); - -/* If do_nst is non-zero, and namespace processing is in effect, and - a name has a prefix (i.e. an explicit namespace qualifier) then - that name is returned as a triplet in a single string separated by - the separator character specified when the parser was created: URI - + sep + local_name + sep + prefix. - - If do_nst is zero, then namespace information is returned in the - default manner (URI + sep + local_name) whether or not the name - has a prefix. - - Note: Calling XML_SetReturnNSTriplet after XML_Parse or - XML_ParseBuffer has no effect. -*/ - -XMLPARSEAPI(void) -XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); - -/* This value is passed as the userData argument to callbacks. */ -XMLPARSEAPI(void) -XML_SetUserData(XML_Parser parser, void *userData); - -/* Returns the last value set by XML_SetUserData or NULL. */ -#define XML_GetUserData(parser) (*(void **)(parser)) - -/* This is equivalent to supplying an encoding argument to - XML_ParserCreate. On success XML_SetEncoding returns non-zero, - zero otherwise. - Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer - has no effect and returns XML_STATUS_ERROR. -*/ -XMLPARSEAPI(enum XML_Status) -XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); - -/* If this function is called, then the parser will be passed as the - first argument to callbacks instead of userData. The userData will - still be accessible using XML_GetUserData. -*/ -XMLPARSEAPI(void) -XML_UseParserAsHandlerArg(XML_Parser parser); - -/* If useDTD == XML_TRUE is passed to this function, then the parser - will assume that there is an external subset, even if none is - specified in the document. In such a case the parser will call the - externalEntityRefHandler with a value of NULL for the systemId - argument (the publicId and context arguments will be NULL as well). - Note: For the purpose of checking WFC: Entity Declared, passing - useDTD == XML_TRUE will make the parser behave as if the document - had a DTD with an external subset. - Note: If this function is called, then this must be done before - the first call to XML_Parse or XML_ParseBuffer, since it will - have no effect after that. Returns - XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING. - Note: If the document does not have a DOCTYPE declaration at all, - then startDoctypeDeclHandler and endDoctypeDeclHandler will not - be called, despite an external subset being parsed. - Note: If XML_DTD is not defined when Expat is compiled, returns - XML_ERROR_FEATURE_REQUIRES_XML_DTD. -*/ -XMLPARSEAPI(enum XML_Error) -XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); - - -/* Sets the base to be used for resolving relative URIs in system - identifiers in declarations. Resolving relative identifiers is - left to the application: this value will be passed through as the - base argument to the XML_ExternalEntityRefHandler, - XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base - argument will be copied. Returns XML_STATUS_ERROR if out of memory, - XML_STATUS_OK otherwise. -*/ -XMLPARSEAPI(enum XML_Status) -XML_SetBase(XML_Parser parser, const XML_Char *base); - -XMLPARSEAPI(const XML_Char *) -XML_GetBase(XML_Parser parser); - -/* Returns the number of the attribute/value pairs passed in last call - to the XML_StartElementHandler that were specified in the start-tag - rather than defaulted. Each attribute/value pair counts as 2; thus - this correspondds to an index into the atts array passed to the - XML_StartElementHandler. -*/ -XMLPARSEAPI(int) -XML_GetSpecifiedAttributeCount(XML_Parser parser); - -/* Returns the index of the ID attribute passed in the last call to - XML_StartElementHandler, or -1 if there is no ID attribute. Each - attribute/value pair counts as 2; thus this correspondds to an - index into the atts array passed to the XML_StartElementHandler. -*/ -XMLPARSEAPI(int) -XML_GetIdAttributeIndex(XML_Parser parser); - -/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is - detected. The last call to XML_Parse must have isFinal true; len - may be zero for this call (or any other). - - Though the return values for these functions has always been - described as a Boolean value, the implementation, at least for the - 1.95.x series, has always returned exactly one of the XML_Status - values. -*/ -XMLPARSEAPI(enum XML_Status) -XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); - -XMLPARSEAPI(void *) -XML_GetBuffer(XML_Parser parser, int len); - -XMLPARSEAPI(enum XML_Status) -XML_ParseBuffer(XML_Parser parser, int len, int isFinal); - -/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return. - Must be called from within a call-back handler, except when aborting - (resumable = 0) an already suspended parser. Some call-backs may - still follow because they would otherwise get lost. Examples: - - endElementHandler() for empty elements when stopped in - startElementHandler(), - - endNameSpaceDeclHandler() when stopped in endElementHandler(), - and possibly others. - - Can be called from most handlers, including DTD related call-backs, - except when parsing an external parameter entity and resumable != 0. - Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. - Possible error codes: - - XML_ERROR_SUSPENDED: when suspending an already suspended parser. - - XML_ERROR_FINISHED: when the parser has already finished. - - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE. - - When resumable != 0 (true) then parsing is suspended, that is, - XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. - Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() - return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. - - *Note*: - This will be applied to the current parser instance only, that is, if - there is a parent parser then it will continue parsing when the - externalEntityRefHandler() returns. It is up to the implementation of - the externalEntityRefHandler() to call XML_StopParser() on the parent - parser (recursively), if one wants to stop parsing altogether. - - When suspended, parsing can be resumed by calling XML_ResumeParser(). -*/ -XMLPARSEAPI(enum XML_Status) -XML_StopParser(XML_Parser parser, XML_Bool resumable); - -/* Resumes parsing after it has been suspended with XML_StopParser(). - Must not be called from within a handler call-back. Returns same - status codes as XML_Parse() or XML_ParseBuffer(). - Additional error code XML_ERROR_NOT_SUSPENDED possible. - - *Note*: - This must be called on the most deeply nested child parser instance - first, and on its parent parser only after the child parser has finished, - to be applied recursively until the document entity's parser is restarted. - That is, the parent parser will not resume by itself and it is up to the - application to call XML_ResumeParser() on it at the appropriate moment. -*/ -XMLPARSEAPI(enum XML_Status) -XML_ResumeParser(XML_Parser parser); - -enum XML_Parsing { - XML_INITIALIZED, - XML_PARSING, - XML_FINISHED, - XML_SUSPENDED -}; - -typedef struct { - enum XML_Parsing parsing; - XML_Bool finalBuffer; -} XML_ParsingStatus; - -/* Returns status of parser with respect to being initialized, parsing, - finished, or suspended and processing the final buffer. - XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus, - XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED -*/ -XMLPARSEAPI(void) -XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); - -/* Creates an XML_Parser object that can parse an external general - entity; context is a '\0'-terminated string specifying the parse - context; encoding is a '\0'-terminated string giving the name of - the externally specified encoding, or NULL if there is no - externally specified encoding. The context string consists of a - sequence of tokens separated by formfeeds (\f); a token consisting - of a name specifies that the general entity of the name is open; a - token of the form prefix=uri specifies the namespace for a - particular prefix; a token of the form =uri specifies the default - namespace. This can be called at any point after the first call to - an ExternalEntityRefHandler so longer as the parser has not yet - been freed. The new parser is completely independent and may - safely be used in a separate thread. The handlers and userData are - initialized from the parser argument. Returns NULL if out of memory. - Otherwise returns a new XML_Parser object. -*/ -XMLPARSEAPI(XML_Parser) -XML_ExternalEntityParserCreate(XML_Parser parser, - const XML_Char *context, - const XML_Char *encoding); - -enum XML_ParamEntityParsing { - XML_PARAM_ENTITY_PARSING_NEVER, - XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, - XML_PARAM_ENTITY_PARSING_ALWAYS -}; - -/* Controls parsing of parameter entities (including the external DTD - subset). If parsing of parameter entities is enabled, then - references to external parameter entities (including the external - DTD subset) will be passed to the handler set with - XML_SetExternalEntityRefHandler. The context passed will be 0. - - Unlike external general entities, external parameter entities can - only be parsed synchronously. If the external parameter entity is - to be parsed, it must be parsed during the call to the external - entity ref handler: the complete sequence of - XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and - XML_ParserFree calls must be made during this call. After - XML_ExternalEntityParserCreate has been called to create the parser - for the external parameter entity (context must be 0 for this - call), it is illegal to make any calls on the old parser until - XML_ParserFree has been called on the newly created parser. - If the library has been compiled without support for parameter - entity parsing (ie without XML_DTD being defined), then - XML_SetParamEntityParsing will return 0 if parsing of parameter - entities is requested; otherwise it will return non-zero. - Note: If XML_SetParamEntityParsing is called after XML_Parse or - XML_ParseBuffer, then it has no effect and will always return 0. -*/ -XMLPARSEAPI(int) -XML_SetParamEntityParsing(XML_Parser parser, - enum XML_ParamEntityParsing parsing); - -/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then - XML_GetErrorCode returns information about the error. -*/ -XMLPARSEAPI(enum XML_Error) -XML_GetErrorCode(XML_Parser parser); - -/* These functions return information about the current parse - location. They may be called from any callback called to report - some parse event; in this case the location is the location of the - first of the sequence of characters that generated the event. When - called from callbacks generated by declarations in the document - prologue, the location identified isn't as neatly defined, but will - be within the relevant markup. When called outside of the callback - functions, the position indicated will be just past the last parse - event (regardless of whether there was an associated callback). - - They may also be called after returning from a call to XML_Parse - or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then - the location is the location of the character at which the error - was detected; otherwise the location is the location of the last - parse event, as described above. -*/ -XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser); -XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser); -XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser); - -/* Return the number of bytes in the current event. - Returns 0 if the event is in an internal entity. -*/ -XMLPARSEAPI(int) -XML_GetCurrentByteCount(XML_Parser parser); - -/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets - the integer pointed to by offset to the offset within this buffer - of the current parse position, and sets the integer pointed to by size - to the size of this buffer (the number of input bytes). Otherwise - returns a NULL pointer. Also returns a NULL pointer if a parse isn't - active. - - NOTE: The character pointer returned should not be used outside - the handler that makes the call. -*/ -XMLPARSEAPI(const char *) -XML_GetInputContext(XML_Parser parser, - int *offset, - int *size); - -/* For backwards compatibility with previous versions. */ -#define XML_GetErrorLineNumber XML_GetCurrentLineNumber -#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber -#define XML_GetErrorByteIndex XML_GetCurrentByteIndex - -/* Frees the content model passed to the element declaration handler */ -XMLPARSEAPI(void) -XML_FreeContentModel(XML_Parser parser, XML_Content *model); - -/* Exposing the memory handling functions used in Expat */ -XMLPARSEAPI(void *) -XML_MemMalloc(XML_Parser parser, size_t size); - -XMLPARSEAPI(void *) -XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); - -XMLPARSEAPI(void) -XML_MemFree(XML_Parser parser, void *ptr); - -/* Frees memory used by the parser. */ -XMLPARSEAPI(void) -XML_ParserFree(XML_Parser parser); - -/* Returns a string describing the error. */ -XMLPARSEAPI(const XML_LChar *) -XML_ErrorString(enum XML_Error code); - -/* Return a string containing the version number of this expat */ -XMLPARSEAPI(const XML_LChar *) -XML_ExpatVersion(void); - -typedef struct { - int major; - int minor; - int micro; -} XML_Expat_Version; - -/* Return an XML_Expat_Version structure containing numeric version - number information for this version of expat. -*/ -XMLPARSEAPI(XML_Expat_Version) -XML_ExpatVersionInfo(void); - -/* Added in Expat 1.95.5. */ -enum XML_FeatureEnum { - XML_FEATURE_END = 0, - XML_FEATURE_UNICODE, - XML_FEATURE_UNICODE_WCHAR_T, - XML_FEATURE_DTD, - XML_FEATURE_CONTEXT_BYTES, - XML_FEATURE_MIN_SIZE, - XML_FEATURE_SIZEOF_XML_CHAR, - XML_FEATURE_SIZEOF_XML_LCHAR, - XML_FEATURE_NS, - XML_FEATURE_LARGE_SIZE - /* Additional features must be added to the end of this enum. */ -}; - -typedef struct { - enum XML_FeatureEnum feature; - const XML_LChar *name; - long int value; -} XML_Feature; - -XMLPARSEAPI(const XML_Feature *) -XML_GetFeatureList(void); - - -/* Expat follows the GNU/Linux convention of odd number minor version for - beta/development releases and even number minor version for stable - releases. Micro is bumped with each release, and set to 0 with each - change to major or minor version. -*/ -#define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 0 -#define XML_MICRO_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif /* not Expat_INCLUDED */ diff --git a/3rdparty/expat-2.0.1/lib/expat_external.h b/3rdparty/expat-2.0.1/lib/expat_external.h deleted file mode 100644 index 2c03284ea2..0000000000 --- a/3rdparty/expat-2.0.1/lib/expat_external.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#ifndef Expat_External_INCLUDED -#define Expat_External_INCLUDED 1 - -/* External API definitions */ - -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) -#define XML_USE_MSC_EXTENSIONS 1 -#endif - -/* Expat tries very hard to make the API boundary very specifically - defined. There are two macros defined to control this boundary; - each of these can be defined before including this header to - achieve some different behavior, but doing so it not recommended or - tested frequently. - - XMLCALL - The calling convention to use for all calls across the - "library boundary." This will default to cdecl, and - try really hard to tell the compiler that's what we - want. - - XMLIMPORT - Whatever magic is needed to note that a function is - to be imported from a dynamically loaded library - (.dll, .so, or .sl, depending on your platform). - - The XMLCALL macro was added in Expat 1.95.7. The only one which is - expected to be directly useful in client code is XMLCALL. - - Note that on at least some Unix versions, the Expat library must be - compiled with the cdecl calling convention as the default since - system headers may assume the cdecl convention. -*/ -#ifndef XMLCALL -#if defined(_MSC_VER) -#define XMLCALL __cdecl -#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) -#define XMLCALL __attribute__((cdecl)) -#else -/* For any platform which uses this definition and supports more than - one calling convention, we need to extend this definition to - declare the convention used on that platform, if it's possible to - do so. - - If this is the case for your platform, please file a bug report - with information on how to identify your platform via the C - pre-processor and how to specify the same calling convention as the - platform's malloc() implementation. -*/ -#define XMLCALL -#endif -#endif /* not defined XMLCALL */ - - -#if !defined(XML_STATIC) && !defined(XMLIMPORT) -#ifndef XML_BUILDING_EXPAT -/* using Expat from an application */ - -#ifdef XML_USE_MSC_EXTENSIONS -#define XMLIMPORT __declspec(dllimport) -#endif - -#endif -#endif /* not defined XML_STATIC */ - - -/* If we didn't define it above, define it away: */ -#ifndef XMLIMPORT -#define XMLIMPORT -#endif - - -#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef XML_UNICODE_WCHAR_T -#define XML_UNICODE -#endif - -#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ -#ifdef XML_UNICODE_WCHAR_T -typedef wchar_t XML_Char; -typedef wchar_t XML_LChar; -#else -typedef unsigned short XML_Char; -typedef char XML_LChar; -#endif /* XML_UNICODE_WCHAR_T */ -#else /* Information is UTF-8 encoded. */ -typedef char XML_Char; -typedef char XML_LChar; -#endif /* XML_UNICODE */ - -#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ -#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 -typedef __int64 XML_Index; -typedef unsigned __int64 XML_Size; -#else -typedef long long XML_Index; -typedef unsigned long long XML_Size; -#endif -#else -typedef long XML_Index; -typedef unsigned long XML_Size; -#endif /* XML_LARGE_SIZE */ - -#ifdef __cplusplus -} -#endif - -#endif /* not Expat_External_INCLUDED */ diff --git a/3rdparty/expat-2.0.1/lib/expat_static.dsp b/3rdparty/expat-2.0.1/lib/expat_static.dsp deleted file mode 100644 index a67897bbd1..0000000000 --- a/3rdparty/expat-2.0.1/lib/expat_static.dsp +++ /dev/null @@ -1,162 +0,0 @@ -# Microsoft Developer Studio Project File - Name="expat_static" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=expat_static - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "expat_static.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "expat_static.mak" CFG="expat_static - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "expat_static - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "expat_static - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "expat_static - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "expat_static___Win32_Release" -# PROP BASE Intermediate_Dir "expat_static___Win32_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x1009 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\win32\bin\Release/libexpatMT.lib" - -!ELSEIF "$(CFG)" == "expat_static - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "expat_static___Win32_Debug" -# PROP BASE Intermediate_Dir "expat_static___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x1009 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatMT.lib" - -!ENDIF - -# Begin Target - -# Name "expat_static - Win32 Release" -# Name "expat_static - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\xmlparse.c -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_ns.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ascii.h -# End Source File -# Begin Source File - -SOURCE=.\asciitab.h -# End Source File -# Begin Source File - -SOURCE=.\expat.h -# End Source File -# Begin Source File - -SOURCE=.\expat_external.h -# End Source File -# Begin Source File - -SOURCE=.\iasciitab.h -# End Source File -# Begin Source File - -SOURCE=.\internal.h -# End Source File -# Begin Source File - -SOURCE=.\latin1tab.h -# End Source File -# Begin Source File - -SOURCE=.\nametab.h -# End Source File -# Begin Source File - -SOURCE=.\utf8tab.h -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.h -# End Source File -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/lib/expatw.dsp b/3rdparty/expat-2.0.1/lib/expatw.dsp deleted file mode 100644 index 46db7d6fea..0000000000 --- a/3rdparty/expat-2.0.1/lib/expatw.dsp +++ /dev/null @@ -1,185 +0,0 @@ -# Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=expatw - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "expatw.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "expatw.mak" CFG="expatw - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "expatw - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release-w" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release/libexpatw.dll" - -!ELSEIF "$(CFG)" == "expatw - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug-w" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug/libexpatw.dll" - -!ENDIF - -# Begin Target - -# Name "expatw - Win32 Release" -# Name "expatw - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\libexpatw.def -# End Source File -# Begin Source File - -SOURCE=.\xmlparse.c - -!IF "$(CFG)" == "expatw - Win32 Release" - -!ELSEIF "$(CFG)" == "expatw - Win32 Debug" - -# ADD CPP /GX- /Od - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_ns.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ascii.h -# End Source File -# Begin Source File - -SOURCE=.\asciitab.h -# End Source File -# Begin Source File - -SOURCE=.\expat.h -# End Source File -# Begin Source File - -SOURCE=.\expat_external.h -# End Source File -# Begin Source File - -SOURCE=.\iasciitab.h -# End Source File -# Begin Source File - -SOURCE=.\internal.h -# End Source File -# Begin Source File - -SOURCE=.\latin1tab.h -# End Source File -# Begin Source File - -SOURCE=.\nametab.h -# End Source File -# Begin Source File - -SOURCE=.\utf8tab.h -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/lib/expatw_static.dsp b/3rdparty/expat-2.0.1/lib/expatw_static.dsp deleted file mode 100644 index d28632cf49..0000000000 --- a/3rdparty/expat-2.0.1/lib/expatw_static.dsp +++ /dev/null @@ -1,162 +0,0 @@ -# Microsoft Developer Studio Project File - Name="expatw_static" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=expatw_static - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "expatw_static.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "expatw_static.mak" CFG="expatw_static - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "expatw_static - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "expatw_static - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "expatw_static - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "expatw_static___Win32_Release" -# PROP BASE Intermediate_Dir "expatw_static___Win32_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release-w_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x1009 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatwMT.lib" - -!ELSEIF "$(CFG)" == "expatw_static - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "expatw_static___Win32_Debug" -# PROP BASE Intermediate_Dir "expatw_static___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug-w_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /D "COMPILED_FROM_DSP" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x1009 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\win32\bin\Debug\libexpatwMT.lib" - -!ENDIF - -# Begin Target - -# Name "expatw_static - Win32 Release" -# Name "expatw_static - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\xmlparse.c -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.c -# End Source File -# Begin Source File - -SOURCE=.\xmltok_ns.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ascii.h -# End Source File -# Begin Source File - -SOURCE=.\asciitab.h -# End Source File -# Begin Source File - -SOURCE=.\expat.h -# End Source File -# Begin Source File - -SOURCE=.\expat_external.h -# End Source File -# Begin Source File - -SOURCE=.\iasciitab.h -# End Source File -# Begin Source File - -SOURCE=.\internal.h -# End Source File -# Begin Source File - -SOURCE=.\latin1tab.h -# End Source File -# Begin Source File - -SOURCE=.\nametab.h -# End Source File -# Begin Source File - -SOURCE=.\utf8tab.h -# End Source File -# Begin Source File - -SOURCE=.\xmlrole.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok.h -# End Source File -# Begin Source File - -SOURCE=.\xmltok_impl.h -# End Source File -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/lib/iasciitab.h b/3rdparty/expat-2.0.1/lib/iasciitab.h deleted file mode 100644 index 24a1d5ccc9..0000000000 --- a/3rdparty/expat-2.0.1/lib/iasciitab.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */ -/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, -/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML, -/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, -/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, -/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, -/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, -/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, -/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, -/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, -/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, -/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, -/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, -/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, -/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, -/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, -/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, -/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, -/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, diff --git a/3rdparty/expat-2.0.1/lib/internal.h b/3rdparty/expat-2.0.1/lib/internal.h deleted file mode 100644 index dd5454831d..0000000000 --- a/3rdparty/expat-2.0.1/lib/internal.h +++ /dev/null @@ -1,73 +0,0 @@ -/* internal.h - - Internal definitions used by Expat. This is not needed to compile - client code. - - The following calling convention macros are defined for frequently - called functions: - - FASTCALL - Used for those internal functions that have a simple - body and a low number of arguments and local variables. - - PTRCALL - Used for functions called though function pointers. - - PTRFASTCALL - Like PTRCALL, but for low number of arguments. - - inline - Used for selected internal functions for which inlining - may improve performance on some platforms. - - Note: Use of these macros is based on judgement, not hard rules, - and therefore subject to change. -*/ - -#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__) -/* We'll use this version by default only where we know it helps. - - regparm() generates warnings on Solaris boxes. See SF bug #692878. - - Instability reported with egcs on a RedHat Linux 7.3. - Let's comment out: - #define FASTCALL __attribute__((stdcall, regparm(3))) - and let's try this: -*/ -#define FASTCALL __attribute__((regparm(3))) -#define PTRFASTCALL __attribute__((regparm(3))) -#endif - -/* Using __fastcall seems to have an unexpected negative effect under - MS VC++, especially for function pointers, so we won't use it for - now on that platform. It may be reconsidered for a future release - if it can be made more effective. - Likely reason: __fastcall on Windows is like stdcall, therefore - the compiler cannot perform stack optimizations for call clusters. -*/ - -/* Make sure all of these are defined if they aren't already. */ - -#ifndef FASTCALL -#define FASTCALL -#endif - -#ifndef PTRCALL -#define PTRCALL -#endif - -#ifndef PTRFASTCALL -#define PTRFASTCALL -#endif - -#ifndef XML_MIN_SIZE -#if !defined(__cplusplus) && !defined(inline) -#ifdef __GNUC__ -#define inline __inline -#endif /* __GNUC__ */ -#endif -#endif /* XML_MIN_SIZE */ - -#ifdef __cplusplus -#define inline inline -#else -#ifndef inline -#define inline -#endif -#endif diff --git a/3rdparty/expat-2.0.1/lib/latin1tab.h b/3rdparty/expat-2.0.1/lib/latin1tab.h deleted file mode 100644 index 53c25d76b2..0000000000 --- a/3rdparty/expat-2.0.1/lib/latin1tab.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, -/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME, -/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, -/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, -/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, -/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, -/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, -/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, diff --git a/3rdparty/expat-2.0.1/lib/libexpat.def b/3rdparty/expat-2.0.1/lib/libexpat.def deleted file mode 100644 index 3920bbcf90..0000000000 --- a/3rdparty/expat-2.0.1/lib/libexpat.def +++ /dev/null @@ -1,73 +0,0 @@ -; DEF file for MS VC++ - -LIBRARY -EXPORTS - XML_DefaultCurrent @1 - XML_ErrorString @2 - XML_ExpatVersion @3 - XML_ExpatVersionInfo @4 - XML_ExternalEntityParserCreate @5 - XML_GetBase @6 - XML_GetBuffer @7 - XML_GetCurrentByteCount @8 - XML_GetCurrentByteIndex @9 - XML_GetCurrentColumnNumber @10 - XML_GetCurrentLineNumber @11 - XML_GetErrorCode @12 - XML_GetIdAttributeIndex @13 - XML_GetInputContext @14 - XML_GetSpecifiedAttributeCount @15 - XML_Parse @16 - XML_ParseBuffer @17 - XML_ParserCreate @18 - XML_ParserCreateNS @19 - XML_ParserCreate_MM @20 - XML_ParserFree @21 - XML_SetAttlistDeclHandler @22 - XML_SetBase @23 - XML_SetCdataSectionHandler @24 - XML_SetCharacterDataHandler @25 - XML_SetCommentHandler @26 - XML_SetDefaultHandler @27 - XML_SetDefaultHandlerExpand @28 - XML_SetDoctypeDeclHandler @29 - XML_SetElementDeclHandler @30 - XML_SetElementHandler @31 - XML_SetEncoding @32 - XML_SetEndCdataSectionHandler @33 - XML_SetEndDoctypeDeclHandler @34 - XML_SetEndElementHandler @35 - XML_SetEndNamespaceDeclHandler @36 - XML_SetEntityDeclHandler @37 - XML_SetExternalEntityRefHandler @38 - XML_SetExternalEntityRefHandlerArg @39 - XML_SetNamespaceDeclHandler @40 - XML_SetNotStandaloneHandler @41 - XML_SetNotationDeclHandler @42 - XML_SetParamEntityParsing @43 - XML_SetProcessingInstructionHandler @44 - XML_SetReturnNSTriplet @45 - XML_SetStartCdataSectionHandler @46 - XML_SetStartDoctypeDeclHandler @47 - XML_SetStartElementHandler @48 - XML_SetStartNamespaceDeclHandler @49 - XML_SetUnknownEncodingHandler @50 - XML_SetUnparsedEntityDeclHandler @51 - XML_SetUserData @52 - XML_SetXmlDeclHandler @53 - XML_UseParserAsHandlerArg @54 -; added with version 1.95.3 - XML_ParserReset @55 - XML_SetSkippedEntityHandler @56 -; added with version 1.95.5 - XML_GetFeatureList @57 - XML_UseForeignDTD @58 -; added with version 1.95.6 - XML_FreeContentModel @59 - XML_MemMalloc @60 - XML_MemRealloc @61 - XML_MemFree @62 -; added with version 1.95.8 - XML_StopParser @63 - XML_ResumeParser @64 - XML_GetParsingStatus @65 diff --git a/3rdparty/expat-2.0.1/lib/libexpatw.def b/3rdparty/expat-2.0.1/lib/libexpatw.def deleted file mode 100644 index 3920bbcf90..0000000000 --- a/3rdparty/expat-2.0.1/lib/libexpatw.def +++ /dev/null @@ -1,73 +0,0 @@ -; DEF file for MS VC++ - -LIBRARY -EXPORTS - XML_DefaultCurrent @1 - XML_ErrorString @2 - XML_ExpatVersion @3 - XML_ExpatVersionInfo @4 - XML_ExternalEntityParserCreate @5 - XML_GetBase @6 - XML_GetBuffer @7 - XML_GetCurrentByteCount @8 - XML_GetCurrentByteIndex @9 - XML_GetCurrentColumnNumber @10 - XML_GetCurrentLineNumber @11 - XML_GetErrorCode @12 - XML_GetIdAttributeIndex @13 - XML_GetInputContext @14 - XML_GetSpecifiedAttributeCount @15 - XML_Parse @16 - XML_ParseBuffer @17 - XML_ParserCreate @18 - XML_ParserCreateNS @19 - XML_ParserCreate_MM @20 - XML_ParserFree @21 - XML_SetAttlistDeclHandler @22 - XML_SetBase @23 - XML_SetCdataSectionHandler @24 - XML_SetCharacterDataHandler @25 - XML_SetCommentHandler @26 - XML_SetDefaultHandler @27 - XML_SetDefaultHandlerExpand @28 - XML_SetDoctypeDeclHandler @29 - XML_SetElementDeclHandler @30 - XML_SetElementHandler @31 - XML_SetEncoding @32 - XML_SetEndCdataSectionHandler @33 - XML_SetEndDoctypeDeclHandler @34 - XML_SetEndElementHandler @35 - XML_SetEndNamespaceDeclHandler @36 - XML_SetEntityDeclHandler @37 - XML_SetExternalEntityRefHandler @38 - XML_SetExternalEntityRefHandlerArg @39 - XML_SetNamespaceDeclHandler @40 - XML_SetNotStandaloneHandler @41 - XML_SetNotationDeclHandler @42 - XML_SetParamEntityParsing @43 - XML_SetProcessingInstructionHandler @44 - XML_SetReturnNSTriplet @45 - XML_SetStartCdataSectionHandler @46 - XML_SetStartDoctypeDeclHandler @47 - XML_SetStartElementHandler @48 - XML_SetStartNamespaceDeclHandler @49 - XML_SetUnknownEncodingHandler @50 - XML_SetUnparsedEntityDeclHandler @51 - XML_SetUserData @52 - XML_SetXmlDeclHandler @53 - XML_UseParserAsHandlerArg @54 -; added with version 1.95.3 - XML_ParserReset @55 - XML_SetSkippedEntityHandler @56 -; added with version 1.95.5 - XML_GetFeatureList @57 - XML_UseForeignDTD @58 -; added with version 1.95.6 - XML_FreeContentModel @59 - XML_MemMalloc @60 - XML_MemRealloc @61 - XML_MemFree @62 -; added with version 1.95.8 - XML_StopParser @63 - XML_ResumeParser @64 - XML_GetParsingStatus @65 diff --git a/3rdparty/expat-2.0.1/lib/macconfig.h b/3rdparty/expat-2.0.1/lib/macconfig.h deleted file mode 100644 index 2725caaf54..0000000000 --- a/3rdparty/expat-2.0.1/lib/macconfig.h +++ /dev/null @@ -1,53 +0,0 @@ -/*================================================================ -** Copyright 2000, Clark Cooper -** All rights reserved. -** -** This is free software. You are permitted to copy, distribute, or modify -** it under the terms of the MIT/X license (contained in the COPYING file -** with this distribution.) -** -*/ - -#ifndef MACCONFIG_H -#define MACCONFIG_H - - -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#define BYTEORDER 4321 - -/* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* whether byteorder is bigendian */ -#define WORDS_BIGENDIAN - -/* Define to specify how much context to retain around the current parse - point. */ -#undef XML_CONTEXT_BYTES - -/* Define to make parameter entity parsing functionality available. */ -#define XML_DTD - -/* Define to make XML Namespaces functionality available. */ -#define XML_NS - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long' if does not define. */ -#define off_t long - -/* Define to `unsigned' if does not define. */ -#undef size_t - - -#endif /* ifndef MACCONFIG_H */ diff --git a/3rdparty/expat-2.0.1/lib/nametab.h b/3rdparty/expat-2.0.1/lib/nametab.h deleted file mode 100644 index b05e62c77a..0000000000 --- a/3rdparty/expat-2.0.1/lib/nametab.h +++ /dev/null @@ -1,150 +0,0 @@ -static const unsigned namingBitmap[] = { -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, -0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE, -0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF, -0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF, -0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF, -0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD, -0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, -0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, -0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE, -0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF, -0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000, -0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060, -0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003, -0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003, -0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000, -0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001, -0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003, -0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000, -0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003, -0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003, -0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000, -0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000, -0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF, -0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB, -0x40000000, 0xF580C900, 0x00000007, 0x02010800, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, -0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF, -0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF, -0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF, -0x00000000, 0x00004C40, 0x00000000, 0x00000000, -0x00000007, 0x00000000, 0x00000000, 0x00000000, -0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF, -0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF, -0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, -0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000, -0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, -0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000, -0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE, -0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF, -0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF, -0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000, -0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003, -0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD, -0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF, -0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF, -0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE, -0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF, -0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF, -0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF, -0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF, -0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF, -0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0, -0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1, -0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3, -0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80, -0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3, -0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3, -0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000, -0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000, -0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF, -0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x1FFF0000, 0x00000002, -0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF, -0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF, -}; -static const unsigned char nmstrtPages[] = { -0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, -0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, -0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, -0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -static const unsigned char namePages[] = { -0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00, -0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, -0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13, -0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/3rdparty/expat-2.0.1/lib/utf8tab.h b/3rdparty/expat-2.0.1/lib/utf8tab.h deleted file mode 100644 index 7bb3e77603..0000000000 --- a/3rdparty/expat-2.0.1/lib/utf8tab.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - - -/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, -/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, -/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, -/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, -/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, -/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, -/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4, -/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, -/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM, diff --git a/3rdparty/expat-2.0.1/lib/winconfig.h b/3rdparty/expat-2.0.1/lib/winconfig.h deleted file mode 100644 index c1b791d62d..0000000000 --- a/3rdparty/expat-2.0.1/lib/winconfig.h +++ /dev/null @@ -1,30 +0,0 @@ -/*================================================================ -** Copyright 2000, Clark Cooper -** All rights reserved. -** -** This is free software. You are permitted to copy, distribute, or modify -** it under the terms of the MIT/X license (contained in the COPYING file -** with this distribution.) -*/ - -#ifndef WINCONFIG_H -#define WINCONFIG_H - -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN - -#include -#include - -#define XML_NS 1 -#define XML_DTD 1 -#define XML_CONTEXT_BYTES 1024 - -/* we will assume all Windows platforms are little endian */ -#define BYTEORDER 1234 - -/* Windows has memmove() available. */ -#define HAVE_MEMMOVE - -#endif /* ndef WINCONFIG_H */ diff --git a/3rdparty/expat-2.0.1/lib/xmlparse.c b/3rdparty/expat-2.0.1/lib/xmlparse.c deleted file mode 100644 index 94e31de9da..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmlparse.c +++ /dev/null @@ -1,6287 +0,0 @@ -/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include -#include /* memset(), memcpy() */ -#include - -#define XML_BUILDING_EXPAT 1 - -#ifdef COMPILED_FROM_DSP -#include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos4__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" -#elif defined(HAVE_EXPAT_CONFIG_H) -#include -#endif /* ndef COMPILED_FROM_DSP */ - -#include "ascii.h" -#include "expat.h" - -#ifdef XML_UNICODE -#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX -#define XmlConvert XmlUtf16Convert -#define XmlGetInternalEncoding XmlGetUtf16InternalEncoding -#define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS -#define XmlEncode XmlUtf16Encode -/* Using pointer subtraction to convert to integer type. */ -#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) -typedef unsigned short ICHAR; -#else -#define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX -#define XmlConvert XmlUtf8Convert -#define XmlGetInternalEncoding XmlGetUtf8InternalEncoding -#define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS -#define XmlEncode XmlUtf8Encode -#define MUST_CONVERT(enc, s) (!(enc)->isUtf8) -typedef char ICHAR; -#endif - - -#ifndef XML_NS - -#define XmlInitEncodingNS XmlInitEncoding -#define XmlInitUnknownEncodingNS XmlInitUnknownEncoding -#undef XmlGetInternalEncodingNS -#define XmlGetInternalEncodingNS XmlGetInternalEncoding -#define XmlParseXmlDeclNS XmlParseXmlDecl - -#endif - -#ifdef XML_UNICODE - -#ifdef XML_UNICODE_WCHAR_T -#define XML_T(x) (const wchar_t)x -#define XML_L(x) L ## x -#else -#define XML_T(x) (const unsigned short)x -#define XML_L(x) x -#endif - -#else - -#define XML_T(x) x -#define XML_L(x) x - -#endif - -/* Round up n to be a multiple of sz, where sz is a power of 2. */ -#define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) - -/* Handle the case where memmove() doesn't exist. */ -#ifndef HAVE_MEMMOVE -#ifdef HAVE_BCOPY -#define memmove(d,s,l) bcopy((s),(d),(l)) -#else -#error memmove does not exist on this platform, nor is a substitute available -#endif /* HAVE_BCOPY */ -#endif /* HAVE_MEMMOVE */ - -#include "internal.h" -#include "xmltok.h" -#include "xmlrole.h" - -typedef const XML_Char *KEY; - -typedef struct { - KEY name; -} NAMED; - -typedef struct { - NAMED **v; - unsigned char power; - size_t size; - size_t used; - const XML_Memory_Handling_Suite *mem; -} HASH_TABLE; - -/* Basic character hash algorithm, taken from Python's string hash: - h = h * 1000003 ^ character, the constant being a prime number. - -*/ -#ifdef XML_UNICODE -#define CHAR_HASH(h, c) \ - (((h) * 0xF4243) ^ (unsigned short)(c)) -#else -#define CHAR_HASH(h, c) \ - (((h) * 0xF4243) ^ (unsigned char)(c)) -#endif - -/* For probing (after a collision) we need a step size relative prime - to the hash table size, which is a power of 2. We use double-hashing, - since we can calculate a second hash value cheaply by taking those bits - of the first hash value that were discarded (masked out) when the table - index was calculated: index = hash & mask, where mask = table->size - 1. - We limit the maximum step size to table->size / 4 (mask >> 2) and make - it odd, since odd numbers are always relative prime to a power of 2. -*/ -#define SECOND_HASH(hash, mask, power) \ - ((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2)) -#define PROBE_STEP(hash, mask, power) \ - ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1)) - -typedef struct { - NAMED **p; - NAMED **end; -} HASH_TABLE_ITER; - -#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */ -#define INIT_DATA_BUF_SIZE 1024 -#define INIT_ATTS_SIZE 16 -#define INIT_ATTS_VERSION 0xFFFFFFFF -#define INIT_BLOCK_SIZE 1024 -#define INIT_BUFFER_SIZE 1024 - -#define EXPAND_SPARE 24 - -typedef struct binding { - struct prefix *prefix; - struct binding *nextTagBinding; - struct binding *prevPrefixBinding; - const struct attribute_id *attId; - XML_Char *uri; - int uriLen; - int uriAlloc; -} BINDING; - -typedef struct prefix { - const XML_Char *name; - BINDING *binding; -} PREFIX; - -typedef struct { - const XML_Char *str; - const XML_Char *localPart; - const XML_Char *prefix; - int strLen; - int uriLen; - int prefixLen; -} TAG_NAME; - -/* TAG represents an open element. - The name of the element is stored in both the document and API - encodings. The memory buffer 'buf' is a separately-allocated - memory area which stores the name. During the XML_Parse()/ - XMLParseBuffer() when the element is open, the memory for the 'raw' - version of the name (in the document encoding) is shared with the - document buffer. If the element is open across calls to - XML_Parse()/XML_ParseBuffer(), the buffer is re-allocated to - contain the 'raw' name as well. - - A parser re-uses these structures, maintaining a list of allocated - TAG objects in a free list. -*/ -typedef struct tag { - struct tag *parent; /* parent of this element */ - const char *rawName; /* tagName in the original encoding */ - int rawNameLength; - TAG_NAME name; /* tagName in the API encoding */ - char *buf; /* buffer for name components */ - char *bufEnd; /* end of the buffer */ - BINDING *bindings; -} TAG; - -typedef struct { - const XML_Char *name; - const XML_Char *textPtr; - int textLen; /* length in XML_Chars */ - int processed; /* # of processed bytes - when suspended */ - const XML_Char *systemId; - const XML_Char *base; - const XML_Char *publicId; - const XML_Char *notation; - XML_Bool open; - XML_Bool is_param; - XML_Bool is_internal; /* true if declared in internal subset outside PE */ -} ENTITY; - -typedef struct { - enum XML_Content_Type type; - enum XML_Content_Quant quant; - const XML_Char * name; - int firstchild; - int lastchild; - int childcnt; - int nextsib; -} CONTENT_SCAFFOLD; - -#define INIT_SCAFFOLD_ELEMENTS 32 - -typedef struct block { - struct block *next; - int size; - XML_Char s[1]; -} BLOCK; - -typedef struct { - BLOCK *blocks; - BLOCK *freeBlocks; - const XML_Char *end; - XML_Char *ptr; - XML_Char *start; - const XML_Memory_Handling_Suite *mem; -} STRING_POOL; - -/* The XML_Char before the name is used to determine whether - an attribute has been specified. */ -typedef struct attribute_id { - XML_Char *name; - PREFIX *prefix; - XML_Bool maybeTokenized; - XML_Bool xmlns; -} ATTRIBUTE_ID; - -typedef struct { - const ATTRIBUTE_ID *id; - XML_Bool isCdata; - const XML_Char *value; -} DEFAULT_ATTRIBUTE; - -typedef struct { - unsigned long version; - unsigned long hash; - const XML_Char *uriName; -} NS_ATT; - -typedef struct { - const XML_Char *name; - PREFIX *prefix; - const ATTRIBUTE_ID *idAtt; - int nDefaultAtts; - int allocDefaultAtts; - DEFAULT_ATTRIBUTE *defaultAtts; -} ELEMENT_TYPE; - -typedef struct { - HASH_TABLE generalEntities; - HASH_TABLE elementTypes; - HASH_TABLE attributeIds; - HASH_TABLE prefixes; - STRING_POOL pool; - STRING_POOL entityValuePool; - /* false once a parameter entity reference has been skipped */ - XML_Bool keepProcessing; - /* true once an internal or external PE reference has been encountered; - this includes the reference to an external subset */ - XML_Bool hasParamEntityRefs; - XML_Bool standalone; -#ifdef XML_DTD - /* indicates if external PE has been read */ - XML_Bool paramEntityRead; - HASH_TABLE paramEntities; -#endif /* XML_DTD */ - PREFIX defaultPrefix; - /* === scaffolding for building content model === */ - XML_Bool in_eldecl; - CONTENT_SCAFFOLD *scaffold; - unsigned contentStringLen; - unsigned scaffSize; - unsigned scaffCount; - int scaffLevel; - int *scaffIndex; -} DTD; - -typedef struct open_internal_entity { - const char *internalEventPtr; - const char *internalEventEndPtr; - struct open_internal_entity *next; - ENTITY *entity; - int startTagLevel; - XML_Bool betweenDecl; /* WFC: PE Between Declarations */ -} OPEN_INTERNAL_ENTITY; - -typedef enum XML_Error PTRCALL Processor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr); - -static Processor prologProcessor; -static Processor prologInitProcessor; -static Processor contentProcessor; -static Processor cdataSectionProcessor; -#ifdef XML_DTD -static Processor ignoreSectionProcessor; -static Processor externalParEntProcessor; -static Processor externalParEntInitProcessor; -static Processor entityValueProcessor; -static Processor entityValueInitProcessor; -#endif /* XML_DTD */ -static Processor epilogProcessor; -static Processor errorProcessor; -static Processor externalEntityInitProcessor; -static Processor externalEntityInitProcessor2; -static Processor externalEntityInitProcessor3; -static Processor externalEntityContentProcessor; -static Processor internalEntityProcessor; - -static enum XML_Error -handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName); -static enum XML_Error -processXmlDecl(XML_Parser parser, int isGeneralTextEntity, - const char *s, const char *next); -static enum XML_Error -initializeEncoding(XML_Parser parser); -static enum XML_Error -doProlog(XML_Parser parser, const ENCODING *enc, const char *s, - const char *end, int tok, const char *next, const char **nextPtr, - XML_Bool haveMore); -static enum XML_Error -processInternalEntity(XML_Parser parser, ENTITY *entity, - XML_Bool betweenDecl); -static enum XML_Error -doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc, - const char *start, const char *end, const char **endPtr, - XML_Bool haveMore); -static enum XML_Error -doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr, - const char *end, const char **nextPtr, XML_Bool haveMore); -#ifdef XML_DTD -static enum XML_Error -doIgnoreSection(XML_Parser parser, const ENCODING *, const char **startPtr, - const char *end, const char **nextPtr, XML_Bool haveMore); -#endif /* XML_DTD */ - -static enum XML_Error -storeAtts(XML_Parser parser, const ENCODING *, const char *s, - TAG_NAME *tagNamePtr, BINDING **bindingsPtr); -static enum XML_Error -addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, - const XML_Char *uri, BINDING **bindingsPtr); -static int -defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, - XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser); -static enum XML_Error -storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata, - const char *, const char *, STRING_POOL *); -static enum XML_Error -appendAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata, - const char *, const char *, STRING_POOL *); -static ATTRIBUTE_ID * -getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start, - const char *end); -static int -setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *); -static enum XML_Error -storeEntityValue(XML_Parser parser, const ENCODING *enc, const char *start, - const char *end); -static int -reportProcessingInstruction(XML_Parser parser, const ENCODING *enc, - const char *start, const char *end); -static int -reportComment(XML_Parser parser, const ENCODING *enc, const char *start, - const char *end); -static void -reportDefault(XML_Parser parser, const ENCODING *enc, const char *start, - const char *end); - -static const XML_Char * getContext(XML_Parser parser); -static XML_Bool -setContext(XML_Parser parser, const XML_Char *context); - -static void FASTCALL normalizePublicId(XML_Char *s); - -static DTD * dtdCreate(const XML_Memory_Handling_Suite *ms); -/* do not call if parentParser != NULL */ -static void dtdReset(DTD *p, const XML_Memory_Handling_Suite *ms); -static void -dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms); -static int -dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms); -static int -copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *); - -static NAMED * -lookup(HASH_TABLE *table, KEY name, size_t createSize); -static void FASTCALL -hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms); -static void FASTCALL hashTableClear(HASH_TABLE *); -static void FASTCALL hashTableDestroy(HASH_TABLE *); -static void FASTCALL -hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *); -static NAMED * FASTCALL hashTableIterNext(HASH_TABLE_ITER *); - -static void FASTCALL -poolInit(STRING_POOL *, const XML_Memory_Handling_Suite *ms); -static void FASTCALL poolClear(STRING_POOL *); -static void FASTCALL poolDestroy(STRING_POOL *); -static XML_Char * -poolAppend(STRING_POOL *pool, const ENCODING *enc, - const char *ptr, const char *end); -static XML_Char * -poolStoreString(STRING_POOL *pool, const ENCODING *enc, - const char *ptr, const char *end); -static XML_Bool FASTCALL poolGrow(STRING_POOL *pool); -static const XML_Char * FASTCALL -poolCopyString(STRING_POOL *pool, const XML_Char *s); -static const XML_Char * -poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n); -static const XML_Char * FASTCALL -poolAppendString(STRING_POOL *pool, const XML_Char *s); - -static int FASTCALL nextScaffoldPart(XML_Parser parser); -static XML_Content * build_model(XML_Parser parser); -static ELEMENT_TYPE * -getElementType(XML_Parser parser, const ENCODING *enc, - const char *ptr, const char *end); - -static XML_Parser -parserCreate(const XML_Char *encodingName, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *nameSep, - DTD *dtd); -static void -parserInit(XML_Parser parser, const XML_Char *encodingName); - -#define poolStart(pool) ((pool)->start) -#define poolEnd(pool) ((pool)->ptr) -#define poolLength(pool) ((pool)->ptr - (pool)->start) -#define poolChop(pool) ((void)--(pool->ptr)) -#define poolLastChar(pool) (((pool)->ptr)[-1]) -#define poolDiscard(pool) ((pool)->ptr = (pool)->start) -#define poolFinish(pool) ((pool)->start = (pool)->ptr) -#define poolAppendChar(pool, c) \ - (((pool)->ptr == (pool)->end && !poolGrow(pool)) \ - ? 0 \ - : ((*((pool)->ptr)++ = c), 1)) - -struct XML_ParserStruct { - /* The first member must be userData so that the XML_GetUserData - macro works. */ - void *m_userData; - void *m_handlerArg; - char *m_buffer; - const XML_Memory_Handling_Suite m_mem; - /* first character to be parsed */ - const char *m_bufferPtr; - /* past last character to be parsed */ - char *m_bufferEnd; - /* allocated end of buffer */ - const char *m_bufferLim; - XML_Index m_parseEndByteIndex; - const char *m_parseEndPtr; - XML_Char *m_dataBuf; - XML_Char *m_dataBufEnd; - XML_StartElementHandler m_startElementHandler; - XML_EndElementHandler m_endElementHandler; - XML_CharacterDataHandler m_characterDataHandler; - XML_ProcessingInstructionHandler m_processingInstructionHandler; - XML_CommentHandler m_commentHandler; - XML_StartCdataSectionHandler m_startCdataSectionHandler; - XML_EndCdataSectionHandler m_endCdataSectionHandler; - XML_DefaultHandler m_defaultHandler; - XML_StartDoctypeDeclHandler m_startDoctypeDeclHandler; - XML_EndDoctypeDeclHandler m_endDoctypeDeclHandler; - XML_UnparsedEntityDeclHandler m_unparsedEntityDeclHandler; - XML_NotationDeclHandler m_notationDeclHandler; - XML_StartNamespaceDeclHandler m_startNamespaceDeclHandler; - XML_EndNamespaceDeclHandler m_endNamespaceDeclHandler; - XML_NotStandaloneHandler m_notStandaloneHandler; - XML_ExternalEntityRefHandler m_externalEntityRefHandler; - XML_Parser m_externalEntityRefHandlerArg; - XML_SkippedEntityHandler m_skippedEntityHandler; - XML_UnknownEncodingHandler m_unknownEncodingHandler; - XML_ElementDeclHandler m_elementDeclHandler; - XML_AttlistDeclHandler m_attlistDeclHandler; - XML_EntityDeclHandler m_entityDeclHandler; - XML_XmlDeclHandler m_xmlDeclHandler; - const ENCODING *m_encoding; - INIT_ENCODING m_initEncoding; - const ENCODING *m_internalEncoding; - const XML_Char *m_protocolEncodingName; - XML_Bool m_ns; - XML_Bool m_ns_triplets; - void *m_unknownEncodingMem; - void *m_unknownEncodingData; - void *m_unknownEncodingHandlerData; - void (XMLCALL *m_unknownEncodingRelease)(void *); - PROLOG_STATE m_prologState; - Processor *m_processor; - enum XML_Error m_errorCode; - const char *m_eventPtr; - const char *m_eventEndPtr; - const char *m_positionPtr; - OPEN_INTERNAL_ENTITY *m_openInternalEntities; - OPEN_INTERNAL_ENTITY *m_freeInternalEntities; - XML_Bool m_defaultExpandInternalEntities; - int m_tagLevel; - ENTITY *m_declEntity; - const XML_Char *m_doctypeName; - const XML_Char *m_doctypeSysid; - const XML_Char *m_doctypePubid; - const XML_Char *m_declAttributeType; - const XML_Char *m_declNotationName; - const XML_Char *m_declNotationPublicId; - ELEMENT_TYPE *m_declElementType; - ATTRIBUTE_ID *m_declAttributeId; - XML_Bool m_declAttributeIsCdata; - XML_Bool m_declAttributeIsId; - DTD *m_dtd; - const XML_Char *m_curBase; - TAG *m_tagStack; - TAG *m_freeTagList; - BINDING *m_inheritedBindings; - BINDING *m_freeBindingList; - int m_attsSize; - int m_nSpecifiedAtts; - int m_idAttIndex; - ATTRIBUTE *m_atts; - NS_ATT *m_nsAtts; - unsigned long m_nsAttsVersion; - unsigned char m_nsAttsPower; - POSITION m_position; - STRING_POOL m_tempPool; - STRING_POOL m_temp2Pool; - char *m_groupConnector; - unsigned int m_groupSize; - XML_Char m_namespaceSeparator; - XML_Parser m_parentParser; - XML_ParsingStatus m_parsingStatus; -#ifdef XML_DTD - XML_Bool m_isParamEntity; - XML_Bool m_useForeignDTD; - enum XML_ParamEntityParsing m_paramEntityParsing; -#endif -}; - -#define MALLOC(s) (parser->m_mem.malloc_fcn((s))) -#define REALLOC(p,s) (parser->m_mem.realloc_fcn((p),(s))) -#define FREE(p) (parser->m_mem.free_fcn((p))) - -#define userData (parser->m_userData) -#define handlerArg (parser->m_handlerArg) -#define startElementHandler (parser->m_startElementHandler) -#define endElementHandler (parser->m_endElementHandler) -#define characterDataHandler (parser->m_characterDataHandler) -#define processingInstructionHandler \ - (parser->m_processingInstructionHandler) -#define commentHandler (parser->m_commentHandler) -#define startCdataSectionHandler \ - (parser->m_startCdataSectionHandler) -#define endCdataSectionHandler (parser->m_endCdataSectionHandler) -#define defaultHandler (parser->m_defaultHandler) -#define startDoctypeDeclHandler (parser->m_startDoctypeDeclHandler) -#define endDoctypeDeclHandler (parser->m_endDoctypeDeclHandler) -#define unparsedEntityDeclHandler \ - (parser->m_unparsedEntityDeclHandler) -#define notationDeclHandler (parser->m_notationDeclHandler) -#define startNamespaceDeclHandler \ - (parser->m_startNamespaceDeclHandler) -#define endNamespaceDeclHandler (parser->m_endNamespaceDeclHandler) -#define notStandaloneHandler (parser->m_notStandaloneHandler) -#define externalEntityRefHandler \ - (parser->m_externalEntityRefHandler) -#define externalEntityRefHandlerArg \ - (parser->m_externalEntityRefHandlerArg) -#define internalEntityRefHandler \ - (parser->m_internalEntityRefHandler) -#define skippedEntityHandler (parser->m_skippedEntityHandler) -#define unknownEncodingHandler (parser->m_unknownEncodingHandler) -#define elementDeclHandler (parser->m_elementDeclHandler) -#define attlistDeclHandler (parser->m_attlistDeclHandler) -#define entityDeclHandler (parser->m_entityDeclHandler) -#define xmlDeclHandler (parser->m_xmlDeclHandler) -#define encoding (parser->m_encoding) -#define initEncoding (parser->m_initEncoding) -#define internalEncoding (parser->m_internalEncoding) -#define unknownEncodingMem (parser->m_unknownEncodingMem) -#define unknownEncodingData (parser->m_unknownEncodingData) -#define unknownEncodingHandlerData \ - (parser->m_unknownEncodingHandlerData) -#define unknownEncodingRelease (parser->m_unknownEncodingRelease) -#define protocolEncodingName (parser->m_protocolEncodingName) -#define ns (parser->m_ns) -#define ns_triplets (parser->m_ns_triplets) -#define prologState (parser->m_prologState) -#define processor (parser->m_processor) -#define errorCode (parser->m_errorCode) -#define eventPtr (parser->m_eventPtr) -#define eventEndPtr (parser->m_eventEndPtr) -#define positionPtr (parser->m_positionPtr) -#define position (parser->m_position) -#define openInternalEntities (parser->m_openInternalEntities) -#define freeInternalEntities (parser->m_freeInternalEntities) -#define defaultExpandInternalEntities \ - (parser->m_defaultExpandInternalEntities) -#define tagLevel (parser->m_tagLevel) -#define buffer (parser->m_buffer) -#define bufferPtr (parser->m_bufferPtr) -#define bufferEnd (parser->m_bufferEnd) -#define parseEndByteIndex (parser->m_parseEndByteIndex) -#define parseEndPtr (parser->m_parseEndPtr) -#define bufferLim (parser->m_bufferLim) -#define dataBuf (parser->m_dataBuf) -#define dataBufEnd (parser->m_dataBufEnd) -#define _dtd (parser->m_dtd) -#define curBase (parser->m_curBase) -#define declEntity (parser->m_declEntity) -#define doctypeName (parser->m_doctypeName) -#define doctypeSysid (parser->m_doctypeSysid) -#define doctypePubid (parser->m_doctypePubid) -#define declAttributeType (parser->m_declAttributeType) -#define declNotationName (parser->m_declNotationName) -#define declNotationPublicId (parser->m_declNotationPublicId) -#define declElementType (parser->m_declElementType) -#define declAttributeId (parser->m_declAttributeId) -#define declAttributeIsCdata (parser->m_declAttributeIsCdata) -#define declAttributeIsId (parser->m_declAttributeIsId) -#define freeTagList (parser->m_freeTagList) -#define freeBindingList (parser->m_freeBindingList) -#define inheritedBindings (parser->m_inheritedBindings) -#define tagStack (parser->m_tagStack) -#define atts (parser->m_atts) -#define attsSize (parser->m_attsSize) -#define nSpecifiedAtts (parser->m_nSpecifiedAtts) -#define idAttIndex (parser->m_idAttIndex) -#define nsAtts (parser->m_nsAtts) -#define nsAttsVersion (parser->m_nsAttsVersion) -#define nsAttsPower (parser->m_nsAttsPower) -#define tempPool (parser->m_tempPool) -#define temp2Pool (parser->m_temp2Pool) -#define groupConnector (parser->m_groupConnector) -#define groupSize (parser->m_groupSize) -#define namespaceSeparator (parser->m_namespaceSeparator) -#define parentParser (parser->m_parentParser) -#define ps_parsing (parser->m_parsingStatus.parsing) -#define ps_finalBuffer (parser->m_parsingStatus.finalBuffer) -#ifdef XML_DTD -#define isParamEntity (parser->m_isParamEntity) -#define useForeignDTD (parser->m_useForeignDTD) -#define paramEntityParsing (parser->m_paramEntityParsing) -#endif /* XML_DTD */ - -XML_Parser XMLCALL -XML_ParserCreate(const XML_Char *encodingName) -{ - return XML_ParserCreate_MM(encodingName, NULL, NULL); -} - -XML_Parser XMLCALL -XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) -{ - XML_Char tmp[2]; - *tmp = nsSep; - return XML_ParserCreate_MM(encodingName, NULL, tmp); -} - -static const XML_Char implicitContext[] = { - ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p, - ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, - ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, - ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9, - ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e, - ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' -}; - -XML_Parser XMLCALL -XML_ParserCreate_MM(const XML_Char *encodingName, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *nameSep) -{ - XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL); - if (parser != NULL && ns) { - /* implicit context only set for root parser, since child - parsers (i.e. external entity parsers) will inherit it - */ - if (!setContext(parser, implicitContext)) { - XML_ParserFree(parser); - return NULL; - } - } - return parser; -} - -static XML_Parser -parserCreate(const XML_Char *encodingName, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *nameSep, - DTD *dtd) -{ - XML_Parser parser; - - if (memsuite) { - XML_Memory_Handling_Suite *mtemp; - parser = (XML_Parser) - memsuite->malloc_fcn(sizeof(struct XML_ParserStruct)); - if (parser != NULL) { - mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem); - mtemp->malloc_fcn = memsuite->malloc_fcn; - mtemp->realloc_fcn = memsuite->realloc_fcn; - mtemp->free_fcn = memsuite->free_fcn; - } - } - else { - XML_Memory_Handling_Suite *mtemp; - parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct)); - if (parser != NULL) { - mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem); - mtemp->malloc_fcn = malloc; - mtemp->realloc_fcn = realloc; - mtemp->free_fcn = free; - } - } - - if (!parser) - return parser; - - buffer = NULL; - bufferLim = NULL; - - attsSize = INIT_ATTS_SIZE; - atts = (ATTRIBUTE *)MALLOC(attsSize * sizeof(ATTRIBUTE)); - if (atts == NULL) { - FREE(parser); - return NULL; - } - dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char)); - if (dataBuf == NULL) { - FREE(atts); - FREE(parser); - return NULL; - } - dataBufEnd = dataBuf + INIT_DATA_BUF_SIZE; - - if (dtd) - _dtd = dtd; - else { - _dtd = dtdCreate(&parser->m_mem); - if (_dtd == NULL) { - FREE(dataBuf); - FREE(atts); - FREE(parser); - return NULL; - } - } - - freeBindingList = NULL; - freeTagList = NULL; - freeInternalEntities = NULL; - - groupSize = 0; - groupConnector = NULL; - - unknownEncodingHandler = NULL; - unknownEncodingHandlerData = NULL; - - namespaceSeparator = ASCII_EXCL; - ns = XML_FALSE; - ns_triplets = XML_FALSE; - - nsAtts = NULL; - nsAttsVersion = 0; - nsAttsPower = 0; - - poolInit(&tempPool, &(parser->m_mem)); - poolInit(&temp2Pool, &(parser->m_mem)); - parserInit(parser, encodingName); - - if (encodingName && !protocolEncodingName) { - XML_ParserFree(parser); - return NULL; - } - - if (nameSep) { - ns = XML_TRUE; - internalEncoding = XmlGetInternalEncodingNS(); - namespaceSeparator = *nameSep; - } - else { - internalEncoding = XmlGetInternalEncoding(); - } - - return parser; -} - -static void -parserInit(XML_Parser parser, const XML_Char *encodingName) -{ - processor = prologInitProcessor; - XmlPrologStateInit(&prologState); - protocolEncodingName = (encodingName != NULL - ? poolCopyString(&tempPool, encodingName) - : NULL); - curBase = NULL; - XmlInitEncoding(&initEncoding, &encoding, 0); - userData = NULL; - handlerArg = NULL; - startElementHandler = NULL; - endElementHandler = NULL; - characterDataHandler = NULL; - processingInstructionHandler = NULL; - commentHandler = NULL; - startCdataSectionHandler = NULL; - endCdataSectionHandler = NULL; - defaultHandler = NULL; - startDoctypeDeclHandler = NULL; - endDoctypeDeclHandler = NULL; - unparsedEntityDeclHandler = NULL; - notationDeclHandler = NULL; - startNamespaceDeclHandler = NULL; - endNamespaceDeclHandler = NULL; - notStandaloneHandler = NULL; - externalEntityRefHandler = NULL; - externalEntityRefHandlerArg = parser; - skippedEntityHandler = NULL; - elementDeclHandler = NULL; - attlistDeclHandler = NULL; - entityDeclHandler = NULL; - xmlDeclHandler = NULL; - bufferPtr = buffer; - bufferEnd = buffer; - parseEndByteIndex = 0; - parseEndPtr = NULL; - declElementType = NULL; - declAttributeId = NULL; - declEntity = NULL; - doctypeName = NULL; - doctypeSysid = NULL; - doctypePubid = NULL; - declAttributeType = NULL; - declNotationName = NULL; - declNotationPublicId = NULL; - declAttributeIsCdata = XML_FALSE; - declAttributeIsId = XML_FALSE; - memset(&position, 0, sizeof(POSITION)); - errorCode = XML_ERROR_NONE; - eventPtr = NULL; - eventEndPtr = NULL; - positionPtr = NULL; - openInternalEntities = NULL; - defaultExpandInternalEntities = XML_TRUE; - tagLevel = 0; - tagStack = NULL; - inheritedBindings = NULL; - nSpecifiedAtts = 0; - unknownEncodingMem = NULL; - unknownEncodingRelease = NULL; - unknownEncodingData = NULL; - parentParser = NULL; - ps_parsing = XML_INITIALIZED; -#ifdef XML_DTD - isParamEntity = XML_FALSE; - useForeignDTD = XML_FALSE; - paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; -#endif -} - -/* moves list of bindings to freeBindingList */ -static void FASTCALL -moveToFreeBindingList(XML_Parser parser, BINDING *bindings) -{ - while (bindings) { - BINDING *b = bindings; - bindings = bindings->nextTagBinding; - b->nextTagBinding = freeBindingList; - freeBindingList = b; - } -} - -XML_Bool XMLCALL -XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) -{ - TAG *tStk; - OPEN_INTERNAL_ENTITY *openEntityList; - if (parentParser) - return XML_FALSE; - /* move tagStack to freeTagList */ - tStk = tagStack; - while (tStk) { - TAG *tag = tStk; - tStk = tStk->parent; - tag->parent = freeTagList; - moveToFreeBindingList(parser, tag->bindings); - tag->bindings = NULL; - freeTagList = tag; - } - /* move openInternalEntities to freeInternalEntities */ - openEntityList = openInternalEntities; - while (openEntityList) { - OPEN_INTERNAL_ENTITY *openEntity = openEntityList; - openEntityList = openEntity->next; - openEntity->next = freeInternalEntities; - freeInternalEntities = openEntity; - } - moveToFreeBindingList(parser, inheritedBindings); - FREE(unknownEncodingMem); - if (unknownEncodingRelease) - unknownEncodingRelease(unknownEncodingData); - poolClear(&tempPool); - poolClear(&temp2Pool); - parserInit(parser, encodingName); - dtdReset(_dtd, &parser->m_mem); - return setContext(parser, implicitContext); -} - -enum XML_Status XMLCALL -XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) -{ - /* Block after XML_Parse()/XML_ParseBuffer() has been called. - XXX There's no way for the caller to determine which of the - XXX possible error cases caused the XML_STATUS_ERROR return. - */ - if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) - return XML_STATUS_ERROR; - if (encodingName == NULL) - protocolEncodingName = NULL; - else { - protocolEncodingName = poolCopyString(&tempPool, encodingName); - if (!protocolEncodingName) - return XML_STATUS_ERROR; - } - return XML_STATUS_OK; -} - -XML_Parser XMLCALL -XML_ExternalEntityParserCreate(XML_Parser oldParser, - const XML_Char *context, - const XML_Char *encodingName) -{ - XML_Parser parser = oldParser; - DTD *newDtd = NULL; - DTD *oldDtd = _dtd; - XML_StartElementHandler oldStartElementHandler = startElementHandler; - XML_EndElementHandler oldEndElementHandler = endElementHandler; - XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler; - XML_ProcessingInstructionHandler oldProcessingInstructionHandler - = processingInstructionHandler; - XML_CommentHandler oldCommentHandler = commentHandler; - XML_StartCdataSectionHandler oldStartCdataSectionHandler - = startCdataSectionHandler; - XML_EndCdataSectionHandler oldEndCdataSectionHandler - = endCdataSectionHandler; - XML_DefaultHandler oldDefaultHandler = defaultHandler; - XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler - = unparsedEntityDeclHandler; - XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler; - XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler - = startNamespaceDeclHandler; - XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler - = endNamespaceDeclHandler; - XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler; - XML_ExternalEntityRefHandler oldExternalEntityRefHandler - = externalEntityRefHandler; - XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler; - XML_UnknownEncodingHandler oldUnknownEncodingHandler - = unknownEncodingHandler; - XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler; - XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler; - XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler; - XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler; - ELEMENT_TYPE * oldDeclElementType = declElementType; - - void *oldUserData = userData; - void *oldHandlerArg = handlerArg; - XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities; - XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg; -#ifdef XML_DTD - enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing; - int oldInEntityValue = prologState.inEntityValue; -#endif - XML_Bool oldns_triplets = ns_triplets; - -#ifdef XML_DTD - if (!context) - newDtd = oldDtd; -#endif /* XML_DTD */ - - /* Note that the magical uses of the pre-processor to make field - access look more like C++ require that `parser' be overwritten - here. This makes this function more painful to follow than it - would be otherwise. - */ - if (ns) { - XML_Char tmp[2]; - *tmp = namespaceSeparator; - parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd); - } - else { - parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd); - } - - if (!parser) - return NULL; - - startElementHandler = oldStartElementHandler; - endElementHandler = oldEndElementHandler; - characterDataHandler = oldCharacterDataHandler; - processingInstructionHandler = oldProcessingInstructionHandler; - commentHandler = oldCommentHandler; - startCdataSectionHandler = oldStartCdataSectionHandler; - endCdataSectionHandler = oldEndCdataSectionHandler; - defaultHandler = oldDefaultHandler; - unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler; - notationDeclHandler = oldNotationDeclHandler; - startNamespaceDeclHandler = oldStartNamespaceDeclHandler; - endNamespaceDeclHandler = oldEndNamespaceDeclHandler; - notStandaloneHandler = oldNotStandaloneHandler; - externalEntityRefHandler = oldExternalEntityRefHandler; - skippedEntityHandler = oldSkippedEntityHandler; - unknownEncodingHandler = oldUnknownEncodingHandler; - elementDeclHandler = oldElementDeclHandler; - attlistDeclHandler = oldAttlistDeclHandler; - entityDeclHandler = oldEntityDeclHandler; - xmlDeclHandler = oldXmlDeclHandler; - declElementType = oldDeclElementType; - userData = oldUserData; - if (oldUserData == oldHandlerArg) - handlerArg = userData; - else - handlerArg = parser; - if (oldExternalEntityRefHandlerArg != oldParser) - externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg; - defaultExpandInternalEntities = oldDefaultExpandInternalEntities; - ns_triplets = oldns_triplets; - parentParser = oldParser; -#ifdef XML_DTD - paramEntityParsing = oldParamEntityParsing; - prologState.inEntityValue = oldInEntityValue; - if (context) { -#endif /* XML_DTD */ - if (!dtdCopy(_dtd, oldDtd, &parser->m_mem) - || !setContext(parser, context)) { - XML_ParserFree(parser); - return NULL; - } - processor = externalEntityInitProcessor; -#ifdef XML_DTD - } - else { - /* The DTD instance referenced by _dtd is shared between the document's - root parser and external PE parsers, therefore one does not need to - call setContext. In addition, one also *must* not call setContext, - because this would overwrite existing prefix->binding pointers in - _dtd with ones that get destroyed with the external PE parser. - This would leave those prefixes with dangling pointers. - */ - isParamEntity = XML_TRUE; - XmlPrologStateInitExternalEntity(&prologState); - processor = externalParEntInitProcessor; - } -#endif /* XML_DTD */ - return parser; -} - -static void FASTCALL -destroyBindings(BINDING *bindings, XML_Parser parser) -{ - for (;;) { - BINDING *b = bindings; - if (!b) - break; - bindings = b->nextTagBinding; - FREE(b->uri); - FREE(b); - } -} - -void XMLCALL -XML_ParserFree(XML_Parser parser) -{ - TAG *tagList; - OPEN_INTERNAL_ENTITY *entityList; - if (parser == NULL) - return; - /* free tagStack and freeTagList */ - tagList = tagStack; - for (;;) { - TAG *p; - if (tagList == NULL) { - if (freeTagList == NULL) - break; - tagList = freeTagList; - freeTagList = NULL; - } - p = tagList; - tagList = tagList->parent; - FREE(p->buf); - destroyBindings(p->bindings, parser); - FREE(p); - } - /* free openInternalEntities and freeInternalEntities */ - entityList = openInternalEntities; - for (;;) { - OPEN_INTERNAL_ENTITY *openEntity; - if (entityList == NULL) { - if (freeInternalEntities == NULL) - break; - entityList = freeInternalEntities; - freeInternalEntities = NULL; - } - openEntity = entityList; - entityList = entityList->next; - FREE(openEntity); - } - - destroyBindings(freeBindingList, parser); - destroyBindings(inheritedBindings, parser); - poolDestroy(&tempPool); - poolDestroy(&temp2Pool); -#ifdef XML_DTD - /* external parameter entity parsers share the DTD structure - parser->m_dtd with the root parser, so we must not destroy it - */ - if (!isParamEntity && _dtd) -#else - if (_dtd) -#endif /* XML_DTD */ - dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem); - FREE((void *)atts); - FREE(groupConnector); - FREE(buffer); - FREE(dataBuf); - FREE(nsAtts); - FREE(unknownEncodingMem); - if (unknownEncodingRelease) - unknownEncodingRelease(unknownEncodingData); - FREE(parser); -} - -void XMLCALL -XML_UseParserAsHandlerArg(XML_Parser parser) -{ - handlerArg = parser; -} - -enum XML_Error XMLCALL -XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) -{ -#ifdef XML_DTD - /* block after XML_Parse()/XML_ParseBuffer() has been called */ - if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) - return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING; - useForeignDTD = useDTD; - return XML_ERROR_NONE; -#else - return XML_ERROR_FEATURE_REQUIRES_XML_DTD; -#endif -} - -void XMLCALL -XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) -{ - /* block after XML_Parse()/XML_ParseBuffer() has been called */ - if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) - return; - ns_triplets = do_nst ? XML_TRUE : XML_FALSE; -} - -void XMLCALL -XML_SetUserData(XML_Parser parser, void *p) -{ - if (handlerArg == userData) - handlerArg = userData = p; - else - userData = p; -} - -enum XML_Status XMLCALL -XML_SetBase(XML_Parser parser, const XML_Char *p) -{ - if (p) { - p = poolCopyString(&_dtd->pool, p); - if (!p) - return XML_STATUS_ERROR; - curBase = p; - } - else - curBase = NULL; - return XML_STATUS_OK; -} - -const XML_Char * XMLCALL -XML_GetBase(XML_Parser parser) -{ - return curBase; -} - -int XMLCALL -XML_GetSpecifiedAttributeCount(XML_Parser parser) -{ - return nSpecifiedAtts; -} - -int XMLCALL -XML_GetIdAttributeIndex(XML_Parser parser) -{ - return idAttIndex; -} - -void XMLCALL -XML_SetElementHandler(XML_Parser parser, - XML_StartElementHandler start, - XML_EndElementHandler end) -{ - startElementHandler = start; - endElementHandler = end; -} - -void XMLCALL -XML_SetStartElementHandler(XML_Parser parser, - XML_StartElementHandler start) { - startElementHandler = start; -} - -void XMLCALL -XML_SetEndElementHandler(XML_Parser parser, - XML_EndElementHandler end) { - endElementHandler = end; -} - -void XMLCALL -XML_SetCharacterDataHandler(XML_Parser parser, - XML_CharacterDataHandler handler) -{ - characterDataHandler = handler; -} - -void XMLCALL -XML_SetProcessingInstructionHandler(XML_Parser parser, - XML_ProcessingInstructionHandler handler) -{ - processingInstructionHandler = handler; -} - -void XMLCALL -XML_SetCommentHandler(XML_Parser parser, - XML_CommentHandler handler) -{ - commentHandler = handler; -} - -void XMLCALL -XML_SetCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start, - XML_EndCdataSectionHandler end) -{ - startCdataSectionHandler = start; - endCdataSectionHandler = end; -} - -void XMLCALL -XML_SetStartCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start) { - startCdataSectionHandler = start; -} - -void XMLCALL -XML_SetEndCdataSectionHandler(XML_Parser parser, - XML_EndCdataSectionHandler end) { - endCdataSectionHandler = end; -} - -void XMLCALL -XML_SetDefaultHandler(XML_Parser parser, - XML_DefaultHandler handler) -{ - defaultHandler = handler; - defaultExpandInternalEntities = XML_FALSE; -} - -void XMLCALL -XML_SetDefaultHandlerExpand(XML_Parser parser, - XML_DefaultHandler handler) -{ - defaultHandler = handler; - defaultExpandInternalEntities = XML_TRUE; -} - -void XMLCALL -XML_SetDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start, - XML_EndDoctypeDeclHandler end) -{ - startDoctypeDeclHandler = start; - endDoctypeDeclHandler = end; -} - -void XMLCALL -XML_SetStartDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start) { - startDoctypeDeclHandler = start; -} - -void XMLCALL -XML_SetEndDoctypeDeclHandler(XML_Parser parser, - XML_EndDoctypeDeclHandler end) { - endDoctypeDeclHandler = end; -} - -void XMLCALL -XML_SetUnparsedEntityDeclHandler(XML_Parser parser, - XML_UnparsedEntityDeclHandler handler) -{ - unparsedEntityDeclHandler = handler; -} - -void XMLCALL -XML_SetNotationDeclHandler(XML_Parser parser, - XML_NotationDeclHandler handler) -{ - notationDeclHandler = handler; -} - -void XMLCALL -XML_SetNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start, - XML_EndNamespaceDeclHandler end) -{ - startNamespaceDeclHandler = start; - endNamespaceDeclHandler = end; -} - -void XMLCALL -XML_SetStartNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start) { - startNamespaceDeclHandler = start; -} - -void XMLCALL -XML_SetEndNamespaceDeclHandler(XML_Parser parser, - XML_EndNamespaceDeclHandler end) { - endNamespaceDeclHandler = end; -} - -void XMLCALL -XML_SetNotStandaloneHandler(XML_Parser parser, - XML_NotStandaloneHandler handler) -{ - notStandaloneHandler = handler; -} - -void XMLCALL -XML_SetExternalEntityRefHandler(XML_Parser parser, - XML_ExternalEntityRefHandler handler) -{ - externalEntityRefHandler = handler; -} - -void XMLCALL -XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg) -{ - if (arg) - externalEntityRefHandlerArg = (XML_Parser)arg; - else - externalEntityRefHandlerArg = parser; -} - -void XMLCALL -XML_SetSkippedEntityHandler(XML_Parser parser, - XML_SkippedEntityHandler handler) -{ - skippedEntityHandler = handler; -} - -void XMLCALL -XML_SetUnknownEncodingHandler(XML_Parser parser, - XML_UnknownEncodingHandler handler, - void *data) -{ - unknownEncodingHandler = handler; - unknownEncodingHandlerData = data; -} - -void XMLCALL -XML_SetElementDeclHandler(XML_Parser parser, - XML_ElementDeclHandler eldecl) -{ - elementDeclHandler = eldecl; -} - -void XMLCALL -XML_SetAttlistDeclHandler(XML_Parser parser, - XML_AttlistDeclHandler attdecl) -{ - attlistDeclHandler = attdecl; -} - -void XMLCALL -XML_SetEntityDeclHandler(XML_Parser parser, - XML_EntityDeclHandler handler) -{ - entityDeclHandler = handler; -} - -void XMLCALL -XML_SetXmlDeclHandler(XML_Parser parser, - XML_XmlDeclHandler handler) { - xmlDeclHandler = handler; -} - -int XMLCALL -XML_SetParamEntityParsing(XML_Parser parser, - enum XML_ParamEntityParsing peParsing) -{ - /* block after XML_Parse()/XML_ParseBuffer() has been called */ - if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) - return 0; -#ifdef XML_DTD - paramEntityParsing = peParsing; - return 1; -#else - return peParsing == XML_PARAM_ENTITY_PARSING_NEVER; -#endif -} - -enum XML_Status XMLCALL -XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) -{ - switch (ps_parsing) { - case XML_SUSPENDED: - errorCode = XML_ERROR_SUSPENDED; - return XML_STATUS_ERROR; - case XML_FINISHED: - errorCode = XML_ERROR_FINISHED; - return XML_STATUS_ERROR; - default: - ps_parsing = XML_PARSING; - } - - if (len == 0) { - ps_finalBuffer = (XML_Bool)isFinal; - if (!isFinal) - return XML_STATUS_OK; - positionPtr = bufferPtr; - parseEndPtr = bufferEnd; - - /* If data are left over from last buffer, and we now know that these - data are the final chunk of input, then we have to check them again - to detect errors based on that fact. - */ - errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr); - - if (errorCode == XML_ERROR_NONE) { - switch (ps_parsing) { - case XML_SUSPENDED: - XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); - positionPtr = bufferPtr; - return XML_STATUS_SUSPENDED; - case XML_INITIALIZED: - case XML_PARSING: - ps_parsing = XML_FINISHED; - /* fall through */ - default: - return XML_STATUS_OK; - } - } - eventEndPtr = eventPtr; - processor = errorProcessor; - return XML_STATUS_ERROR; - } -#ifndef XML_CONTEXT_BYTES - else if (bufferPtr == bufferEnd) { - const char *end; - int nLeftOver; - enum XML_Error result; - parseEndByteIndex += len; - positionPtr = s; - ps_finalBuffer = (XML_Bool)isFinal; - - errorCode = processor(parser, s, parseEndPtr = s + len, &end); - - if (errorCode != XML_ERROR_NONE) { - eventEndPtr = eventPtr; - processor = errorProcessor; - return XML_STATUS_ERROR; - } - else { - switch (ps_parsing) { - case XML_SUSPENDED: - result = XML_STATUS_SUSPENDED; - break; - case XML_INITIALIZED: - case XML_PARSING: - result = XML_STATUS_OK; - if (isFinal) { - ps_parsing = XML_FINISHED; - return result; - } - } - } - - XmlUpdatePosition(encoding, positionPtr, end, &position); - nLeftOver = s + len - end; - if (nLeftOver) { - if (buffer == NULL || nLeftOver > bufferLim - buffer) { - /* FIXME avoid integer overflow */ - char *temp; - temp = (buffer == NULL - ? (char *)MALLOC(len * 2) - : (char *)REALLOC(buffer, len * 2)); - if (temp == NULL) { - errorCode = XML_ERROR_NO_MEMORY; - return XML_STATUS_ERROR; - } - buffer = temp; - if (!buffer) { - errorCode = XML_ERROR_NO_MEMORY; - eventPtr = eventEndPtr = NULL; - processor = errorProcessor; - return XML_STATUS_ERROR; - } - bufferLim = buffer + len * 2; - } - memcpy(buffer, end, nLeftOver); - } - bufferPtr = buffer; - bufferEnd = buffer + nLeftOver; - positionPtr = bufferPtr; - parseEndPtr = bufferEnd; - eventPtr = bufferPtr; - eventEndPtr = bufferPtr; - return result; - } -#endif /* not defined XML_CONTEXT_BYTES */ - else { - void *buff = XML_GetBuffer(parser, len); - if (buff == NULL) - return XML_STATUS_ERROR; - else { - memcpy(buff, s, len); - return XML_ParseBuffer(parser, len, isFinal); - } - } -} - -enum XML_Status XMLCALL -XML_ParseBuffer(XML_Parser parser, int len, int isFinal) -{ - const char *start; - enum XML_Status result = XML_STATUS_OK; - - switch (ps_parsing) { - case XML_SUSPENDED: - errorCode = XML_ERROR_SUSPENDED; - return XML_STATUS_ERROR; - case XML_FINISHED: - errorCode = XML_ERROR_FINISHED; - return XML_STATUS_ERROR; - default: - ps_parsing = XML_PARSING; - } - - start = bufferPtr; - positionPtr = start; - bufferEnd += len; - parseEndPtr = bufferEnd; - parseEndByteIndex += len; - ps_finalBuffer = (XML_Bool)isFinal; - - errorCode = processor(parser, start, parseEndPtr, &bufferPtr); - - if (errorCode != XML_ERROR_NONE) { - eventEndPtr = eventPtr; - processor = errorProcessor; - return XML_STATUS_ERROR; - } - else { - switch (ps_parsing) { - case XML_SUSPENDED: - result = XML_STATUS_SUSPENDED; - break; - case XML_INITIALIZED: - case XML_PARSING: - if (isFinal) { - ps_parsing = XML_FINISHED; - return result; - } - default: ; /* should not happen */ - } - } - - XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); - positionPtr = bufferPtr; - return result; -} - -void * XMLCALL -XML_GetBuffer(XML_Parser parser, int len) -{ - switch (ps_parsing) { - case XML_SUSPENDED: - errorCode = XML_ERROR_SUSPENDED; - return NULL; - case XML_FINISHED: - errorCode = XML_ERROR_FINISHED; - return NULL; - default: ; - } - - if (len > bufferLim - bufferEnd) { - /* FIXME avoid integer overflow */ - int neededSize = len + (int)(bufferEnd - bufferPtr); -#ifdef XML_CONTEXT_BYTES - int keep = (int)(bufferPtr - buffer); - - if (keep > XML_CONTEXT_BYTES) - keep = XML_CONTEXT_BYTES; - neededSize += keep; -#endif /* defined XML_CONTEXT_BYTES */ - if (neededSize <= bufferLim - buffer) { -#ifdef XML_CONTEXT_BYTES - if (keep < bufferPtr - buffer) { - int offset = (int)(bufferPtr - buffer) - keep; - memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep); - bufferEnd -= offset; - bufferPtr -= offset; - } -#else - memmove(buffer, bufferPtr, bufferEnd - bufferPtr); - bufferEnd = buffer + (bufferEnd - bufferPtr); - bufferPtr = buffer; -#endif /* not defined XML_CONTEXT_BYTES */ - } - else { - char *newBuf; - int bufferSize = (int)(bufferLim - bufferPtr); - if (bufferSize == 0) - bufferSize = INIT_BUFFER_SIZE; - do { - bufferSize *= 2; - } while (bufferSize < neededSize); - newBuf = (char *)MALLOC(bufferSize); - if (newBuf == 0) { - errorCode = XML_ERROR_NO_MEMORY; - return NULL; - } - bufferLim = newBuf + bufferSize; -#ifdef XML_CONTEXT_BYTES - if (bufferPtr) { - int keep = (int)(bufferPtr - buffer); - if (keep > XML_CONTEXT_BYTES) - keep = XML_CONTEXT_BYTES; - memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep); - FREE(buffer); - buffer = newBuf; - bufferEnd = buffer + (bufferEnd - bufferPtr) + keep; - bufferPtr = buffer + keep; - } - else { - bufferEnd = newBuf + (bufferEnd - bufferPtr); - bufferPtr = buffer = newBuf; - } -#else - if (bufferPtr) { - memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr); - FREE(buffer); - } - bufferEnd = newBuf + (bufferEnd - bufferPtr); - bufferPtr = buffer = newBuf; -#endif /* not defined XML_CONTEXT_BYTES */ - } - } - return bufferEnd; -} - -enum XML_Status XMLCALL -XML_StopParser(XML_Parser parser, XML_Bool resumable) -{ - switch (ps_parsing) { - case XML_SUSPENDED: - if (resumable) { - errorCode = XML_ERROR_SUSPENDED; - return XML_STATUS_ERROR; - } - ps_parsing = XML_FINISHED; - break; - case XML_FINISHED: - errorCode = XML_ERROR_FINISHED; - return XML_STATUS_ERROR; - default: - if (resumable) { -#ifdef XML_DTD - if (isParamEntity) { - errorCode = XML_ERROR_SUSPEND_PE; - return XML_STATUS_ERROR; - } -#endif - ps_parsing = XML_SUSPENDED; - } - else - ps_parsing = XML_FINISHED; - } - return XML_STATUS_OK; -} - -enum XML_Status XMLCALL -XML_ResumeParser(XML_Parser parser) -{ - enum XML_Status result = XML_STATUS_OK; - - if (ps_parsing != XML_SUSPENDED) { - errorCode = XML_ERROR_NOT_SUSPENDED; - return XML_STATUS_ERROR; - } - ps_parsing = XML_PARSING; - - errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr); - - if (errorCode != XML_ERROR_NONE) { - eventEndPtr = eventPtr; - processor = errorProcessor; - return XML_STATUS_ERROR; - } - else { - switch (ps_parsing) { - case XML_SUSPENDED: - result = XML_STATUS_SUSPENDED; - break; - case XML_INITIALIZED: - case XML_PARSING: - if (ps_finalBuffer) { - ps_parsing = XML_FINISHED; - return result; - } - default: ; - } - } - - XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); - positionPtr = bufferPtr; - return result; -} - -void XMLCALL -XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status) -{ - assert(status != NULL); - *status = parser->m_parsingStatus; -} - -enum XML_Error XMLCALL -XML_GetErrorCode(XML_Parser parser) -{ - return errorCode; -} - -XML_Index XMLCALL -XML_GetCurrentByteIndex(XML_Parser parser) -{ - if (eventPtr) - return parseEndByteIndex - (parseEndPtr - eventPtr); - return -1; -} - -int XMLCALL -XML_GetCurrentByteCount(XML_Parser parser) -{ - if (eventEndPtr && eventPtr) - return (int)(eventEndPtr - eventPtr); - return 0; -} - -const char * XMLCALL -XML_GetInputContext(XML_Parser parser, int *offset, int *size) -{ -#ifdef XML_CONTEXT_BYTES - if (eventPtr && buffer) { - *offset = (int)(eventPtr - buffer); - *size = (int)(bufferEnd - buffer); - return buffer; - } -#endif /* defined XML_CONTEXT_BYTES */ - return (char *) 0; -} - -XML_Size XMLCALL -XML_GetCurrentLineNumber(XML_Parser parser) -{ - if (eventPtr && eventPtr >= positionPtr) { - XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); - positionPtr = eventPtr; - } - return position.lineNumber + 1; -} - -XML_Size XMLCALL -XML_GetCurrentColumnNumber(XML_Parser parser) -{ - if (eventPtr && eventPtr >= positionPtr) { - XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); - positionPtr = eventPtr; - } - return position.columnNumber; -} - -void XMLCALL -XML_FreeContentModel(XML_Parser parser, XML_Content *model) -{ - FREE(model); -} - -void * XMLCALL -XML_MemMalloc(XML_Parser parser, size_t size) -{ - return MALLOC(size); -} - -void * XMLCALL -XML_MemRealloc(XML_Parser parser, void *ptr, size_t size) -{ - return REALLOC(ptr, size); -} - -void XMLCALL -XML_MemFree(XML_Parser parser, void *ptr) -{ - FREE(ptr); -} - -void XMLCALL -XML_DefaultCurrent(XML_Parser parser) -{ - if (defaultHandler) { - if (openInternalEntities) - reportDefault(parser, - internalEncoding, - openInternalEntities->internalEventPtr, - openInternalEntities->internalEventEndPtr); - else - reportDefault(parser, encoding, eventPtr, eventEndPtr); - } -} - -const XML_LChar * XMLCALL -XML_ErrorString(enum XML_Error code) -{ - static const XML_LChar* const message[] = { - 0, - XML_L("out of memory"), - XML_L("syntax error"), - XML_L("no element found"), - XML_L("not well-formed (invalid token)"), - XML_L("unclosed token"), - XML_L("partial character"), - XML_L("mismatched tag"), - XML_L("duplicate attribute"), - XML_L("junk after document element"), - XML_L("illegal parameter entity reference"), - XML_L("undefined entity"), - XML_L("recursive entity reference"), - XML_L("asynchronous entity"), - XML_L("reference to invalid character number"), - XML_L("reference to binary entity"), - XML_L("reference to external entity in attribute"), - XML_L("XML or text declaration not at start of entity"), - XML_L("unknown encoding"), - XML_L("encoding specified in XML declaration is incorrect"), - XML_L("unclosed CDATA section"), - XML_L("error in processing external entity reference"), - XML_L("document is not standalone"), - XML_L("unexpected parser state - please send a bug report"), - XML_L("entity declared in parameter entity"), - XML_L("requested feature requires XML_DTD support in Expat"), - XML_L("cannot change setting once parsing has begun"), - XML_L("unbound prefix"), - XML_L("must not undeclare prefix"), - XML_L("incomplete markup in parameter entity"), - XML_L("XML declaration not well-formed"), - XML_L("text declaration not well-formed"), - XML_L("illegal character(s) in public id"), - XML_L("parser suspended"), - XML_L("parser not suspended"), - XML_L("parsing aborted"), - XML_L("parsing finished"), - XML_L("cannot suspend in external parameter entity"), - XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"), - XML_L("reserved prefix (xmlns) must not be declared or undeclared"), - XML_L("prefix must not be bound to one of the reserved namespace names") - }; - if (code > 0 && code < sizeof(message)/sizeof(message[0])) - return message[code]; - return NULL; -} - -const XML_LChar * XMLCALL -XML_ExpatVersion(void) { - - /* V1 is used to string-ize the version number. However, it would - string-ize the actual version macro *names* unless we get them - substituted before being passed to V1. CPP is defined to expand - a macro, then rescan for more expansions. Thus, we use V2 to expand - the version macros, then CPP will expand the resulting V1() macro - with the correct numerals. */ - /* ### I'm assuming cpp is portable in this respect... */ - -#define V1(a,b,c) XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c) -#define V2(a,b,c) XML_L("expat_")V1(a,b,c) - - return V2(XML_MAJOR_VERSION, XML_MINOR_VERSION, XML_MICRO_VERSION); - -#undef V1 -#undef V2 -} - -XML_Expat_Version XMLCALL -XML_ExpatVersionInfo(void) -{ - XML_Expat_Version version; - - version.major = XML_MAJOR_VERSION; - version.minor = XML_MINOR_VERSION; - version.micro = XML_MICRO_VERSION; - - return version; -} - -const XML_Feature * XMLCALL -XML_GetFeatureList(void) -{ - static const XML_Feature features[] = { - {XML_FEATURE_SIZEOF_XML_CHAR, XML_L("sizeof(XML_Char)"), - sizeof(XML_Char)}, - {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"), - sizeof(XML_LChar)}, -#ifdef XML_UNICODE - {XML_FEATURE_UNICODE, XML_L("XML_UNICODE"), 0}, -#endif -#ifdef XML_UNICODE_WCHAR_T - {XML_FEATURE_UNICODE_WCHAR_T, XML_L("XML_UNICODE_WCHAR_T"), 0}, -#endif -#ifdef XML_DTD - {XML_FEATURE_DTD, XML_L("XML_DTD"), 0}, -#endif -#ifdef XML_CONTEXT_BYTES - {XML_FEATURE_CONTEXT_BYTES, XML_L("XML_CONTEXT_BYTES"), - XML_CONTEXT_BYTES}, -#endif -#ifdef XML_MIN_SIZE - {XML_FEATURE_MIN_SIZE, XML_L("XML_MIN_SIZE"), 0}, -#endif -#ifdef XML_NS - {XML_FEATURE_NS, XML_L("XML_NS"), 0}, -#endif -#ifdef XML_LARGE_SIZE - {XML_FEATURE_LARGE_SIZE, XML_L("XML_LARGE_SIZE"), 0}, -#endif - {XML_FEATURE_END, NULL, 0} - }; - - return features; -} - -/* Initially tag->rawName always points into the parse buffer; - for those TAG instances opened while the current parse buffer was - processed, and not yet closed, we need to store tag->rawName in a more - permanent location, since the parse buffer is about to be discarded. -*/ -static XML_Bool -storeRawNames(XML_Parser parser) -{ - TAG *tag = tagStack; - while (tag) { - int bufSize; - int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1); - char *rawNameBuf = tag->buf + nameLen; - /* Stop if already stored. Since tagStack is a stack, we can stop - at the first entry that has already been copied; everything - below it in the stack is already been accounted for in a - previous call to this function. - */ - if (tag->rawName == rawNameBuf) - break; - /* For re-use purposes we need to ensure that the - size of tag->buf is a multiple of sizeof(XML_Char). - */ - bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); - if (bufSize > tag->bufEnd - tag->buf) { - char *temp = (char *)REALLOC(tag->buf, bufSize); - if (temp == NULL) - return XML_FALSE; - /* if tag->name.str points to tag->buf (only when namespace - processing is off) then we have to update it - */ - if (tag->name.str == (XML_Char *)tag->buf) - tag->name.str = (XML_Char *)temp; - /* if tag->name.localPart is set (when namespace processing is on) - then update it as well, since it will always point into tag->buf - */ - if (tag->name.localPart) - tag->name.localPart = (XML_Char *)temp + (tag->name.localPart - - (XML_Char *)tag->buf); - tag->buf = temp; - tag->bufEnd = temp + bufSize; - rawNameBuf = temp + nameLen; - } - memcpy(rawNameBuf, tag->rawName, tag->rawNameLength); - tag->rawName = rawNameBuf; - tag = tag->parent; - } - return XML_TRUE; -} - -static enum XML_Error PTRCALL -contentProcessor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - enum XML_Error result = doContent(parser, 0, encoding, start, end, - endPtr, (XML_Bool)!ps_finalBuffer); - if (result == XML_ERROR_NONE) { - if (!storeRawNames(parser)) - return XML_ERROR_NO_MEMORY; - } - return result; -} - -static enum XML_Error PTRCALL -externalEntityInitProcessor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - enum XML_Error result = initializeEncoding(parser); - if (result != XML_ERROR_NONE) - return result; - processor = externalEntityInitProcessor2; - return externalEntityInitProcessor2(parser, start, end, endPtr); -} - -static enum XML_Error PTRCALL -externalEntityInitProcessor2(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - const char *next = start; /* XmlContentTok doesn't always set the last arg */ - int tok = XmlContentTok(encoding, start, end, &next); - switch (tok) { - case XML_TOK_BOM: - /* If we are at the end of the buffer, this would cause the next stage, - i.e. externalEntityInitProcessor3, to pass control directly to - doContent (by detecting XML_TOK_NONE) without processing any xml text - declaration - causing the error XML_ERROR_MISPLACED_XML_PI in doContent. - */ - if (next == end && !ps_finalBuffer) { - *endPtr = next; - return XML_ERROR_NONE; - } - start = next; - break; - case XML_TOK_PARTIAL: - if (!ps_finalBuffer) { - *endPtr = start; - return XML_ERROR_NONE; - } - eventPtr = start; - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (!ps_finalBuffer) { - *endPtr = start; - return XML_ERROR_NONE; - } - eventPtr = start; - return XML_ERROR_PARTIAL_CHAR; - } - processor = externalEntityInitProcessor3; - return externalEntityInitProcessor3(parser, start, end, endPtr); -} - -static enum XML_Error PTRCALL -externalEntityInitProcessor3(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - int tok; - const char *next = start; /* XmlContentTok doesn't always set the last arg */ - eventPtr = start; - tok = XmlContentTok(encoding, start, end, &next); - eventEndPtr = next; - - switch (tok) { - case XML_TOK_XML_DECL: - { - enum XML_Error result; - result = processXmlDecl(parser, 1, start, next); - if (result != XML_ERROR_NONE) - return result; - switch (ps_parsing) { - case XML_SUSPENDED: - *endPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: - start = next; - } - } - break; - case XML_TOK_PARTIAL: - if (!ps_finalBuffer) { - *endPtr = start; - return XML_ERROR_NONE; - } - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (!ps_finalBuffer) { - *endPtr = start; - return XML_ERROR_NONE; - } - return XML_ERROR_PARTIAL_CHAR; - } - processor = externalEntityContentProcessor; - tagLevel = 1; - return externalEntityContentProcessor(parser, start, end, endPtr); -} - -static enum XML_Error PTRCALL -externalEntityContentProcessor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - enum XML_Error result = doContent(parser, 1, encoding, start, end, - endPtr, (XML_Bool)!ps_finalBuffer); - if (result == XML_ERROR_NONE) { - if (!storeRawNames(parser)) - return XML_ERROR_NO_MEMORY; - } - return result; -} - -static enum XML_Error -doContent(XML_Parser parser, - int startTagLevel, - const ENCODING *enc, - const char *s, - const char *end, - const char **nextPtr, - XML_Bool haveMore) -{ - /* save one level of indirection */ - DTD * const dtd = _dtd; - - const char **eventPP; - const char **eventEndPP; - if (enc == encoding) { - eventPP = &eventPtr; - eventEndPP = &eventEndPtr; - } - else { - eventPP = &(openInternalEntities->internalEventPtr); - eventEndPP = &(openInternalEntities->internalEventEndPtr); - } - *eventPP = s; - - for (;;) { - const char *next = s; /* XmlContentTok doesn't always set the last arg */ - int tok = XmlContentTok(enc, s, end, &next); - *eventEndPP = next; - switch (tok) { - case XML_TOK_TRAILING_CR: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - *eventEndPP = end; - if (characterDataHandler) { - XML_Char c = 0xA; - characterDataHandler(handlerArg, &c, 1); - } - else if (defaultHandler) - reportDefault(parser, enc, s, end); - /* We are at the end of the final buffer, should we check for - XML_SUSPENDED, XML_FINISHED? - */ - if (startTagLevel == 0) - return XML_ERROR_NO_ELEMENTS; - if (tagLevel != startTagLevel) - return XML_ERROR_ASYNC_ENTITY; - *nextPtr = end; - return XML_ERROR_NONE; - case XML_TOK_NONE: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - if (startTagLevel > 0) { - if (tagLevel != startTagLevel) - return XML_ERROR_ASYNC_ENTITY; - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_NO_ELEMENTS; - case XML_TOK_INVALID: - *eventPP = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_ENTITY_REF: - { - const XML_Char *name; - ENTITY *entity; - XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (ch) { - if (characterDataHandler) - characterDataHandler(handlerArg, &ch, 1); - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - } - name = poolStoreString(&dtd->pool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!name) - return XML_ERROR_NO_MEMORY; - entity = (ENTITY *)lookup(&dtd->generalEntities, name, 0); - poolDiscard(&dtd->pool); - /* First, determine if a check for an existing declaration is needed; - if yes, check that the entity exists, and that it is internal, - otherwise call the skipped entity or default handler. - */ - if (!dtd->hasParamEntityRefs || dtd->standalone) { - if (!entity) - return XML_ERROR_UNDEFINED_ENTITY; - else if (!entity->is_internal) - return XML_ERROR_ENTITY_DECLARED_IN_PE; - } - else if (!entity) { - if (skippedEntityHandler) - skippedEntityHandler(handlerArg, name, 0); - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - } - if (entity->open) - return XML_ERROR_RECURSIVE_ENTITY_REF; - if (entity->notation) - return XML_ERROR_BINARY_ENTITY_REF; - if (entity->textPtr) { - enum XML_Error result; - if (!defaultExpandInternalEntities) { - if (skippedEntityHandler) - skippedEntityHandler(handlerArg, entity->name, 0); - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - } - result = processInternalEntity(parser, entity, XML_FALSE); - if (result != XML_ERROR_NONE) - return result; - } - else if (externalEntityRefHandler) { - const XML_Char *context; - entity->open = XML_TRUE; - context = getContext(parser); - entity->open = XML_FALSE; - if (!context) - return XML_ERROR_NO_MEMORY; - if (!externalEntityRefHandler(externalEntityRefHandlerArg, - context, - entity->base, - entity->systemId, - entity->publicId)) - return XML_ERROR_EXTERNAL_ENTITY_HANDLING; - poolDiscard(&tempPool); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - } - case XML_TOK_START_TAG_NO_ATTS: - /* fall through */ - case XML_TOK_START_TAG_WITH_ATTS: - { - TAG *tag; - enum XML_Error result; - XML_Char *toPtr; - if (freeTagList) { - tag = freeTagList; - freeTagList = freeTagList->parent; - } - else { - tag = (TAG *)MALLOC(sizeof(TAG)); - if (!tag) - return XML_ERROR_NO_MEMORY; - tag->buf = (char *)MALLOC(INIT_TAG_BUF_SIZE); - if (!tag->buf) { - FREE(tag); - return XML_ERROR_NO_MEMORY; - } - tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE; - } - tag->bindings = NULL; - tag->parent = tagStack; - tagStack = tag; - tag->name.localPart = NULL; - tag->name.prefix = NULL; - tag->rawName = s + enc->minBytesPerChar; - tag->rawNameLength = XmlNameLength(enc, tag->rawName); - ++tagLevel; - { - const char *rawNameEnd = tag->rawName + tag->rawNameLength; - const char *fromPtr = tag->rawName; - toPtr = (XML_Char *)tag->buf; - for (;;) { - int bufSize; - int convLen; - XmlConvert(enc, - &fromPtr, rawNameEnd, - (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1); - convLen = (int)(toPtr - (XML_Char *)tag->buf); - if (fromPtr == rawNameEnd) { - tag->name.strLen = convLen; - break; - } - bufSize = (int)(tag->bufEnd - tag->buf) << 1; - { - char *temp = (char *)REALLOC(tag->buf, bufSize); - if (temp == NULL) - return XML_ERROR_NO_MEMORY; - tag->buf = temp; - tag->bufEnd = temp + bufSize; - toPtr = (XML_Char *)temp + convLen; - } - } - } - tag->name.str = (XML_Char *)tag->buf; - *toPtr = XML_T('\0'); - result = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings)); - if (result) - return result; - if (startElementHandler) - startElementHandler(handlerArg, tag->name.str, - (const XML_Char **)atts); - else if (defaultHandler) - reportDefault(parser, enc, s, next); - poolClear(&tempPool); - break; - } - case XML_TOK_EMPTY_ELEMENT_NO_ATTS: - /* fall through */ - case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: - { - const char *rawName = s + enc->minBytesPerChar; - enum XML_Error result; - BINDING *bindings = NULL; - XML_Bool noElmHandlers = XML_TRUE; - TAG_NAME name; - name.str = poolStoreString(&tempPool, enc, rawName, - rawName + XmlNameLength(enc, rawName)); - if (!name.str) - return XML_ERROR_NO_MEMORY; - poolFinish(&tempPool); - result = storeAtts(parser, enc, s, &name, &bindings); - if (result) - return result; - poolFinish(&tempPool); - if (startElementHandler) { - startElementHandler(handlerArg, name.str, (const XML_Char **)atts); - noElmHandlers = XML_FALSE; - } - if (endElementHandler) { - if (startElementHandler) - *eventPP = *eventEndPP; - endElementHandler(handlerArg, name.str); - noElmHandlers = XML_FALSE; - } - if (noElmHandlers && defaultHandler) - reportDefault(parser, enc, s, next); - poolClear(&tempPool); - while (bindings) { - BINDING *b = bindings; - if (endNamespaceDeclHandler) - endNamespaceDeclHandler(handlerArg, b->prefix->name); - bindings = bindings->nextTagBinding; - b->nextTagBinding = freeBindingList; - freeBindingList = b; - b->prefix->binding = b->prevPrefixBinding; - } - } - if (tagLevel == 0) - return epilogProcessor(parser, next, end, nextPtr); - break; - case XML_TOK_END_TAG: - if (tagLevel == startTagLevel) - return XML_ERROR_ASYNC_ENTITY; - else { - int len; - const char *rawName; - TAG *tag = tagStack; - tagStack = tag->parent; - tag->parent = freeTagList; - freeTagList = tag; - rawName = s + enc->minBytesPerChar*2; - len = XmlNameLength(enc, rawName); - if (len != tag->rawNameLength - || memcmp(tag->rawName, rawName, len) != 0) { - *eventPP = rawName; - return XML_ERROR_TAG_MISMATCH; - } - --tagLevel; - if (endElementHandler) { - const XML_Char *localPart; - const XML_Char *prefix; - XML_Char *uri; - localPart = tag->name.localPart; - if (ns && localPart) { - /* localPart and prefix may have been overwritten in - tag->name.str, since this points to the binding->uri - buffer which gets re-used; so we have to add them again - */ - uri = (XML_Char *)tag->name.str + tag->name.uriLen; - /* don't need to check for space - already done in storeAtts() */ - while (*localPart) *uri++ = *localPart++; - prefix = (XML_Char *)tag->name.prefix; - if (ns_triplets && prefix) { - *uri++ = namespaceSeparator; - while (*prefix) *uri++ = *prefix++; - } - *uri = XML_T('\0'); - } - endElementHandler(handlerArg, tag->name.str); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - while (tag->bindings) { - BINDING *b = tag->bindings; - if (endNamespaceDeclHandler) - endNamespaceDeclHandler(handlerArg, b->prefix->name); - tag->bindings = tag->bindings->nextTagBinding; - b->nextTagBinding = freeBindingList; - freeBindingList = b; - b->prefix->binding = b->prevPrefixBinding; - } - if (tagLevel == 0) - return epilogProcessor(parser, next, end, nextPtr); - } - break; - case XML_TOK_CHAR_REF: - { - int n = XmlCharRefNumber(enc, s); - if (n < 0) - return XML_ERROR_BAD_CHAR_REF; - if (characterDataHandler) { - XML_Char buf[XML_ENCODE_MAX]; - characterDataHandler(handlerArg, buf, XmlEncode(n, (ICHAR *)buf)); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - } - break; - case XML_TOK_XML_DECL: - return XML_ERROR_MISPLACED_XML_PI; - case XML_TOK_DATA_NEWLINE: - if (characterDataHandler) { - XML_Char c = 0xA; - characterDataHandler(handlerArg, &c, 1); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - case XML_TOK_CDATA_SECT_OPEN: - { - enum XML_Error result; - if (startCdataSectionHandler) - startCdataSectionHandler(handlerArg); -#if 0 - /* Suppose you doing a transformation on a document that involves - changing only the character data. You set up a defaultHandler - and a characterDataHandler. The defaultHandler simply copies - characters through. The characterDataHandler does the - transformation and writes the characters out escaping them as - necessary. This case will fail to work if we leave out the - following two lines (because & and < inside CDATA sections will - be incorrectly escaped). - - However, now we have a start/endCdataSectionHandler, so it seems - easier to let the user deal with this. - */ - else if (characterDataHandler) - characterDataHandler(handlerArg, dataBuf, 0); -#endif - else if (defaultHandler) - reportDefault(parser, enc, s, next); - result = doCdataSection(parser, enc, &next, end, nextPtr, haveMore); - if (result != XML_ERROR_NONE) - return result; - else if (!next) { - processor = cdataSectionProcessor; - return result; - } - } - break; - case XML_TOK_TRAILING_RSQB: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - if (characterDataHandler) { - if (MUST_CONVERT(enc, s)) { - ICHAR *dataPtr = (ICHAR *)dataBuf; - XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); - characterDataHandler(handlerArg, dataBuf, - (int)(dataPtr - (ICHAR *)dataBuf)); - } - else - characterDataHandler(handlerArg, - (XML_Char *)s, - (int)((XML_Char *)end - (XML_Char *)s)); - } - else if (defaultHandler) - reportDefault(parser, enc, s, end); - /* We are at the end of the final buffer, should we check for - XML_SUSPENDED, XML_FINISHED? - */ - if (startTagLevel == 0) { - *eventPP = end; - return XML_ERROR_NO_ELEMENTS; - } - if (tagLevel != startTagLevel) { - *eventPP = end; - return XML_ERROR_ASYNC_ENTITY; - } - *nextPtr = end; - return XML_ERROR_NONE; - case XML_TOK_DATA_CHARS: - { - XML_CharacterDataHandler charDataHandler = characterDataHandler; - if (charDataHandler) { - if (MUST_CONVERT(enc, s)) { - for (;;) { - ICHAR *dataPtr = (ICHAR *)dataBuf; - XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); - *eventEndPP = s; - charDataHandler(handlerArg, dataBuf, - (int)(dataPtr - (ICHAR *)dataBuf)); - if (s == next) - break; - *eventPP = s; - } - } - else - charDataHandler(handlerArg, - (XML_Char *)s, - (int)((XML_Char *)next - (XML_Char *)s)); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - } - break; - case XML_TOK_PI: - if (!reportProcessingInstruction(parser, enc, s, next)) - return XML_ERROR_NO_MEMORY; - break; - case XML_TOK_COMMENT: - if (!reportComment(parser, enc, s, next)) - return XML_ERROR_NO_MEMORY; - break; - default: - if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - } - *eventPP = s = next; - switch (ps_parsing) { - case XML_SUSPENDED: - *nextPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: ; - } - } - /* not reached */ -} - -/* Precondition: all arguments must be non-NULL; - Purpose: - - normalize attributes - - check attributes for well-formedness - - generate namespace aware attribute names (URI, prefix) - - build list of attributes for startElementHandler - - default attributes - - process namespace declarations (check and report them) - - generate namespace aware element name (URI, prefix) -*/ -static enum XML_Error -storeAtts(XML_Parser parser, const ENCODING *enc, - const char *attStr, TAG_NAME *tagNamePtr, - BINDING **bindingsPtr) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - ELEMENT_TYPE *elementType; - int nDefaultAtts; - const XML_Char **appAtts; /* the attribute list for the application */ - int attIndex = 0; - int prefixLen; - int i; - int n; - XML_Char *uri; - int nPrefixes = 0; - BINDING *binding; - const XML_Char *localPart; - - /* lookup the element type name */ - elementType = (ELEMENT_TYPE *)lookup(&dtd->elementTypes, tagNamePtr->str,0); - if (!elementType) { - const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str); - if (!name) - return XML_ERROR_NO_MEMORY; - elementType = (ELEMENT_TYPE *)lookup(&dtd->elementTypes, name, - sizeof(ELEMENT_TYPE)); - if (!elementType) - return XML_ERROR_NO_MEMORY; - if (ns && !setElementTypePrefix(parser, elementType)) - return XML_ERROR_NO_MEMORY; - } - nDefaultAtts = elementType->nDefaultAtts; - - /* get the attributes from the tokenizer */ - n = XmlGetAttributes(enc, attStr, attsSize, atts); - if (n + nDefaultAtts > attsSize) { - int oldAttsSize = attsSize; - ATTRIBUTE *temp; - attsSize = n + nDefaultAtts + INIT_ATTS_SIZE; - temp = (ATTRIBUTE *)REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE)); - if (temp == NULL) - return XML_ERROR_NO_MEMORY; - atts = temp; - if (n > oldAttsSize) - XmlGetAttributes(enc, attStr, n, atts); - } - - appAtts = (const XML_Char **)atts; - for (i = 0; i < n; i++) { - /* add the name and value to the attribute list */ - ATTRIBUTE_ID *attId = getAttributeId(parser, enc, atts[i].name, - atts[i].name - + XmlNameLength(enc, atts[i].name)); - if (!attId) - return XML_ERROR_NO_MEMORY; - /* Detect duplicate attributes by their QNames. This does not work when - namespace processing is turned on and different prefixes for the same - namespace are used. For this case we have a check further down. - */ - if ((attId->name)[-1]) { - if (enc == encoding) - eventPtr = atts[i].name; - return XML_ERROR_DUPLICATE_ATTRIBUTE; - } - (attId->name)[-1] = 1; - appAtts[attIndex++] = attId->name; - if (!atts[i].normalized) { - enum XML_Error result; - XML_Bool isCdata = XML_TRUE; - - /* figure out whether declared as other than CDATA */ - if (attId->maybeTokenized) { - int j; - for (j = 0; j < nDefaultAtts; j++) { - if (attId == elementType->defaultAtts[j].id) { - isCdata = elementType->defaultAtts[j].isCdata; - break; - } - } - } - - /* normalize the attribute value */ - result = storeAttributeValue(parser, enc, isCdata, - atts[i].valuePtr, atts[i].valueEnd, - &tempPool); - if (result) - return result; - appAtts[attIndex] = poolStart(&tempPool); - poolFinish(&tempPool); - } - else { - /* the value did not need normalizing */ - appAtts[attIndex] = poolStoreString(&tempPool, enc, atts[i].valuePtr, - atts[i].valueEnd); - if (appAtts[attIndex] == 0) - return XML_ERROR_NO_MEMORY; - poolFinish(&tempPool); - } - /* handle prefixed attribute names */ - if (attId->prefix) { - if (attId->xmlns) { - /* deal with namespace declarations here */ - enum XML_Error result = addBinding(parser, attId->prefix, attId, - appAtts[attIndex], bindingsPtr); - if (result) - return result; - --attIndex; - } - else { - /* deal with other prefixed names later */ - attIndex++; - nPrefixes++; - (attId->name)[-1] = 2; - } - } - else - attIndex++; - } - - /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */ - nSpecifiedAtts = attIndex; - if (elementType->idAtt && (elementType->idAtt->name)[-1]) { - for (i = 0; i < attIndex; i += 2) - if (appAtts[i] == elementType->idAtt->name) { - idAttIndex = i; - break; - } - } - else - idAttIndex = -1; - - /* do attribute defaulting */ - for (i = 0; i < nDefaultAtts; i++) { - const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i; - if (!(da->id->name)[-1] && da->value) { - if (da->id->prefix) { - if (da->id->xmlns) { - enum XML_Error result = addBinding(parser, da->id->prefix, da->id, - da->value, bindingsPtr); - if (result) - return result; - } - else { - (da->id->name)[-1] = 2; - nPrefixes++; - appAtts[attIndex++] = da->id->name; - appAtts[attIndex++] = da->value; - } - } - else { - (da->id->name)[-1] = 1; - appAtts[attIndex++] = da->id->name; - appAtts[attIndex++] = da->value; - } - } - } - appAtts[attIndex] = 0; - - /* expand prefixed attribute names, check for duplicates, - and clear flags that say whether attributes were specified */ - i = 0; - if (nPrefixes) { - int j; /* hash table index */ - unsigned long version = nsAttsVersion; - int nsAttsSize = (int)1 << nsAttsPower; - /* size of hash table must be at least 2 * (# of prefixed attributes) */ - if ((nPrefixes << 1) >> nsAttsPower) { /* true for nsAttsPower = 0 */ - NS_ATT *temp; - /* hash table size must also be a power of 2 and >= 8 */ - while (nPrefixes >> nsAttsPower++); - if (nsAttsPower < 3) - nsAttsPower = 3; - nsAttsSize = (int)1 << nsAttsPower; - temp = (NS_ATT *)REALLOC(nsAtts, nsAttsSize * sizeof(NS_ATT)); - if (!temp) - return XML_ERROR_NO_MEMORY; - nsAtts = temp; - version = 0; /* force re-initialization of nsAtts hash table */ - } - /* using a version flag saves us from initializing nsAtts every time */ - if (!version) { /* initialize version flags when version wraps around */ - version = INIT_ATTS_VERSION; - for (j = nsAttsSize; j != 0; ) - nsAtts[--j].version = version; - } - nsAttsVersion = --version; - - /* expand prefixed names and check for duplicates */ - for (; i < attIndex; i += 2) { - const XML_Char *s = appAtts[i]; - if (s[-1] == 2) { /* prefixed */ - ATTRIBUTE_ID *id; - const BINDING *b; - unsigned long uriHash = 0; - ((XML_Char *)s)[-1] = 0; /* clear flag */ - id = (ATTRIBUTE_ID *)lookup(&dtd->attributeIds, s, 0); - b = id->prefix->binding; - if (!b) - return XML_ERROR_UNBOUND_PREFIX; - - /* as we expand the name we also calculate its hash value */ - for (j = 0; j < b->uriLen; j++) { - const XML_Char c = b->uri[j]; - if (!poolAppendChar(&tempPool, c)) - return XML_ERROR_NO_MEMORY; - uriHash = CHAR_HASH(uriHash, c); - } - while (*s++ != XML_T(ASCII_COLON)) - ; - do { /* copies null terminator */ - const XML_Char c = *s; - if (!poolAppendChar(&tempPool, *s)) - return XML_ERROR_NO_MEMORY; - uriHash = CHAR_HASH(uriHash, c); - } while (*s++); - - { /* Check hash table for duplicate of expanded name (uriName). - Derived from code in lookup(HASH_TABLE *table, ...). - */ - unsigned char step = 0; - unsigned long mask = nsAttsSize - 1; - j = uriHash & mask; /* index into hash table */ - while (nsAtts[j].version == version) { - /* for speed we compare stored hash values first */ - if (uriHash == nsAtts[j].hash) { - const XML_Char *s1 = poolStart(&tempPool); - const XML_Char *s2 = nsAtts[j].uriName; - /* s1 is null terminated, but not s2 */ - for (; *s1 == *s2 && *s1 != 0; s1++, s2++); - if (*s1 == 0) - return XML_ERROR_DUPLICATE_ATTRIBUTE; - } - if (!step) - step = PROBE_STEP(uriHash, mask, nsAttsPower); - j < step ? (j += nsAttsSize - step) : (j -= step); - } - } - - if (ns_triplets) { /* append namespace separator and prefix */ - tempPool.ptr[-1] = namespaceSeparator; - s = b->prefix->name; - do { - if (!poolAppendChar(&tempPool, *s)) - return XML_ERROR_NO_MEMORY; - } while (*s++); - } - - /* store expanded name in attribute list */ - s = poolStart(&tempPool); - poolFinish(&tempPool); - appAtts[i] = s; - - /* fill empty slot with new version, uriName and hash value */ - nsAtts[j].version = version; - nsAtts[j].hash = uriHash; - nsAtts[j].uriName = s; - - if (!--nPrefixes) { - i += 2; - break; - } - } - else /* not prefixed */ - ((XML_Char *)s)[-1] = 0; /* clear flag */ - } - } - /* clear flags for the remaining attributes */ - for (; i < attIndex; i += 2) - ((XML_Char *)(appAtts[i]))[-1] = 0; - for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding) - binding->attId->name[-1] = 0; - - if (!ns) - return XML_ERROR_NONE; - - /* expand the element type name */ - if (elementType->prefix) { - binding = elementType->prefix->binding; - if (!binding) - return XML_ERROR_UNBOUND_PREFIX; - localPart = tagNamePtr->str; - while (*localPart++ != XML_T(ASCII_COLON)) - ; - } - else if (dtd->defaultPrefix.binding) { - binding = dtd->defaultPrefix.binding; - localPart = tagNamePtr->str; - } - else - return XML_ERROR_NONE; - prefixLen = 0; - if (ns_triplets && binding->prefix->name) { - for (; binding->prefix->name[prefixLen++];) - ; /* prefixLen includes null terminator */ - } - tagNamePtr->localPart = localPart; - tagNamePtr->uriLen = binding->uriLen; - tagNamePtr->prefix = binding->prefix->name; - tagNamePtr->prefixLen = prefixLen; - for (i = 0; localPart[i++];) - ; /* i includes null terminator */ - n = i + binding->uriLen + prefixLen; - if (n > binding->uriAlloc) { - TAG *p; - uri = (XML_Char *)MALLOC((n + EXPAND_SPARE) * sizeof(XML_Char)); - if (!uri) - return XML_ERROR_NO_MEMORY; - binding->uriAlloc = n + EXPAND_SPARE; - memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char)); - for (p = tagStack; p; p = p->parent) - if (p->name.str == binding->uri) - p->name.str = uri; - FREE(binding->uri); - binding->uri = uri; - } - /* if namespaceSeparator != '\0' then uri includes it already */ - uri = binding->uri + binding->uriLen; - memcpy(uri, localPart, i * sizeof(XML_Char)); - /* we always have a namespace separator between localPart and prefix */ - if (prefixLen) { - uri += i - 1; - *uri = namespaceSeparator; /* replace null terminator */ - memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char)); - } - tagNamePtr->str = binding->uri; - return XML_ERROR_NONE; -} - -/* addBinding() overwrites the value of prefix->binding without checking. - Therefore one must keep track of the old value outside of addBinding(). -*/ -static enum XML_Error -addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, - const XML_Char *uri, BINDING **bindingsPtr) -{ - static const XML_Char xmlNamespace[] = { - ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, - ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, - ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, - ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH, - ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c, - ASCII_e, '\0' - }; - static const int xmlLen = - (int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1; - static const XML_Char xmlnsNamespace[] = { - ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, - ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, - ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_2, ASCII_0, ASCII_0, - ASCII_0, ASCII_SLASH, ASCII_x, ASCII_m, ASCII_l, ASCII_n, ASCII_s, - ASCII_SLASH, '\0' - }; - static const int xmlnsLen = - (int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1; - - XML_Bool mustBeXML = XML_FALSE; - XML_Bool isXML = XML_TRUE; - XML_Bool isXMLNS = XML_TRUE; - - BINDING *b; - int len; - - /* empty URI is only valid for default namespace per XML NS 1.0 (not 1.1) */ - if (*uri == XML_T('\0') && prefix->name) - return XML_ERROR_UNDECLARING_PREFIX; - - if (prefix->name - && prefix->name[0] == XML_T(ASCII_x) - && prefix->name[1] == XML_T(ASCII_m) - && prefix->name[2] == XML_T(ASCII_l)) { - - /* Not allowed to bind xmlns */ - if (prefix->name[3] == XML_T(ASCII_n) - && prefix->name[4] == XML_T(ASCII_s) - && prefix->name[5] == XML_T('\0')) - return XML_ERROR_RESERVED_PREFIX_XMLNS; - - if (prefix->name[3] == XML_T('\0')) - mustBeXML = XML_TRUE; - } - - for (len = 0; uri[len]; len++) { - if (isXML && (len > xmlLen || uri[len] != xmlNamespace[len])) - isXML = XML_FALSE; - - if (!mustBeXML && isXMLNS - && (len > xmlnsLen || uri[len] != xmlnsNamespace[len])) - isXMLNS = XML_FALSE; - } - isXML = isXML && len == xmlLen; - isXMLNS = isXMLNS && len == xmlnsLen; - - if (mustBeXML != isXML) - return mustBeXML ? XML_ERROR_RESERVED_PREFIX_XML - : XML_ERROR_RESERVED_NAMESPACE_URI; - - if (isXMLNS) - return XML_ERROR_RESERVED_NAMESPACE_URI; - - if (namespaceSeparator) - len++; - if (freeBindingList) { - b = freeBindingList; - if (len > b->uriAlloc) { - XML_Char *temp = (XML_Char *)REALLOC(b->uri, - sizeof(XML_Char) * (len + EXPAND_SPARE)); - if (temp == NULL) - return XML_ERROR_NO_MEMORY; - b->uri = temp; - b->uriAlloc = len + EXPAND_SPARE; - } - freeBindingList = b->nextTagBinding; - } - else { - b = (BINDING *)MALLOC(sizeof(BINDING)); - if (!b) - return XML_ERROR_NO_MEMORY; - b->uri = (XML_Char *)MALLOC(sizeof(XML_Char) * (len + EXPAND_SPARE)); - if (!b->uri) { - FREE(b); - return XML_ERROR_NO_MEMORY; - } - b->uriAlloc = len + EXPAND_SPARE; - } - b->uriLen = len; - memcpy(b->uri, uri, len * sizeof(XML_Char)); - if (namespaceSeparator) - b->uri[len - 1] = namespaceSeparator; - b->prefix = prefix; - b->attId = attId; - b->prevPrefixBinding = prefix->binding; - /* NULL binding when default namespace undeclared */ - if (*uri == XML_T('\0') && prefix == &_dtd->defaultPrefix) - prefix->binding = NULL; - else - prefix->binding = b; - b->nextTagBinding = *bindingsPtr; - *bindingsPtr = b; - /* if attId == NULL then we are not starting a namespace scope */ - if (attId && startNamespaceDeclHandler) - startNamespaceDeclHandler(handlerArg, prefix->name, - prefix->binding ? uri : 0); - return XML_ERROR_NONE; -} - -/* The idea here is to avoid using stack for each CDATA section when - the whole file is parsed with one call. -*/ -static enum XML_Error PTRCALL -cdataSectionProcessor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - enum XML_Error result = doCdataSection(parser, encoding, &start, end, - endPtr, (XML_Bool)!ps_finalBuffer); - if (result != XML_ERROR_NONE) - return result; - if (start) { - if (parentParser) { /* we are parsing an external entity */ - processor = externalEntityContentProcessor; - return externalEntityContentProcessor(parser, start, end, endPtr); - } - else { - processor = contentProcessor; - return contentProcessor(parser, start, end, endPtr); - } - } - return result; -} - -/* startPtr gets set to non-null if the section is closed, and to null if - the section is not yet closed. -*/ -static enum XML_Error -doCdataSection(XML_Parser parser, - const ENCODING *enc, - const char **startPtr, - const char *end, - const char **nextPtr, - XML_Bool haveMore) -{ - const char *s = *startPtr; - const char **eventPP; - const char **eventEndPP; - if (enc == encoding) { - eventPP = &eventPtr; - *eventPP = s; - eventEndPP = &eventEndPtr; - } - else { - eventPP = &(openInternalEntities->internalEventPtr); - eventEndPP = &(openInternalEntities->internalEventEndPtr); - } - *eventPP = s; - *startPtr = NULL; - - for (;;) { - const char *next; - int tok = XmlCdataSectionTok(enc, s, end, &next); - *eventEndPP = next; - switch (tok) { - case XML_TOK_CDATA_SECT_CLOSE: - if (endCdataSectionHandler) - endCdataSectionHandler(handlerArg); -#if 0 - /* see comment under XML_TOK_CDATA_SECT_OPEN */ - else if (characterDataHandler) - characterDataHandler(handlerArg, dataBuf, 0); -#endif - else if (defaultHandler) - reportDefault(parser, enc, s, next); - *startPtr = next; - *nextPtr = next; - if (ps_parsing == XML_FINISHED) - return XML_ERROR_ABORTED; - else - return XML_ERROR_NONE; - case XML_TOK_DATA_NEWLINE: - if (characterDataHandler) { - XML_Char c = 0xA; - characterDataHandler(handlerArg, &c, 1); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - break; - case XML_TOK_DATA_CHARS: - { - XML_CharacterDataHandler charDataHandler = characterDataHandler; - if (charDataHandler) { - if (MUST_CONVERT(enc, s)) { - for (;;) { - ICHAR *dataPtr = (ICHAR *)dataBuf; - XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); - *eventEndPP = next; - charDataHandler(handlerArg, dataBuf, - (int)(dataPtr - (ICHAR *)dataBuf)); - if (s == next) - break; - *eventPP = s; - } - } - else - charDataHandler(handlerArg, - (XML_Char *)s, - (int)((XML_Char *)next - (XML_Char *)s)); - } - else if (defaultHandler) - reportDefault(parser, enc, s, next); - } - break; - case XML_TOK_INVALID: - *eventPP = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_PARTIAL: - case XML_TOK_NONE: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_UNCLOSED_CDATA_SECTION; - default: - *eventPP = next; - return XML_ERROR_UNEXPECTED_STATE; - } - - *eventPP = s = next; - switch (ps_parsing) { - case XML_SUSPENDED: - *nextPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: ; - } - } - /* not reached */ -} - -#ifdef XML_DTD - -/* The idea here is to avoid using stack for each IGNORE section when - the whole file is parsed with one call. -*/ -static enum XML_Error PTRCALL -ignoreSectionProcessor(XML_Parser parser, - const char *start, - const char *end, - const char **endPtr) -{ - enum XML_Error result = doIgnoreSection(parser, encoding, &start, end, - endPtr, (XML_Bool)!ps_finalBuffer); - if (result != XML_ERROR_NONE) - return result; - if (start) { - processor = prologProcessor; - return prologProcessor(parser, start, end, endPtr); - } - return result; -} - -/* startPtr gets set to non-null is the section is closed, and to null - if the section is not yet closed. -*/ -static enum XML_Error -doIgnoreSection(XML_Parser parser, - const ENCODING *enc, - const char **startPtr, - const char *end, - const char **nextPtr, - XML_Bool haveMore) -{ - const char *next; - int tok; - const char *s = *startPtr; - const char **eventPP; - const char **eventEndPP; - if (enc == encoding) { - eventPP = &eventPtr; - *eventPP = s; - eventEndPP = &eventEndPtr; - } - else { - eventPP = &(openInternalEntities->internalEventPtr); - eventEndPP = &(openInternalEntities->internalEventEndPtr); - } - *eventPP = s; - *startPtr = NULL; - tok = XmlIgnoreSectionTok(enc, s, end, &next); - *eventEndPP = next; - switch (tok) { - case XML_TOK_IGNORE_SECT: - if (defaultHandler) - reportDefault(parser, enc, s, next); - *startPtr = next; - *nextPtr = next; - if (ps_parsing == XML_FINISHED) - return XML_ERROR_ABORTED; - else - return XML_ERROR_NONE; - case XML_TOK_INVALID: - *eventPP = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_PARTIAL: - case XML_TOK_NONE: - if (haveMore) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_SYNTAX; /* XML_ERROR_UNCLOSED_IGNORE_SECTION */ - default: - *eventPP = next; - return XML_ERROR_UNEXPECTED_STATE; - } - /* not reached */ -} - -#endif /* XML_DTD */ - -static enum XML_Error -initializeEncoding(XML_Parser parser) -{ - const char *s; -#ifdef XML_UNICODE - char encodingBuf[128]; - if (!protocolEncodingName) - s = NULL; - else { - int i; - for (i = 0; protocolEncodingName[i]; i++) { - if (i == sizeof(encodingBuf) - 1 - || (protocolEncodingName[i] & ~0x7f) != 0) { - encodingBuf[0] = '\0'; - break; - } - encodingBuf[i] = (char)protocolEncodingName[i]; - } - encodingBuf[i] = '\0'; - s = encodingBuf; - } -#else - s = protocolEncodingName; -#endif - if ((ns ? XmlInitEncodingNS : XmlInitEncoding)(&initEncoding, &encoding, s)) - return XML_ERROR_NONE; - return handleUnknownEncoding(parser, protocolEncodingName); -} - -static enum XML_Error -processXmlDecl(XML_Parser parser, int isGeneralTextEntity, - const char *s, const char *next) -{ - const char *encodingName = NULL; - const XML_Char *storedEncName = NULL; - const ENCODING *newEncoding = NULL; - const char *version = NULL; - const char *versionend; - const XML_Char *storedversion = NULL; - int standalone = -1; - if (!(ns - ? XmlParseXmlDeclNS - : XmlParseXmlDecl)(isGeneralTextEntity, - encoding, - s, - next, - &eventPtr, - &version, - &versionend, - &encodingName, - &newEncoding, - &standalone)) { - if (isGeneralTextEntity) - return XML_ERROR_TEXT_DECL; - else - return XML_ERROR_XML_DECL; - } - if (!isGeneralTextEntity && standalone == 1) { - _dtd->standalone = XML_TRUE; -#ifdef XML_DTD - if (paramEntityParsing == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE) - paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; -#endif /* XML_DTD */ - } - if (xmlDeclHandler) { - if (encodingName != NULL) { - storedEncName = poolStoreString(&temp2Pool, - encoding, - encodingName, - encodingName - + XmlNameLength(encoding, encodingName)); - if (!storedEncName) - return XML_ERROR_NO_MEMORY; - poolFinish(&temp2Pool); - } - if (version) { - storedversion = poolStoreString(&temp2Pool, - encoding, - version, - versionend - encoding->minBytesPerChar); - if (!storedversion) - return XML_ERROR_NO_MEMORY; - } - xmlDeclHandler(handlerArg, storedversion, storedEncName, standalone); - } - else if (defaultHandler) - reportDefault(parser, encoding, s, next); - if (protocolEncodingName == NULL) { - if (newEncoding) { - if (newEncoding->minBytesPerChar != encoding->minBytesPerChar) { - eventPtr = encodingName; - return XML_ERROR_INCORRECT_ENCODING; - } - encoding = newEncoding; - } - else if (encodingName) { - enum XML_Error result; - if (!storedEncName) { - storedEncName = poolStoreString( - &temp2Pool, encoding, encodingName, - encodingName + XmlNameLength(encoding, encodingName)); - if (!storedEncName) - return XML_ERROR_NO_MEMORY; - } - result = handleUnknownEncoding(parser, storedEncName); - poolClear(&temp2Pool); - if (result == XML_ERROR_UNKNOWN_ENCODING) - eventPtr = encodingName; - return result; - } - } - - if (storedEncName || storedversion) - poolClear(&temp2Pool); - - return XML_ERROR_NONE; -} - -static enum XML_Error -handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName) -{ - if (unknownEncodingHandler) { - XML_Encoding info; - int i; - for (i = 0; i < 256; i++) - info.map[i] = -1; - info.convert = NULL; - info.data = NULL; - info.release = NULL; - if (unknownEncodingHandler(unknownEncodingHandlerData, encodingName, - &info)) { - ENCODING *enc; - unknownEncodingMem = MALLOC(XmlSizeOfUnknownEncoding()); - if (!unknownEncodingMem) { - if (info.release) - info.release(info.data); - return XML_ERROR_NO_MEMORY; - } - enc = (ns - ? XmlInitUnknownEncodingNS - : XmlInitUnknownEncoding)(unknownEncodingMem, - info.map, - info.convert, - info.data); - if (enc) { - unknownEncodingData = info.data; - unknownEncodingRelease = info.release; - encoding = enc; - return XML_ERROR_NONE; - } - } - if (info.release != NULL) - info.release(info.data); - } - return XML_ERROR_UNKNOWN_ENCODING; -} - -static enum XML_Error PTRCALL -prologInitProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - enum XML_Error result = initializeEncoding(parser); - if (result != XML_ERROR_NONE) - return result; - processor = prologProcessor; - return prologProcessor(parser, s, end, nextPtr); -} - -#ifdef XML_DTD - -static enum XML_Error PTRCALL -externalParEntInitProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - enum XML_Error result = initializeEncoding(parser); - if (result != XML_ERROR_NONE) - return result; - - /* we know now that XML_Parse(Buffer) has been called, - so we consider the external parameter entity read */ - _dtd->paramEntityRead = XML_TRUE; - - if (prologState.inEntityValue) { - processor = entityValueInitProcessor; - return entityValueInitProcessor(parser, s, end, nextPtr); - } - else { - processor = externalParEntProcessor; - return externalParEntProcessor(parser, s, end, nextPtr); - } -} - -static enum XML_Error PTRCALL -entityValueInitProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - int tok; - const char *start = s; - const char *next = start; - eventPtr = start; - - for (;;) { - tok = XmlPrologTok(encoding, start, end, &next); - eventEndPtr = next; - if (tok <= 0) { - if (!ps_finalBuffer && tok != XML_TOK_INVALID) { - *nextPtr = s; - return XML_ERROR_NONE; - } - switch (tok) { - case XML_TOK_INVALID: - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_NONE: /* start == end */ - default: - break; - } - /* found end of entity value - can store it now */ - return storeEntityValue(parser, encoding, s, end); - } - else if (tok == XML_TOK_XML_DECL) { - enum XML_Error result; - result = processXmlDecl(parser, 0, start, next); - if (result != XML_ERROR_NONE) - return result; - switch (ps_parsing) { - case XML_SUSPENDED: - *nextPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: - *nextPtr = next; - } - /* stop scanning for text declaration - we found one */ - processor = entityValueProcessor; - return entityValueProcessor(parser, next, end, nextPtr); - } - /* If we are at the end of the buffer, this would cause XmlPrologTok to - return XML_TOK_NONE on the next call, which would then cause the - function to exit with *nextPtr set to s - that is what we want for other - tokens, but not for the BOM - we would rather like to skip it; - then, when this routine is entered the next time, XmlPrologTok will - return XML_TOK_INVALID, since the BOM is still in the buffer - */ - else if (tok == XML_TOK_BOM && next == end && !ps_finalBuffer) { - *nextPtr = next; - return XML_ERROR_NONE; - } - start = next; - eventPtr = start; - } -} - -static enum XML_Error PTRCALL -externalParEntProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - const char *next = s; - int tok; - - tok = XmlPrologTok(encoding, s, end, &next); - if (tok <= 0) { - if (!ps_finalBuffer && tok != XML_TOK_INVALID) { - *nextPtr = s; - return XML_ERROR_NONE; - } - switch (tok) { - case XML_TOK_INVALID: - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_NONE: /* start == end */ - default: - break; - } - } - /* This would cause the next stage, i.e. doProlog to be passed XML_TOK_BOM. - However, when parsing an external subset, doProlog will not accept a BOM - as valid, and report a syntax error, so we have to skip the BOM - */ - else if (tok == XML_TOK_BOM) { - s = next; - tok = XmlPrologTok(encoding, s, end, &next); - } - - processor = prologProcessor; - return doProlog(parser, encoding, s, end, tok, next, - nextPtr, (XML_Bool)!ps_finalBuffer); -} - -static enum XML_Error PTRCALL -entityValueProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - const char *start = s; - const char *next = s; - const ENCODING *enc = encoding; - int tok; - - for (;;) { - tok = XmlPrologTok(enc, start, end, &next); - if (tok <= 0) { - if (!ps_finalBuffer && tok != XML_TOK_INVALID) { - *nextPtr = s; - return XML_ERROR_NONE; - } - switch (tok) { - case XML_TOK_INVALID: - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_NONE: /* start == end */ - default: - break; - } - /* found end of entity value - can store it now */ - return storeEntityValue(parser, enc, s, end); - } - start = next; - } -} - -#endif /* XML_DTD */ - -static enum XML_Error PTRCALL -prologProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - const char *next = s; - int tok = XmlPrologTok(encoding, s, end, &next); - return doProlog(parser, encoding, s, end, tok, next, - nextPtr, (XML_Bool)!ps_finalBuffer); -} - -static enum XML_Error -doProlog(XML_Parser parser, - const ENCODING *enc, - const char *s, - const char *end, - int tok, - const char *next, - const char **nextPtr, - XML_Bool haveMore) -{ -#ifdef XML_DTD - static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' }; -#endif /* XML_DTD */ - static const XML_Char atypeCDATA[] = - { ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; - static const XML_Char atypeID[] = { ASCII_I, ASCII_D, '\0' }; - static const XML_Char atypeIDREF[] = - { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' }; - static const XML_Char atypeIDREFS[] = - { ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' }; - static const XML_Char atypeENTITY[] = - { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0' }; - static const XML_Char atypeENTITIES[] = { ASCII_E, ASCII_N, - ASCII_T, ASCII_I, ASCII_T, ASCII_I, ASCII_E, ASCII_S, '\0' }; - static const XML_Char atypeNMTOKEN[] = { - ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0' }; - static const XML_Char atypeNMTOKENS[] = { ASCII_N, ASCII_M, ASCII_T, - ASCII_O, ASCII_K, ASCII_E, ASCII_N, ASCII_S, '\0' }; - static const XML_Char notationPrefix[] = { ASCII_N, ASCII_O, ASCII_T, - ASCII_A, ASCII_T, ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0' }; - static const XML_Char enumValueSep[] = { ASCII_PIPE, '\0' }; - static const XML_Char enumValueStart[] = { ASCII_LPAREN, '\0' }; - - /* save one level of indirection */ - DTD * const dtd = _dtd; - - const char **eventPP; - const char **eventEndPP; - enum XML_Content_Quant quant; - - if (enc == encoding) { - eventPP = &eventPtr; - eventEndPP = &eventEndPtr; - } - else { - eventPP = &(openInternalEntities->internalEventPtr); - eventEndPP = &(openInternalEntities->internalEventEndPtr); - } - - for (;;) { - int role; - XML_Bool handleDefault = XML_TRUE; - *eventPP = s; - *eventEndPP = next; - if (tok <= 0) { - if (haveMore && tok != XML_TOK_INVALID) { - *nextPtr = s; - return XML_ERROR_NONE; - } - switch (tok) { - case XML_TOK_INVALID: - *eventPP = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - return XML_ERROR_PARTIAL_CHAR; - case XML_TOK_NONE: -#ifdef XML_DTD - /* for internal PE NOT referenced between declarations */ - if (enc != encoding && !openInternalEntities->betweenDecl) { - *nextPtr = s; - return XML_ERROR_NONE; - } - /* WFC: PE Between Declarations - must check that PE contains - complete markup, not only for external PEs, but also for - internal PEs if the reference occurs between declarations. - */ - if (isParamEntity || enc != encoding) { - if (XmlTokenRole(&prologState, XML_TOK_NONE, end, end, enc) - == XML_ROLE_ERROR) - return XML_ERROR_INCOMPLETE_PE; - *nextPtr = s; - return XML_ERROR_NONE; - } -#endif /* XML_DTD */ - return XML_ERROR_NO_ELEMENTS; - default: - tok = -tok; - next = end; - break; - } - } - role = XmlTokenRole(&prologState, tok, s, next, enc); - switch (role) { - case XML_ROLE_XML_DECL: - { - enum XML_Error result = processXmlDecl(parser, 0, s, next); - if (result != XML_ERROR_NONE) - return result; - enc = encoding; - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_DOCTYPE_NAME: - if (startDoctypeDeclHandler) { - doctypeName = poolStoreString(&tempPool, enc, s, next); - if (!doctypeName) - return XML_ERROR_NO_MEMORY; - poolFinish(&tempPool); - doctypePubid = NULL; - handleDefault = XML_FALSE; - } - doctypeSysid = NULL; /* always initialize to NULL */ - break; - case XML_ROLE_DOCTYPE_INTERNAL_SUBSET: - if (startDoctypeDeclHandler) { - startDoctypeDeclHandler(handlerArg, doctypeName, doctypeSysid, - doctypePubid, 1); - doctypeName = NULL; - poolClear(&tempPool); - handleDefault = XML_FALSE; - } - break; -#ifdef XML_DTD - case XML_ROLE_TEXT_DECL: - { - enum XML_Error result = processXmlDecl(parser, 1, s, next); - if (result != XML_ERROR_NONE) - return result; - enc = encoding; - handleDefault = XML_FALSE; - } - break; -#endif /* XML_DTD */ - case XML_ROLE_DOCTYPE_PUBLIC_ID: -#ifdef XML_DTD - useForeignDTD = XML_FALSE; - declEntity = (ENTITY *)lookup(&dtd->paramEntities, - externalSubsetName, - sizeof(ENTITY)); - if (!declEntity) - return XML_ERROR_NO_MEMORY; -#endif /* XML_DTD */ - dtd->hasParamEntityRefs = XML_TRUE; - if (startDoctypeDeclHandler) { - if (!XmlIsPublicId(enc, s, next, eventPP)) - return XML_ERROR_PUBLICID; - doctypePubid = poolStoreString(&tempPool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!doctypePubid) - return XML_ERROR_NO_MEMORY; - normalizePublicId((XML_Char *)doctypePubid); - poolFinish(&tempPool); - handleDefault = XML_FALSE; - goto alreadyChecked; - } - /* fall through */ - case XML_ROLE_ENTITY_PUBLIC_ID: - if (!XmlIsPublicId(enc, s, next, eventPP)) - return XML_ERROR_PUBLICID; - alreadyChecked: - if (dtd->keepProcessing && declEntity) { - XML_Char *tem = poolStoreString(&dtd->pool, - enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!tem) - return XML_ERROR_NO_MEMORY; - normalizePublicId(tem); - declEntity->publicId = tem; - poolFinish(&dtd->pool); - if (entityDeclHandler) - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_DOCTYPE_CLOSE: - if (doctypeName) { - startDoctypeDeclHandler(handlerArg, doctypeName, - doctypeSysid, doctypePubid, 0); - poolClear(&tempPool); - handleDefault = XML_FALSE; - } - /* doctypeSysid will be non-NULL in the case of a previous - XML_ROLE_DOCTYPE_SYSTEM_ID, even if startDoctypeDeclHandler - was not set, indicating an external subset - */ -#ifdef XML_DTD - if (doctypeSysid || useForeignDTD) { - XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; - dtd->hasParamEntityRefs = XML_TRUE; - if (paramEntityParsing && externalEntityRefHandler) { - ENTITY *entity = (ENTITY *)lookup(&dtd->paramEntities, - externalSubsetName, - sizeof(ENTITY)); - if (!entity) - return XML_ERROR_NO_MEMORY; - if (useForeignDTD) - entity->base = curBase; - dtd->paramEntityRead = XML_FALSE; - if (!externalEntityRefHandler(externalEntityRefHandlerArg, - 0, - entity->base, - entity->systemId, - entity->publicId)) - return XML_ERROR_EXTERNAL_ENTITY_HANDLING; - if (dtd->paramEntityRead) { - if (!dtd->standalone && - notStandaloneHandler && - !notStandaloneHandler(handlerArg)) - return XML_ERROR_NOT_STANDALONE; - } - /* if we didn't read the foreign DTD then this means that there - is no external subset and we must reset dtd->hasParamEntityRefs - */ - else if (!doctypeSysid) - dtd->hasParamEntityRefs = hadParamEntityRefs; - /* end of DTD - no need to update dtd->keepProcessing */ - } - useForeignDTD = XML_FALSE; - } -#endif /* XML_DTD */ - if (endDoctypeDeclHandler) { - endDoctypeDeclHandler(handlerArg); - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_INSTANCE_START: -#ifdef XML_DTD - /* if there is no DOCTYPE declaration then now is the - last chance to read the foreign DTD - */ - if (useForeignDTD) { - XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; - dtd->hasParamEntityRefs = XML_TRUE; - if (paramEntityParsing && externalEntityRefHandler) { - ENTITY *entity = (ENTITY *)lookup(&dtd->paramEntities, - externalSubsetName, - sizeof(ENTITY)); - if (!entity) - return XML_ERROR_NO_MEMORY; - entity->base = curBase; - dtd->paramEntityRead = XML_FALSE; - if (!externalEntityRefHandler(externalEntityRefHandlerArg, - 0, - entity->base, - entity->systemId, - entity->publicId)) - return XML_ERROR_EXTERNAL_ENTITY_HANDLING; - if (dtd->paramEntityRead) { - if (!dtd->standalone && - notStandaloneHandler && - !notStandaloneHandler(handlerArg)) - return XML_ERROR_NOT_STANDALONE; - } - /* if we didn't read the foreign DTD then this means that there - is no external subset and we must reset dtd->hasParamEntityRefs - */ - else - dtd->hasParamEntityRefs = hadParamEntityRefs; - /* end of DTD - no need to update dtd->keepProcessing */ - } - } -#endif /* XML_DTD */ - processor = contentProcessor; - return contentProcessor(parser, s, end, nextPtr); - case XML_ROLE_ATTLIST_ELEMENT_NAME: - declElementType = getElementType(parser, enc, s, next); - if (!declElementType) - return XML_ERROR_NO_MEMORY; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_NAME: - declAttributeId = getAttributeId(parser, enc, s, next); - if (!declAttributeId) - return XML_ERROR_NO_MEMORY; - declAttributeIsCdata = XML_FALSE; - declAttributeType = NULL; - declAttributeIsId = XML_FALSE; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_CDATA: - declAttributeIsCdata = XML_TRUE; - declAttributeType = atypeCDATA; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_ID: - declAttributeIsId = XML_TRUE; - declAttributeType = atypeID; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_IDREF: - declAttributeType = atypeIDREF; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_IDREFS: - declAttributeType = atypeIDREFS; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_ENTITY: - declAttributeType = atypeENTITY; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES: - declAttributeType = atypeENTITIES; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN: - declAttributeType = atypeNMTOKEN; - goto checkAttListDeclHandler; - case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS: - declAttributeType = atypeNMTOKENS; - checkAttListDeclHandler: - if (dtd->keepProcessing && attlistDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_ATTRIBUTE_ENUM_VALUE: - case XML_ROLE_ATTRIBUTE_NOTATION_VALUE: - if (dtd->keepProcessing && attlistDeclHandler) { - const XML_Char *prefix; - if (declAttributeType) { - prefix = enumValueSep; - } - else { - prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE - ? notationPrefix - : enumValueStart); - } - if (!poolAppendString(&tempPool, prefix)) - return XML_ERROR_NO_MEMORY; - if (!poolAppend(&tempPool, enc, s, next)) - return XML_ERROR_NO_MEMORY; - declAttributeType = tempPool.start; - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE: - case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE: - if (dtd->keepProcessing) { - if (!defineAttribute(declElementType, declAttributeId, - declAttributeIsCdata, declAttributeIsId, - 0, parser)) - return XML_ERROR_NO_MEMORY; - if (attlistDeclHandler && declAttributeType) { - if (*declAttributeType == XML_T(ASCII_LPAREN) - || (*declAttributeType == XML_T(ASCII_N) - && declAttributeType[1] == XML_T(ASCII_O))) { - /* Enumerated or Notation type */ - if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) - || !poolAppendChar(&tempPool, XML_T('\0'))) - return XML_ERROR_NO_MEMORY; - declAttributeType = tempPool.start; - poolFinish(&tempPool); - } - *eventEndPP = s; - attlistDeclHandler(handlerArg, declElementType->name, - declAttributeId->name, declAttributeType, - 0, role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE); - poolClear(&tempPool); - handleDefault = XML_FALSE; - } - } - break; - case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE: - case XML_ROLE_FIXED_ATTRIBUTE_VALUE: - if (dtd->keepProcessing) { - const XML_Char *attVal; - enum XML_Error result = - storeAttributeValue(parser, enc, declAttributeIsCdata, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar, - &dtd->pool); - if (result) - return result; - attVal = poolStart(&dtd->pool); - poolFinish(&dtd->pool); - /* ID attributes aren't allowed to have a default */ - if (!defineAttribute(declElementType, declAttributeId, - declAttributeIsCdata, XML_FALSE, attVal, parser)) - return XML_ERROR_NO_MEMORY; - if (attlistDeclHandler && declAttributeType) { - if (*declAttributeType == XML_T(ASCII_LPAREN) - || (*declAttributeType == XML_T(ASCII_N) - && declAttributeType[1] == XML_T(ASCII_O))) { - /* Enumerated or Notation type */ - if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) - || !poolAppendChar(&tempPool, XML_T('\0'))) - return XML_ERROR_NO_MEMORY; - declAttributeType = tempPool.start; - poolFinish(&tempPool); - } - *eventEndPP = s; - attlistDeclHandler(handlerArg, declElementType->name, - declAttributeId->name, declAttributeType, - attVal, - role == XML_ROLE_FIXED_ATTRIBUTE_VALUE); - poolClear(&tempPool); - handleDefault = XML_FALSE; - } - } - break; - case XML_ROLE_ENTITY_VALUE: - if (dtd->keepProcessing) { - enum XML_Error result = storeEntityValue(parser, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (declEntity) { - declEntity->textPtr = poolStart(&dtd->entityValuePool); - declEntity->textLen = (int)(poolLength(&dtd->entityValuePool)); - poolFinish(&dtd->entityValuePool); - if (entityDeclHandler) { - *eventEndPP = s; - entityDeclHandler(handlerArg, - declEntity->name, - declEntity->is_param, - declEntity->textPtr, - declEntity->textLen, - curBase, 0, 0, 0); - handleDefault = XML_FALSE; - } - } - else - poolDiscard(&dtd->entityValuePool); - if (result != XML_ERROR_NONE) - return result; - } - break; - case XML_ROLE_DOCTYPE_SYSTEM_ID: -#ifdef XML_DTD - useForeignDTD = XML_FALSE; -#endif /* XML_DTD */ - dtd->hasParamEntityRefs = XML_TRUE; - if (startDoctypeDeclHandler) { - doctypeSysid = poolStoreString(&tempPool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (doctypeSysid == NULL) - return XML_ERROR_NO_MEMORY; - poolFinish(&tempPool); - handleDefault = XML_FALSE; - } -#ifdef XML_DTD - else - /* use externalSubsetName to make doctypeSysid non-NULL - for the case where no startDoctypeDeclHandler is set */ - doctypeSysid = externalSubsetName; -#endif /* XML_DTD */ - if (!dtd->standalone -#ifdef XML_DTD - && !paramEntityParsing -#endif /* XML_DTD */ - && notStandaloneHandler - && !notStandaloneHandler(handlerArg)) - return XML_ERROR_NOT_STANDALONE; -#ifndef XML_DTD - break; -#else /* XML_DTD */ - if (!declEntity) { - declEntity = (ENTITY *)lookup(&dtd->paramEntities, - externalSubsetName, - sizeof(ENTITY)); - if (!declEntity) - return XML_ERROR_NO_MEMORY; - declEntity->publicId = NULL; - } - /* fall through */ -#endif /* XML_DTD */ - case XML_ROLE_ENTITY_SYSTEM_ID: - if (dtd->keepProcessing && declEntity) { - declEntity->systemId = poolStoreString(&dtd->pool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!declEntity->systemId) - return XML_ERROR_NO_MEMORY; - declEntity->base = curBase; - poolFinish(&dtd->pool); - if (entityDeclHandler) - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_ENTITY_COMPLETE: - if (dtd->keepProcessing && declEntity && entityDeclHandler) { - *eventEndPP = s; - entityDeclHandler(handlerArg, - declEntity->name, - declEntity->is_param, - 0,0, - declEntity->base, - declEntity->systemId, - declEntity->publicId, - 0); - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_ENTITY_NOTATION_NAME: - if (dtd->keepProcessing && declEntity) { - declEntity->notation = poolStoreString(&dtd->pool, enc, s, next); - if (!declEntity->notation) - return XML_ERROR_NO_MEMORY; - poolFinish(&dtd->pool); - if (unparsedEntityDeclHandler) { - *eventEndPP = s; - unparsedEntityDeclHandler(handlerArg, - declEntity->name, - declEntity->base, - declEntity->systemId, - declEntity->publicId, - declEntity->notation); - handleDefault = XML_FALSE; - } - else if (entityDeclHandler) { - *eventEndPP = s; - entityDeclHandler(handlerArg, - declEntity->name, - 0,0,0, - declEntity->base, - declEntity->systemId, - declEntity->publicId, - declEntity->notation); - handleDefault = XML_FALSE; - } - } - break; - case XML_ROLE_GENERAL_ENTITY_NAME: - { - if (XmlPredefinedEntityName(enc, s, next)) { - declEntity = NULL; - break; - } - if (dtd->keepProcessing) { - const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); - if (!name) - return XML_ERROR_NO_MEMORY; - declEntity = (ENTITY *)lookup(&dtd->generalEntities, name, - sizeof(ENTITY)); - if (!declEntity) - return XML_ERROR_NO_MEMORY; - if (declEntity->name != name) { - poolDiscard(&dtd->pool); - declEntity = NULL; - } - else { - poolFinish(&dtd->pool); - declEntity->publicId = NULL; - declEntity->is_param = XML_FALSE; - /* if we have a parent parser or are reading an internal parameter - entity, then the entity declaration is not considered "internal" - */ - declEntity->is_internal = !(parentParser || openInternalEntities); - if (entityDeclHandler) - handleDefault = XML_FALSE; - } - } - else { - poolDiscard(&dtd->pool); - declEntity = NULL; - } - } - break; - case XML_ROLE_PARAM_ENTITY_NAME: -#ifdef XML_DTD - if (dtd->keepProcessing) { - const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); - if (!name) - return XML_ERROR_NO_MEMORY; - declEntity = (ENTITY *)lookup(&dtd->paramEntities, - name, sizeof(ENTITY)); - if (!declEntity) - return XML_ERROR_NO_MEMORY; - if (declEntity->name != name) { - poolDiscard(&dtd->pool); - declEntity = NULL; - } - else { - poolFinish(&dtd->pool); - declEntity->publicId = NULL; - declEntity->is_param = XML_TRUE; - /* if we have a parent parser or are reading an internal parameter - entity, then the entity declaration is not considered "internal" - */ - declEntity->is_internal = !(parentParser || openInternalEntities); - if (entityDeclHandler) - handleDefault = XML_FALSE; - } - } - else { - poolDiscard(&dtd->pool); - declEntity = NULL; - } -#else /* not XML_DTD */ - declEntity = NULL; -#endif /* XML_DTD */ - break; - case XML_ROLE_NOTATION_NAME: - declNotationPublicId = NULL; - declNotationName = NULL; - if (notationDeclHandler) { - declNotationName = poolStoreString(&tempPool, enc, s, next); - if (!declNotationName) - return XML_ERROR_NO_MEMORY; - poolFinish(&tempPool); - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_NOTATION_PUBLIC_ID: - if (!XmlIsPublicId(enc, s, next, eventPP)) - return XML_ERROR_PUBLICID; - if (declNotationName) { /* means notationDeclHandler != NULL */ - XML_Char *tem = poolStoreString(&tempPool, - enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!tem) - return XML_ERROR_NO_MEMORY; - normalizePublicId(tem); - declNotationPublicId = tem; - poolFinish(&tempPool); - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_NOTATION_SYSTEM_ID: - if (declNotationName && notationDeclHandler) { - const XML_Char *systemId - = poolStoreString(&tempPool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!systemId) - return XML_ERROR_NO_MEMORY; - *eventEndPP = s; - notationDeclHandler(handlerArg, - declNotationName, - curBase, - systemId, - declNotationPublicId); - handleDefault = XML_FALSE; - } - poolClear(&tempPool); - break; - case XML_ROLE_NOTATION_NO_SYSTEM_ID: - if (declNotationPublicId && notationDeclHandler) { - *eventEndPP = s; - notationDeclHandler(handlerArg, - declNotationName, - curBase, - 0, - declNotationPublicId); - handleDefault = XML_FALSE; - } - poolClear(&tempPool); - break; - case XML_ROLE_ERROR: - switch (tok) { - case XML_TOK_PARAM_ENTITY_REF: - /* PE references in internal subset are - not allowed within declarations. */ - return XML_ERROR_PARAM_ENTITY_REF; - case XML_TOK_XML_DECL: - return XML_ERROR_MISPLACED_XML_PI; - default: - return XML_ERROR_SYNTAX; - } -#ifdef XML_DTD - case XML_ROLE_IGNORE_SECT: - { - enum XML_Error result; - if (defaultHandler) - reportDefault(parser, enc, s, next); - handleDefault = XML_FALSE; - result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore); - if (result != XML_ERROR_NONE) - return result; - else if (!next) { - processor = ignoreSectionProcessor; - return result; - } - } - break; -#endif /* XML_DTD */ - case XML_ROLE_GROUP_OPEN: - if (prologState.level >= groupSize) { - if (groupSize) { - char *temp = (char *)REALLOC(groupConnector, groupSize *= 2); - if (temp == NULL) - return XML_ERROR_NO_MEMORY; - groupConnector = temp; - if (dtd->scaffIndex) { - int *temp = (int *)REALLOC(dtd->scaffIndex, - groupSize * sizeof(int)); - if (temp == NULL) - return XML_ERROR_NO_MEMORY; - dtd->scaffIndex = temp; - } - } - else { - groupConnector = (char *)MALLOC(groupSize = 32); - if (!groupConnector) - return XML_ERROR_NO_MEMORY; - } - } - groupConnector[prologState.level] = 0; - if (dtd->in_eldecl) { - int myindex = nextScaffoldPart(parser); - if (myindex < 0) - return XML_ERROR_NO_MEMORY; - dtd->scaffIndex[dtd->scaffLevel] = myindex; - dtd->scaffLevel++; - dtd->scaffold[myindex].type = XML_CTYPE_SEQ; - if (elementDeclHandler) - handleDefault = XML_FALSE; - } - break; - case XML_ROLE_GROUP_SEQUENCE: - if (groupConnector[prologState.level] == ASCII_PIPE) - return XML_ERROR_SYNTAX; - groupConnector[prologState.level] = ASCII_COMMA; - if (dtd->in_eldecl && elementDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_GROUP_CHOICE: - if (groupConnector[prologState.level] == ASCII_COMMA) - return XML_ERROR_SYNTAX; - if (dtd->in_eldecl - && !groupConnector[prologState.level] - && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type - != XML_CTYPE_MIXED) - ) { - dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type - = XML_CTYPE_CHOICE; - if (elementDeclHandler) - handleDefault = XML_FALSE; - } - groupConnector[prologState.level] = ASCII_PIPE; - break; - case XML_ROLE_PARAM_ENTITY_REF: -#ifdef XML_DTD - case XML_ROLE_INNER_PARAM_ENTITY_REF: - dtd->hasParamEntityRefs = XML_TRUE; - if (!paramEntityParsing) - dtd->keepProcessing = dtd->standalone; - else { - const XML_Char *name; - ENTITY *entity; - name = poolStoreString(&dtd->pool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!name) - return XML_ERROR_NO_MEMORY; - entity = (ENTITY *)lookup(&dtd->paramEntities, name, 0); - poolDiscard(&dtd->pool); - /* first, determine if a check for an existing declaration is needed; - if yes, check that the entity exists, and that it is internal, - otherwise call the skipped entity handler - */ - if (prologState.documentEntity && - (dtd->standalone - ? !openInternalEntities - : !dtd->hasParamEntityRefs)) { - if (!entity) - return XML_ERROR_UNDEFINED_ENTITY; - else if (!entity->is_internal) - return XML_ERROR_ENTITY_DECLARED_IN_PE; - } - else if (!entity) { - dtd->keepProcessing = dtd->standalone; - /* cannot report skipped entities in declarations */ - if ((role == XML_ROLE_PARAM_ENTITY_REF) && skippedEntityHandler) { - skippedEntityHandler(handlerArg, name, 1); - handleDefault = XML_FALSE; - } - break; - } - if (entity->open) - return XML_ERROR_RECURSIVE_ENTITY_REF; - if (entity->textPtr) { - enum XML_Error result; - XML_Bool betweenDecl = - (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE); - result = processInternalEntity(parser, entity, betweenDecl); - if (result != XML_ERROR_NONE) - return result; - handleDefault = XML_FALSE; - break; - } - if (externalEntityRefHandler) { - dtd->paramEntityRead = XML_FALSE; - entity->open = XML_TRUE; - if (!externalEntityRefHandler(externalEntityRefHandlerArg, - 0, - entity->base, - entity->systemId, - entity->publicId)) { - entity->open = XML_FALSE; - return XML_ERROR_EXTERNAL_ENTITY_HANDLING; - } - entity->open = XML_FALSE; - handleDefault = XML_FALSE; - if (!dtd->paramEntityRead) { - dtd->keepProcessing = dtd->standalone; - break; - } - } - else { - dtd->keepProcessing = dtd->standalone; - break; - } - } -#endif /* XML_DTD */ - if (!dtd->standalone && - notStandaloneHandler && - !notStandaloneHandler(handlerArg)) - return XML_ERROR_NOT_STANDALONE; - break; - - /* Element declaration stuff */ - - case XML_ROLE_ELEMENT_NAME: - if (elementDeclHandler) { - declElementType = getElementType(parser, enc, s, next); - if (!declElementType) - return XML_ERROR_NO_MEMORY; - dtd->scaffLevel = 0; - dtd->scaffCount = 0; - dtd->in_eldecl = XML_TRUE; - handleDefault = XML_FALSE; - } - break; - - case XML_ROLE_CONTENT_ANY: - case XML_ROLE_CONTENT_EMPTY: - if (dtd->in_eldecl) { - if (elementDeclHandler) { - XML_Content * content = (XML_Content *) MALLOC(sizeof(XML_Content)); - if (!content) - return XML_ERROR_NO_MEMORY; - content->quant = XML_CQUANT_NONE; - content->name = NULL; - content->numchildren = 0; - content->children = NULL; - content->type = ((role == XML_ROLE_CONTENT_ANY) ? - XML_CTYPE_ANY : - XML_CTYPE_EMPTY); - *eventEndPP = s; - elementDeclHandler(handlerArg, declElementType->name, content); - handleDefault = XML_FALSE; - } - dtd->in_eldecl = XML_FALSE; - } - break; - - case XML_ROLE_CONTENT_PCDATA: - if (dtd->in_eldecl) { - dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type - = XML_CTYPE_MIXED; - if (elementDeclHandler) - handleDefault = XML_FALSE; - } - break; - - case XML_ROLE_CONTENT_ELEMENT: - quant = XML_CQUANT_NONE; - goto elementContent; - case XML_ROLE_CONTENT_ELEMENT_OPT: - quant = XML_CQUANT_OPT; - goto elementContent; - case XML_ROLE_CONTENT_ELEMENT_REP: - quant = XML_CQUANT_REP; - goto elementContent; - case XML_ROLE_CONTENT_ELEMENT_PLUS: - quant = XML_CQUANT_PLUS; - elementContent: - if (dtd->in_eldecl) { - ELEMENT_TYPE *el; - const XML_Char *name; - int nameLen; - const char *nxt = (quant == XML_CQUANT_NONE - ? next - : next - enc->minBytesPerChar); - int myindex = nextScaffoldPart(parser); - if (myindex < 0) - return XML_ERROR_NO_MEMORY; - dtd->scaffold[myindex].type = XML_CTYPE_NAME; - dtd->scaffold[myindex].quant = quant; - el = getElementType(parser, enc, s, nxt); - if (!el) - return XML_ERROR_NO_MEMORY; - name = el->name; - dtd->scaffold[myindex].name = name; - nameLen = 0; - for (; name[nameLen++]; ); - dtd->contentStringLen += nameLen; - if (elementDeclHandler) - handleDefault = XML_FALSE; - } - break; - - case XML_ROLE_GROUP_CLOSE: - quant = XML_CQUANT_NONE; - goto closeGroup; - case XML_ROLE_GROUP_CLOSE_OPT: - quant = XML_CQUANT_OPT; - goto closeGroup; - case XML_ROLE_GROUP_CLOSE_REP: - quant = XML_CQUANT_REP; - goto closeGroup; - case XML_ROLE_GROUP_CLOSE_PLUS: - quant = XML_CQUANT_PLUS; - closeGroup: - if (dtd->in_eldecl) { - if (elementDeclHandler) - handleDefault = XML_FALSE; - dtd->scaffLevel--; - dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant; - if (dtd->scaffLevel == 0) { - if (!handleDefault) { - XML_Content *model = build_model(parser); - if (!model) - return XML_ERROR_NO_MEMORY; - *eventEndPP = s; - elementDeclHandler(handlerArg, declElementType->name, model); - } - dtd->in_eldecl = XML_FALSE; - dtd->contentStringLen = 0; - } - } - break; - /* End element declaration stuff */ - - case XML_ROLE_PI: - if (!reportProcessingInstruction(parser, enc, s, next)) - return XML_ERROR_NO_MEMORY; - handleDefault = XML_FALSE; - break; - case XML_ROLE_COMMENT: - if (!reportComment(parser, enc, s, next)) - return XML_ERROR_NO_MEMORY; - handleDefault = XML_FALSE; - break; - case XML_ROLE_NONE: - switch (tok) { - case XML_TOK_BOM: - handleDefault = XML_FALSE; - break; - } - break; - case XML_ROLE_DOCTYPE_NONE: - if (startDoctypeDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_ENTITY_NONE: - if (dtd->keepProcessing && entityDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_NOTATION_NONE: - if (notationDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_ATTLIST_NONE: - if (dtd->keepProcessing && attlistDeclHandler) - handleDefault = XML_FALSE; - break; - case XML_ROLE_ELEMENT_NONE: - if (elementDeclHandler) - handleDefault = XML_FALSE; - break; - } /* end of big switch */ - - if (handleDefault && defaultHandler) - reportDefault(parser, enc, s, next); - - switch (ps_parsing) { - case XML_SUSPENDED: - *nextPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: - s = next; - tok = XmlPrologTok(enc, s, end, &next); - } - } - /* not reached */ -} - -static enum XML_Error PTRCALL -epilogProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - processor = epilogProcessor; - eventPtr = s; - for (;;) { - const char *next = NULL; - int tok = XmlPrologTok(encoding, s, end, &next); - eventEndPtr = next; - switch (tok) { - /* report partial linebreak - it might be the last token */ - case -XML_TOK_PROLOG_S: - if (defaultHandler) { - reportDefault(parser, encoding, s, next); - if (ps_parsing == XML_FINISHED) - return XML_ERROR_ABORTED; - } - *nextPtr = next; - return XML_ERROR_NONE; - case XML_TOK_NONE: - *nextPtr = s; - return XML_ERROR_NONE; - case XML_TOK_PROLOG_S: - if (defaultHandler) - reportDefault(parser, encoding, s, next); - break; - case XML_TOK_PI: - if (!reportProcessingInstruction(parser, encoding, s, next)) - return XML_ERROR_NO_MEMORY; - break; - case XML_TOK_COMMENT: - if (!reportComment(parser, encoding, s, next)) - return XML_ERROR_NO_MEMORY; - break; - case XML_TOK_INVALID: - eventPtr = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - if (!ps_finalBuffer) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_UNCLOSED_TOKEN; - case XML_TOK_PARTIAL_CHAR: - if (!ps_finalBuffer) { - *nextPtr = s; - return XML_ERROR_NONE; - } - return XML_ERROR_PARTIAL_CHAR; - default: - return XML_ERROR_JUNK_AFTER_DOC_ELEMENT; - } - eventPtr = s = next; - switch (ps_parsing) { - case XML_SUSPENDED: - *nextPtr = next; - return XML_ERROR_NONE; - case XML_FINISHED: - return XML_ERROR_ABORTED; - default: ; - } - } -} - -static enum XML_Error -processInternalEntity(XML_Parser parser, ENTITY *entity, - XML_Bool betweenDecl) -{ - const char *textStart, *textEnd; - const char *next; - enum XML_Error result; - OPEN_INTERNAL_ENTITY *openEntity; - - if (freeInternalEntities) { - openEntity = freeInternalEntities; - freeInternalEntities = openEntity->next; - } - else { - openEntity = (OPEN_INTERNAL_ENTITY *)MALLOC(sizeof(OPEN_INTERNAL_ENTITY)); - if (!openEntity) - return XML_ERROR_NO_MEMORY; - } - entity->open = XML_TRUE; - entity->processed = 0; - openEntity->next = openInternalEntities; - openInternalEntities = openEntity; - openEntity->entity = entity; - openEntity->startTagLevel = tagLevel; - openEntity->betweenDecl = betweenDecl; - openEntity->internalEventPtr = NULL; - openEntity->internalEventEndPtr = NULL; - textStart = (char *)entity->textPtr; - textEnd = (char *)(entity->textPtr + entity->textLen); - -#ifdef XML_DTD - if (entity->is_param) { - int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); - result = doProlog(parser, internalEncoding, textStart, textEnd, tok, - next, &next, XML_FALSE); - } - else -#endif /* XML_DTD */ - result = doContent(parser, tagLevel, internalEncoding, textStart, - textEnd, &next, XML_FALSE); - - if (result == XML_ERROR_NONE) { - if (textEnd != next && ps_parsing == XML_SUSPENDED) { - entity->processed = (int)(next - textStart); - processor = internalEntityProcessor; - } - else { - entity->open = XML_FALSE; - openInternalEntities = openEntity->next; - /* put openEntity back in list of free instances */ - openEntity->next = freeInternalEntities; - freeInternalEntities = openEntity; - } - } - return result; -} - -static enum XML_Error PTRCALL -internalEntityProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - ENTITY *entity; - const char *textStart, *textEnd; - const char *next; - enum XML_Error result; - OPEN_INTERNAL_ENTITY *openEntity = openInternalEntities; - if (!openEntity) - return XML_ERROR_UNEXPECTED_STATE; - - entity = openEntity->entity; - textStart = ((char *)entity->textPtr) + entity->processed; - textEnd = (char *)(entity->textPtr + entity->textLen); - -#ifdef XML_DTD - if (entity->is_param) { - int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); - result = doProlog(parser, internalEncoding, textStart, textEnd, tok, - next, &next, XML_FALSE); - } - else -#endif /* XML_DTD */ - result = doContent(parser, openEntity->startTagLevel, internalEncoding, - textStart, textEnd, &next, XML_FALSE); - - if (result != XML_ERROR_NONE) - return result; - else if (textEnd != next && ps_parsing == XML_SUSPENDED) { - entity->processed = (int)(next - (char *)entity->textPtr); - return result; - } - else { - entity->open = XML_FALSE; - openInternalEntities = openEntity->next; - /* put openEntity back in list of free instances */ - openEntity->next = freeInternalEntities; - freeInternalEntities = openEntity; - } - -#ifdef XML_DTD - if (entity->is_param) { - int tok; - processor = prologProcessor; - tok = XmlPrologTok(encoding, s, end, &next); - return doProlog(parser, encoding, s, end, tok, next, nextPtr, - (XML_Bool)!ps_finalBuffer); - } - else -#endif /* XML_DTD */ - { - processor = contentProcessor; - /* see externalEntityContentProcessor vs contentProcessor */ - return doContent(parser, parentParser ? 1 : 0, encoding, s, end, - nextPtr, (XML_Bool)!ps_finalBuffer); - } -} - -static enum XML_Error PTRCALL -errorProcessor(XML_Parser parser, - const char *s, - const char *end, - const char **nextPtr) -{ - return errorCode; -} - -static enum XML_Error -storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, - const char *ptr, const char *end, - STRING_POOL *pool) -{ - enum XML_Error result = appendAttributeValue(parser, enc, isCdata, ptr, - end, pool); - if (result) - return result; - if (!isCdata && poolLength(pool) && poolLastChar(pool) == 0x20) - poolChop(pool); - if (!poolAppendChar(pool, XML_T('\0'))) - return XML_ERROR_NO_MEMORY; - return XML_ERROR_NONE; -} - -static enum XML_Error -appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, - const char *ptr, const char *end, - STRING_POOL *pool) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - for (;;) { - const char *next; - int tok = XmlAttributeValueTok(enc, ptr, end, &next); - switch (tok) { - case XML_TOK_NONE: - return XML_ERROR_NONE; - case XML_TOK_INVALID: - if (enc == encoding) - eventPtr = next; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_PARTIAL: - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_INVALID_TOKEN; - case XML_TOK_CHAR_REF: - { - XML_Char buf[XML_ENCODE_MAX]; - int i; - int n = XmlCharRefNumber(enc, ptr); - if (n < 0) { - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_BAD_CHAR_REF; - } - if (!isCdata - && n == 0x20 /* space */ - && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20)) - break; - n = XmlEncode(n, (ICHAR *)buf); - if (!n) { - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_BAD_CHAR_REF; - } - for (i = 0; i < n; i++) { - if (!poolAppendChar(pool, buf[i])) - return XML_ERROR_NO_MEMORY; - } - } - break; - case XML_TOK_DATA_CHARS: - if (!poolAppend(pool, enc, ptr, next)) - return XML_ERROR_NO_MEMORY; - break; - case XML_TOK_TRAILING_CR: - next = ptr + enc->minBytesPerChar; - /* fall through */ - case XML_TOK_ATTRIBUTE_VALUE_S: - case XML_TOK_DATA_NEWLINE: - if (!isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20)) - break; - if (!poolAppendChar(pool, 0x20)) - return XML_ERROR_NO_MEMORY; - break; - case XML_TOK_ENTITY_REF: - { - const XML_Char *name; - ENTITY *entity; - char checkEntityDecl; - XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, - ptr + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (ch) { - if (!poolAppendChar(pool, ch)) - return XML_ERROR_NO_MEMORY; - break; - } - name = poolStoreString(&temp2Pool, enc, - ptr + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!name) - return XML_ERROR_NO_MEMORY; - entity = (ENTITY *)lookup(&dtd->generalEntities, name, 0); - poolDiscard(&temp2Pool); - /* First, determine if a check for an existing declaration is needed; - if yes, check that the entity exists, and that it is internal. - */ - if (pool == &dtd->pool) /* are we called from prolog? */ - checkEntityDecl = -#ifdef XML_DTD - prologState.documentEntity && -#endif /* XML_DTD */ - (dtd->standalone - ? !openInternalEntities - : !dtd->hasParamEntityRefs); - else /* if (pool == &tempPool): we are called from content */ - checkEntityDecl = !dtd->hasParamEntityRefs || dtd->standalone; - if (checkEntityDecl) { - if (!entity) - return XML_ERROR_UNDEFINED_ENTITY; - else if (!entity->is_internal) - return XML_ERROR_ENTITY_DECLARED_IN_PE; - } - else if (!entity) { - /* Cannot report skipped entity here - see comments on - skippedEntityHandler. - if (skippedEntityHandler) - skippedEntityHandler(handlerArg, name, 0); - */ - /* Cannot call the default handler because this would be - out of sync with the call to the startElementHandler. - if ((pool == &tempPool) && defaultHandler) - reportDefault(parser, enc, ptr, next); - */ - break; - } - if (entity->open) { - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_RECURSIVE_ENTITY_REF; - } - if (entity->notation) { - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_BINARY_ENTITY_REF; - } - if (!entity->textPtr) { - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF; - } - else { - enum XML_Error result; - const XML_Char *textEnd = entity->textPtr + entity->textLen; - entity->open = XML_TRUE; - result = appendAttributeValue(parser, internalEncoding, isCdata, - (char *)entity->textPtr, - (char *)textEnd, pool); - entity->open = XML_FALSE; - if (result) - return result; - } - } - break; - default: - if (enc == encoding) - eventPtr = ptr; - return XML_ERROR_UNEXPECTED_STATE; - } - ptr = next; - } - /* not reached */ -} - -static enum XML_Error -storeEntityValue(XML_Parser parser, - const ENCODING *enc, - const char *entityTextPtr, - const char *entityTextEnd) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - STRING_POOL *pool = &(dtd->entityValuePool); - enum XML_Error result = XML_ERROR_NONE; -#ifdef XML_DTD - int oldInEntityValue = prologState.inEntityValue; - prologState.inEntityValue = 1; -#endif /* XML_DTD */ - /* never return Null for the value argument in EntityDeclHandler, - since this would indicate an external entity; therefore we - have to make sure that entityValuePool.start is not null */ - if (!pool->blocks) { - if (!poolGrow(pool)) - return XML_ERROR_NO_MEMORY; - } - - for (;;) { - const char *next; - int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next); - switch (tok) { - case XML_TOK_PARAM_ENTITY_REF: -#ifdef XML_DTD - if (isParamEntity || enc != encoding) { - const XML_Char *name; - ENTITY *entity; - name = poolStoreString(&tempPool, enc, - entityTextPtr + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!name) { - result = XML_ERROR_NO_MEMORY; - goto endEntityValue; - } - entity = (ENTITY *)lookup(&dtd->paramEntities, name, 0); - poolDiscard(&tempPool); - if (!entity) { - /* not a well-formedness error - see XML 1.0: WFC Entity Declared */ - /* cannot report skipped entity here - see comments on - skippedEntityHandler - if (skippedEntityHandler) - skippedEntityHandler(handlerArg, name, 0); - */ - dtd->keepProcessing = dtd->standalone; - goto endEntityValue; - } - if (entity->open) { - if (enc == encoding) - eventPtr = entityTextPtr; - result = XML_ERROR_RECURSIVE_ENTITY_REF; - goto endEntityValue; - } - if (entity->systemId) { - if (externalEntityRefHandler) { - dtd->paramEntityRead = XML_FALSE; - entity->open = XML_TRUE; - if (!externalEntityRefHandler(externalEntityRefHandlerArg, - 0, - entity->base, - entity->systemId, - entity->publicId)) { - entity->open = XML_FALSE; - result = XML_ERROR_EXTERNAL_ENTITY_HANDLING; - goto endEntityValue; - } - entity->open = XML_FALSE; - if (!dtd->paramEntityRead) - dtd->keepProcessing = dtd->standalone; - } - else - dtd->keepProcessing = dtd->standalone; - } - else { - entity->open = XML_TRUE; - result = storeEntityValue(parser, - internalEncoding, - (char *)entity->textPtr, - (char *)(entity->textPtr - + entity->textLen)); - entity->open = XML_FALSE; - if (result) - goto endEntityValue; - } - break; - } -#endif /* XML_DTD */ - /* In the internal subset, PE references are not legal - within markup declarations, e.g entity values in this case. */ - eventPtr = entityTextPtr; - result = XML_ERROR_PARAM_ENTITY_REF; - goto endEntityValue; - case XML_TOK_NONE: - result = XML_ERROR_NONE; - goto endEntityValue; - case XML_TOK_ENTITY_REF: - case XML_TOK_DATA_CHARS: - if (!poolAppend(pool, enc, entityTextPtr, next)) { - result = XML_ERROR_NO_MEMORY; - goto endEntityValue; - } - break; - case XML_TOK_TRAILING_CR: - next = entityTextPtr + enc->minBytesPerChar; - /* fall through */ - case XML_TOK_DATA_NEWLINE: - if (pool->end == pool->ptr && !poolGrow(pool)) { - result = XML_ERROR_NO_MEMORY; - goto endEntityValue; - } - *(pool->ptr)++ = 0xA; - break; - case XML_TOK_CHAR_REF: - { - XML_Char buf[XML_ENCODE_MAX]; - int i; - int n = XmlCharRefNumber(enc, entityTextPtr); - if (n < 0) { - if (enc == encoding) - eventPtr = entityTextPtr; - result = XML_ERROR_BAD_CHAR_REF; - goto endEntityValue; - } - n = XmlEncode(n, (ICHAR *)buf); - if (!n) { - if (enc == encoding) - eventPtr = entityTextPtr; - result = XML_ERROR_BAD_CHAR_REF; - goto endEntityValue; - } - for (i = 0; i < n; i++) { - if (pool->end == pool->ptr && !poolGrow(pool)) { - result = XML_ERROR_NO_MEMORY; - goto endEntityValue; - } - *(pool->ptr)++ = buf[i]; - } - } - break; - case XML_TOK_PARTIAL: - if (enc == encoding) - eventPtr = entityTextPtr; - result = XML_ERROR_INVALID_TOKEN; - goto endEntityValue; - case XML_TOK_INVALID: - if (enc == encoding) - eventPtr = next; - result = XML_ERROR_INVALID_TOKEN; - goto endEntityValue; - default: - if (enc == encoding) - eventPtr = entityTextPtr; - result = XML_ERROR_UNEXPECTED_STATE; - goto endEntityValue; - } - entityTextPtr = next; - } -endEntityValue: -#ifdef XML_DTD - prologState.inEntityValue = oldInEntityValue; -#endif /* XML_DTD */ - return result; -} - -static void FASTCALL -normalizeLines(XML_Char *s) -{ - XML_Char *p; - for (;; s++) { - if (*s == XML_T('\0')) - return; - if (*s == 0xD) - break; - } - p = s; - do { - if (*s == 0xD) { - *p++ = 0xA; - if (*++s == 0xA) - s++; - } - else - *p++ = *s++; - } while (*s); - *p = XML_T('\0'); -} - -static int -reportProcessingInstruction(XML_Parser parser, const ENCODING *enc, - const char *start, const char *end) -{ - const XML_Char *target; - XML_Char *data; - const char *tem; - if (!processingInstructionHandler) { - if (defaultHandler) - reportDefault(parser, enc, start, end); - return 1; - } - start += enc->minBytesPerChar * 2; - tem = start + XmlNameLength(enc, start); - target = poolStoreString(&tempPool, enc, start, tem); - if (!target) - return 0; - poolFinish(&tempPool); - data = poolStoreString(&tempPool, enc, - XmlSkipS(enc, tem), - end - enc->minBytesPerChar*2); - if (!data) - return 0; - normalizeLines(data); - processingInstructionHandler(handlerArg, target, data); - poolClear(&tempPool); - return 1; -} - -static int -reportComment(XML_Parser parser, const ENCODING *enc, - const char *start, const char *end) -{ - XML_Char *data; - if (!commentHandler) { - if (defaultHandler) - reportDefault(parser, enc, start, end); - return 1; - } - data = poolStoreString(&tempPool, - enc, - start + enc->minBytesPerChar * 4, - end - enc->minBytesPerChar * 3); - if (!data) - return 0; - normalizeLines(data); - commentHandler(handlerArg, data); - poolClear(&tempPool); - return 1; -} - -static void -reportDefault(XML_Parser parser, const ENCODING *enc, - const char *s, const char *end) -{ - if (MUST_CONVERT(enc, s)) { - const char **eventPP; - const char **eventEndPP; - if (enc == encoding) { - eventPP = &eventPtr; - eventEndPP = &eventEndPtr; - } - else { - eventPP = &(openInternalEntities->internalEventPtr); - eventEndPP = &(openInternalEntities->internalEventEndPtr); - } - do { - ICHAR *dataPtr = (ICHAR *)dataBuf; - XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); - *eventEndPP = s; - defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); - *eventPP = s; - } while (s != end); - } - else - defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s)); -} - - -static int -defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata, - XML_Bool isId, const XML_Char *value, XML_Parser parser) -{ - DEFAULT_ATTRIBUTE *att; - if (value || isId) { - /* The handling of default attributes gets messed up if we have - a default which duplicates a non-default. */ - int i; - for (i = 0; i < type->nDefaultAtts; i++) - if (attId == type->defaultAtts[i].id) - return 1; - if (isId && !type->idAtt && !attId->xmlns) - type->idAtt = attId; - } - if (type->nDefaultAtts == type->allocDefaultAtts) { - if (type->allocDefaultAtts == 0) { - type->allocDefaultAtts = 8; - type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts - * sizeof(DEFAULT_ATTRIBUTE)); - if (!type->defaultAtts) - return 0; - } - else { - DEFAULT_ATTRIBUTE *temp; - int count = type->allocDefaultAtts * 2; - temp = (DEFAULT_ATTRIBUTE *) - REALLOC(type->defaultAtts, (count * sizeof(DEFAULT_ATTRIBUTE))); - if (temp == NULL) - return 0; - type->allocDefaultAtts = count; - type->defaultAtts = temp; - } - } - att = type->defaultAtts + type->nDefaultAtts; - att->id = attId; - att->value = value; - att->isCdata = isCdata; - if (!isCdata) - attId->maybeTokenized = XML_TRUE; - type->nDefaultAtts += 1; - return 1; -} - -static int -setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - const XML_Char *name; - for (name = elementType->name; *name; name++) { - if (*name == XML_T(ASCII_COLON)) { - PREFIX *prefix; - const XML_Char *s; - for (s = elementType->name; s != name; s++) { - if (!poolAppendChar(&dtd->pool, *s)) - return 0; - } - if (!poolAppendChar(&dtd->pool, XML_T('\0'))) - return 0; - prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&dtd->pool), - sizeof(PREFIX)); - if (!prefix) - return 0; - if (prefix->name == poolStart(&dtd->pool)) - poolFinish(&dtd->pool); - else - poolDiscard(&dtd->pool); - elementType->prefix = prefix; - - } - } - return 1; -} - -static ATTRIBUTE_ID * -getAttributeId(XML_Parser parser, const ENCODING *enc, - const char *start, const char *end) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - ATTRIBUTE_ID *id; - const XML_Char *name; - if (!poolAppendChar(&dtd->pool, XML_T('\0'))) - return NULL; - name = poolStoreString(&dtd->pool, enc, start, end); - if (!name) - return NULL; - /* skip quotation mark - its storage will be re-used (like in name[-1]) */ - ++name; - id = (ATTRIBUTE_ID *)lookup(&dtd->attributeIds, name, sizeof(ATTRIBUTE_ID)); - if (!id) - return NULL; - if (id->name != name) - poolDiscard(&dtd->pool); - else { - poolFinish(&dtd->pool); - if (!ns) - ; - else if (name[0] == XML_T(ASCII_x) - && name[1] == XML_T(ASCII_m) - && name[2] == XML_T(ASCII_l) - && name[3] == XML_T(ASCII_n) - && name[4] == XML_T(ASCII_s) - && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) { - if (name[5] == XML_T('\0')) - id->prefix = &dtd->defaultPrefix; - else - id->prefix = (PREFIX *)lookup(&dtd->prefixes, name + 6, sizeof(PREFIX)); - id->xmlns = XML_TRUE; - } - else { - int i; - for (i = 0; name[i]; i++) { - /* attributes without prefix are *not* in the default namespace */ - if (name[i] == XML_T(ASCII_COLON)) { - int j; - for (j = 0; j < i; j++) { - if (!poolAppendChar(&dtd->pool, name[j])) - return NULL; - } - if (!poolAppendChar(&dtd->pool, XML_T('\0'))) - return NULL; - id->prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&dtd->pool), - sizeof(PREFIX)); - if (id->prefix->name == poolStart(&dtd->pool)) - poolFinish(&dtd->pool); - else - poolDiscard(&dtd->pool); - break; - } - } - } - } - return id; -} - -#define CONTEXT_SEP XML_T(ASCII_FF) - -static const XML_Char * -getContext(XML_Parser parser) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - HASH_TABLE_ITER iter; - XML_Bool needSep = XML_FALSE; - - if (dtd->defaultPrefix.binding) { - int i; - int len; - if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) - return NULL; - len = dtd->defaultPrefix.binding->uriLen; - if (namespaceSeparator) - len--; - for (i = 0; i < len; i++) - if (!poolAppendChar(&tempPool, dtd->defaultPrefix.binding->uri[i])) - return NULL; - needSep = XML_TRUE; - } - - hashTableIterInit(&iter, &(dtd->prefixes)); - for (;;) { - int i; - int len; - const XML_Char *s; - PREFIX *prefix = (PREFIX *)hashTableIterNext(&iter); - if (!prefix) - break; - if (!prefix->binding) - continue; - if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP)) - return NULL; - for (s = prefix->name; *s; s++) - if (!poolAppendChar(&tempPool, *s)) - return NULL; - if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) - return NULL; - len = prefix->binding->uriLen; - if (namespaceSeparator) - len--; - for (i = 0; i < len; i++) - if (!poolAppendChar(&tempPool, prefix->binding->uri[i])) - return NULL; - needSep = XML_TRUE; - } - - - hashTableIterInit(&iter, &(dtd->generalEntities)); - for (;;) { - const XML_Char *s; - ENTITY *e = (ENTITY *)hashTableIterNext(&iter); - if (!e) - break; - if (!e->open) - continue; - if (needSep && !poolAppendChar(&tempPool, CONTEXT_SEP)) - return NULL; - for (s = e->name; *s; s++) - if (!poolAppendChar(&tempPool, *s)) - return 0; - needSep = XML_TRUE; - } - - if (!poolAppendChar(&tempPool, XML_T('\0'))) - return NULL; - return tempPool.start; -} - -static XML_Bool -setContext(XML_Parser parser, const XML_Char *context) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - const XML_Char *s = context; - - while (*context != XML_T('\0')) { - if (*s == CONTEXT_SEP || *s == XML_T('\0')) { - ENTITY *e; - if (!poolAppendChar(&tempPool, XML_T('\0'))) - return XML_FALSE; - e = (ENTITY *)lookup(&dtd->generalEntities, poolStart(&tempPool), 0); - if (e) - e->open = XML_TRUE; - if (*s != XML_T('\0')) - s++; - context = s; - poolDiscard(&tempPool); - } - else if (*s == XML_T(ASCII_EQUALS)) { - PREFIX *prefix; - if (poolLength(&tempPool) == 0) - prefix = &dtd->defaultPrefix; - else { - if (!poolAppendChar(&tempPool, XML_T('\0'))) - return XML_FALSE; - prefix = (PREFIX *)lookup(&dtd->prefixes, poolStart(&tempPool), - sizeof(PREFIX)); - if (!prefix) - return XML_FALSE; - if (prefix->name == poolStart(&tempPool)) { - prefix->name = poolCopyString(&dtd->pool, prefix->name); - if (!prefix->name) - return XML_FALSE; - } - poolDiscard(&tempPool); - } - for (context = s + 1; - *context != CONTEXT_SEP && *context != XML_T('\0'); - context++) - if (!poolAppendChar(&tempPool, *context)) - return XML_FALSE; - if (!poolAppendChar(&tempPool, XML_T('\0'))) - return XML_FALSE; - if (addBinding(parser, prefix, NULL, poolStart(&tempPool), - &inheritedBindings) != XML_ERROR_NONE) - return XML_FALSE; - poolDiscard(&tempPool); - if (*context != XML_T('\0')) - ++context; - s = context; - } - else { - if (!poolAppendChar(&tempPool, *s)) - return XML_FALSE; - s++; - } - } - return XML_TRUE; -} - -static void FASTCALL -normalizePublicId(XML_Char *publicId) -{ - XML_Char *p = publicId; - XML_Char *s; - for (s = publicId; *s; s++) { - switch (*s) { - case 0x20: - case 0xD: - case 0xA: - if (p != publicId && p[-1] != 0x20) - *p++ = 0x20; - break; - default: - *p++ = *s; - } - } - if (p != publicId && p[-1] == 0x20) - --p; - *p = XML_T('\0'); -} - -static DTD * -dtdCreate(const XML_Memory_Handling_Suite *ms) -{ - DTD *p = (DTD *)ms->malloc_fcn(sizeof(DTD)); - if (p == NULL) - return p; - poolInit(&(p->pool), ms); - poolInit(&(p->entityValuePool), ms); - hashTableInit(&(p->generalEntities), ms); - hashTableInit(&(p->elementTypes), ms); - hashTableInit(&(p->attributeIds), ms); - hashTableInit(&(p->prefixes), ms); -#ifdef XML_DTD - p->paramEntityRead = XML_FALSE; - hashTableInit(&(p->paramEntities), ms); -#endif /* XML_DTD */ - p->defaultPrefix.name = NULL; - p->defaultPrefix.binding = NULL; - - p->in_eldecl = XML_FALSE; - p->scaffIndex = NULL; - p->scaffold = NULL; - p->scaffLevel = 0; - p->scaffSize = 0; - p->scaffCount = 0; - p->contentStringLen = 0; - - p->keepProcessing = XML_TRUE; - p->hasParamEntityRefs = XML_FALSE; - p->standalone = XML_FALSE; - return p; -} - -static void -dtdReset(DTD *p, const XML_Memory_Handling_Suite *ms) -{ - HASH_TABLE_ITER iter; - hashTableIterInit(&iter, &(p->elementTypes)); - for (;;) { - ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); - if (!e) - break; - if (e->allocDefaultAtts != 0) - ms->free_fcn(e->defaultAtts); - } - hashTableClear(&(p->generalEntities)); -#ifdef XML_DTD - p->paramEntityRead = XML_FALSE; - hashTableClear(&(p->paramEntities)); -#endif /* XML_DTD */ - hashTableClear(&(p->elementTypes)); - hashTableClear(&(p->attributeIds)); - hashTableClear(&(p->prefixes)); - poolClear(&(p->pool)); - poolClear(&(p->entityValuePool)); - p->defaultPrefix.name = NULL; - p->defaultPrefix.binding = NULL; - - p->in_eldecl = XML_FALSE; - - ms->free_fcn(p->scaffIndex); - p->scaffIndex = NULL; - ms->free_fcn(p->scaffold); - p->scaffold = NULL; - - p->scaffLevel = 0; - p->scaffSize = 0; - p->scaffCount = 0; - p->contentStringLen = 0; - - p->keepProcessing = XML_TRUE; - p->hasParamEntityRefs = XML_FALSE; - p->standalone = XML_FALSE; -} - -static void -dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) -{ - HASH_TABLE_ITER iter; - hashTableIterInit(&iter, &(p->elementTypes)); - for (;;) { - ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); - if (!e) - break; - if (e->allocDefaultAtts != 0) - ms->free_fcn(e->defaultAtts); - } - hashTableDestroy(&(p->generalEntities)); -#ifdef XML_DTD - hashTableDestroy(&(p->paramEntities)); -#endif /* XML_DTD */ - hashTableDestroy(&(p->elementTypes)); - hashTableDestroy(&(p->attributeIds)); - hashTableDestroy(&(p->prefixes)); - poolDestroy(&(p->pool)); - poolDestroy(&(p->entityValuePool)); - if (isDocEntity) { - ms->free_fcn(p->scaffIndex); - ms->free_fcn(p->scaffold); - } - ms->free_fcn(p); -} - -/* Do a deep copy of the DTD. Return 0 for out of memory, non-zero otherwise. - The new DTD has already been initialized. -*/ -static int -dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms) -{ - HASH_TABLE_ITER iter; - - /* Copy the prefix table. */ - - hashTableIterInit(&iter, &(oldDtd->prefixes)); - for (;;) { - const XML_Char *name; - const PREFIX *oldP = (PREFIX *)hashTableIterNext(&iter); - if (!oldP) - break; - name = poolCopyString(&(newDtd->pool), oldP->name); - if (!name) - return 0; - if (!lookup(&(newDtd->prefixes), name, sizeof(PREFIX))) - return 0; - } - - hashTableIterInit(&iter, &(oldDtd->attributeIds)); - - /* Copy the attribute id table. */ - - for (;;) { - ATTRIBUTE_ID *newA; - const XML_Char *name; - const ATTRIBUTE_ID *oldA = (ATTRIBUTE_ID *)hashTableIterNext(&iter); - - if (!oldA) - break; - /* Remember to allocate the scratch byte before the name. */ - if (!poolAppendChar(&(newDtd->pool), XML_T('\0'))) - return 0; - name = poolCopyString(&(newDtd->pool), oldA->name); - if (!name) - return 0; - ++name; - newA = (ATTRIBUTE_ID *)lookup(&(newDtd->attributeIds), name, - sizeof(ATTRIBUTE_ID)); - if (!newA) - return 0; - newA->maybeTokenized = oldA->maybeTokenized; - if (oldA->prefix) { - newA->xmlns = oldA->xmlns; - if (oldA->prefix == &oldDtd->defaultPrefix) - newA->prefix = &newDtd->defaultPrefix; - else - newA->prefix = (PREFIX *)lookup(&(newDtd->prefixes), - oldA->prefix->name, 0); - } - } - - /* Copy the element type table. */ - - hashTableIterInit(&iter, &(oldDtd->elementTypes)); - - for (;;) { - int i; - ELEMENT_TYPE *newE; - const XML_Char *name; - const ELEMENT_TYPE *oldE = (ELEMENT_TYPE *)hashTableIterNext(&iter); - if (!oldE) - break; - name = poolCopyString(&(newDtd->pool), oldE->name); - if (!name) - return 0; - newE = (ELEMENT_TYPE *)lookup(&(newDtd->elementTypes), name, - sizeof(ELEMENT_TYPE)); - if (!newE) - return 0; - if (oldE->nDefaultAtts) { - newE->defaultAtts = (DEFAULT_ATTRIBUTE *) - ms->malloc_fcn(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); - if (!newE->defaultAtts) { - ms->free_fcn(newE); - return 0; - } - } - if (oldE->idAtt) - newE->idAtt = (ATTRIBUTE_ID *) - lookup(&(newDtd->attributeIds), oldE->idAtt->name, 0); - newE->allocDefaultAtts = newE->nDefaultAtts = oldE->nDefaultAtts; - if (oldE->prefix) - newE->prefix = (PREFIX *)lookup(&(newDtd->prefixes), - oldE->prefix->name, 0); - for (i = 0; i < newE->nDefaultAtts; i++) { - newE->defaultAtts[i].id = (ATTRIBUTE_ID *) - lookup(&(newDtd->attributeIds), oldE->defaultAtts[i].id->name, 0); - newE->defaultAtts[i].isCdata = oldE->defaultAtts[i].isCdata; - if (oldE->defaultAtts[i].value) { - newE->defaultAtts[i].value - = poolCopyString(&(newDtd->pool), oldE->defaultAtts[i].value); - if (!newE->defaultAtts[i].value) - return 0; - } - else - newE->defaultAtts[i].value = NULL; - } - } - - /* Copy the entity tables. */ - if (!copyEntityTable(&(newDtd->generalEntities), - &(newDtd->pool), - &(oldDtd->generalEntities))) - return 0; - -#ifdef XML_DTD - if (!copyEntityTable(&(newDtd->paramEntities), - &(newDtd->pool), - &(oldDtd->paramEntities))) - return 0; - newDtd->paramEntityRead = oldDtd->paramEntityRead; -#endif /* XML_DTD */ - - newDtd->keepProcessing = oldDtd->keepProcessing; - newDtd->hasParamEntityRefs = oldDtd->hasParamEntityRefs; - newDtd->standalone = oldDtd->standalone; - - /* Don't want deep copying for scaffolding */ - newDtd->in_eldecl = oldDtd->in_eldecl; - newDtd->scaffold = oldDtd->scaffold; - newDtd->contentStringLen = oldDtd->contentStringLen; - newDtd->scaffSize = oldDtd->scaffSize; - newDtd->scaffLevel = oldDtd->scaffLevel; - newDtd->scaffIndex = oldDtd->scaffIndex; - - return 1; -} /* End dtdCopy */ - -static int -copyEntityTable(HASH_TABLE *newTable, - STRING_POOL *newPool, - const HASH_TABLE *oldTable) -{ - HASH_TABLE_ITER iter; - const XML_Char *cachedOldBase = NULL; - const XML_Char *cachedNewBase = NULL; - - hashTableIterInit(&iter, oldTable); - - for (;;) { - ENTITY *newE; - const XML_Char *name; - const ENTITY *oldE = (ENTITY *)hashTableIterNext(&iter); - if (!oldE) - break; - name = poolCopyString(newPool, oldE->name); - if (!name) - return 0; - newE = (ENTITY *)lookup(newTable, name, sizeof(ENTITY)); - if (!newE) - return 0; - if (oldE->systemId) { - const XML_Char *tem = poolCopyString(newPool, oldE->systemId); - if (!tem) - return 0; - newE->systemId = tem; - if (oldE->base) { - if (oldE->base == cachedOldBase) - newE->base = cachedNewBase; - else { - cachedOldBase = oldE->base; - tem = poolCopyString(newPool, cachedOldBase); - if (!tem) - return 0; - cachedNewBase = newE->base = tem; - } - } - if (oldE->publicId) { - tem = poolCopyString(newPool, oldE->publicId); - if (!tem) - return 0; - newE->publicId = tem; - } - } - else { - const XML_Char *tem = poolCopyStringN(newPool, oldE->textPtr, - oldE->textLen); - if (!tem) - return 0; - newE->textPtr = tem; - newE->textLen = oldE->textLen; - } - if (oldE->notation) { - const XML_Char *tem = poolCopyString(newPool, oldE->notation); - if (!tem) - return 0; - newE->notation = tem; - } - newE->is_param = oldE->is_param; - newE->is_internal = oldE->is_internal; - } - return 1; -} - -#define INIT_POWER 6 - -static XML_Bool FASTCALL -keyeq(KEY s1, KEY s2) -{ - for (; *s1 == *s2; s1++, s2++) - if (*s1 == 0) - return XML_TRUE; - return XML_FALSE; -} - -static unsigned long FASTCALL -hash(KEY s) -{ - unsigned long h = 0; - while (*s) - h = CHAR_HASH(h, *s++); - return h; -} - -static NAMED * -lookup(HASH_TABLE *table, KEY name, size_t createSize) -{ - size_t i; - if (table->size == 0) { - size_t tsize; - if (!createSize) - return NULL; - table->power = INIT_POWER; - /* table->size is a power of 2 */ - table->size = (size_t)1 << INIT_POWER; - tsize = table->size * sizeof(NAMED *); - table->v = (NAMED **)table->mem->malloc_fcn(tsize); - if (!table->v) { - table->size = 0; - return NULL; - } - memset(table->v, 0, tsize); - i = hash(name) & ((unsigned long)table->size - 1); - } - else { - unsigned long h = hash(name); - unsigned long mask = (unsigned long)table->size - 1; - unsigned char step = 0; - i = h & mask; - while (table->v[i]) { - if (keyeq(name, table->v[i]->name)) - return table->v[i]; - if (!step) - step = PROBE_STEP(h, mask, table->power); - i < step ? (i += table->size - step) : (i -= step); - } - if (!createSize) - return NULL; - - /* check for overflow (table is half full) */ - if (table->used >> (table->power - 1)) { - unsigned char newPower = table->power + 1; - size_t newSize = (size_t)1 << newPower; - unsigned long newMask = (unsigned long)newSize - 1; - size_t tsize = newSize * sizeof(NAMED *); - NAMED **newV = (NAMED **)table->mem->malloc_fcn(tsize); - if (!newV) - return NULL; - memset(newV, 0, tsize); - for (i = 0; i < table->size; i++) - if (table->v[i]) { - unsigned long newHash = hash(table->v[i]->name); - size_t j = newHash & newMask; - step = 0; - while (newV[j]) { - if (!step) - step = PROBE_STEP(newHash, newMask, newPower); - j < step ? (j += newSize - step) : (j -= step); - } - newV[j] = table->v[i]; - } - table->mem->free_fcn(table->v); - table->v = newV; - table->power = newPower; - table->size = newSize; - i = h & newMask; - step = 0; - while (table->v[i]) { - if (!step) - step = PROBE_STEP(h, newMask, newPower); - i < step ? (i += newSize - step) : (i -= step); - } - } - } - table->v[i] = (NAMED *)table->mem->malloc_fcn(createSize); - if (!table->v[i]) - return NULL; - memset(table->v[i], 0, createSize); - table->v[i]->name = name; - (table->used)++; - return table->v[i]; -} - -static void FASTCALL -hashTableClear(HASH_TABLE *table) -{ - size_t i; - for (i = 0; i < table->size; i++) { - table->mem->free_fcn(table->v[i]); - table->v[i] = NULL; - } - table->used = 0; -} - -static void FASTCALL -hashTableDestroy(HASH_TABLE *table) -{ - size_t i; - for (i = 0; i < table->size; i++) - table->mem->free_fcn(table->v[i]); - table->mem->free_fcn(table->v); -} - -static void FASTCALL -hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) -{ - p->power = 0; - p->size = 0; - p->used = 0; - p->v = NULL; - p->mem = ms; -} - -static void FASTCALL -hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) -{ - iter->p = table->v; - iter->end = iter->p + table->size; -} - -static NAMED * FASTCALL -hashTableIterNext(HASH_TABLE_ITER *iter) -{ - while (iter->p != iter->end) { - NAMED *tem = *(iter->p)++; - if (tem) - return tem; - } - return NULL; -} - -static void FASTCALL -poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) -{ - pool->blocks = NULL; - pool->freeBlocks = NULL; - pool->start = NULL; - pool->ptr = NULL; - pool->end = NULL; - pool->mem = ms; -} - -static void FASTCALL -poolClear(STRING_POOL *pool) -{ - if (!pool->freeBlocks) - pool->freeBlocks = pool->blocks; - else { - BLOCK *p = pool->blocks; - while (p) { - BLOCK *tem = p->next; - p->next = pool->freeBlocks; - pool->freeBlocks = p; - p = tem; - } - } - pool->blocks = NULL; - pool->start = NULL; - pool->ptr = NULL; - pool->end = NULL; -} - -static void FASTCALL -poolDestroy(STRING_POOL *pool) -{ - BLOCK *p = pool->blocks; - while (p) { - BLOCK *tem = p->next; - pool->mem->free_fcn(p); - p = tem; - } - p = pool->freeBlocks; - while (p) { - BLOCK *tem = p->next; - pool->mem->free_fcn(p); - p = tem; - } -} - -static XML_Char * -poolAppend(STRING_POOL *pool, const ENCODING *enc, - const char *ptr, const char *end) -{ - if (!pool->ptr && !poolGrow(pool)) - return NULL; - for (;;) { - XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); - if (ptr == end) - break; - if (!poolGrow(pool)) - return NULL; - } - return pool->start; -} - -static const XML_Char * FASTCALL -poolCopyString(STRING_POOL *pool, const XML_Char *s) -{ - do { - if (!poolAppendChar(pool, *s)) - return NULL; - } while (*s++); - s = pool->start; - poolFinish(pool); - return s; -} - -static const XML_Char * -poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n) -{ - if (!pool->ptr && !poolGrow(pool)) - return NULL; - for (; n > 0; --n, s++) { - if (!poolAppendChar(pool, *s)) - return NULL; - } - s = pool->start; - poolFinish(pool); - return s; -} - -static const XML_Char * FASTCALL -poolAppendString(STRING_POOL *pool, const XML_Char *s) -{ - while (*s) { - if (!poolAppendChar(pool, *s)) - return NULL; - s++; - } - return pool->start; -} - -static XML_Char * -poolStoreString(STRING_POOL *pool, const ENCODING *enc, - const char *ptr, const char *end) -{ - if (!poolAppend(pool, enc, ptr, end)) - return NULL; - if (pool->ptr == pool->end && !poolGrow(pool)) - return NULL; - *(pool->ptr)++ = 0; - return pool->start; -} - -static XML_Bool FASTCALL -poolGrow(STRING_POOL *pool) -{ - if (pool->freeBlocks) { - if (pool->start == 0) { - pool->blocks = pool->freeBlocks; - pool->freeBlocks = pool->freeBlocks->next; - pool->blocks->next = NULL; - pool->start = pool->blocks->s; - pool->end = pool->start + pool->blocks->size; - pool->ptr = pool->start; - return XML_TRUE; - } - if (pool->end - pool->start < pool->freeBlocks->size) { - BLOCK *tem = pool->freeBlocks->next; - pool->freeBlocks->next = pool->blocks; - pool->blocks = pool->freeBlocks; - pool->freeBlocks = tem; - memcpy(pool->blocks->s, pool->start, - (pool->end - pool->start) * sizeof(XML_Char)); - pool->ptr = pool->blocks->s + (pool->ptr - pool->start); - pool->start = pool->blocks->s; - pool->end = pool->start + pool->blocks->size; - return XML_TRUE; - } - } - if (pool->blocks && pool->start == pool->blocks->s) { - int blockSize = (int)(pool->end - pool->start)*2; - pool->blocks = (BLOCK *) - pool->mem->realloc_fcn(pool->blocks, - (offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char))); - if (pool->blocks == NULL) - return XML_FALSE; - pool->blocks->size = blockSize; - pool->ptr = pool->blocks->s + (pool->ptr - pool->start); - pool->start = pool->blocks->s; - pool->end = pool->start + blockSize; - } - else { - BLOCK *tem; - int blockSize = (int)(pool->end - pool->start); - if (blockSize < INIT_BLOCK_SIZE) - blockSize = INIT_BLOCK_SIZE; - else - blockSize *= 2; - tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char)); - if (!tem) - return XML_FALSE; - tem->size = blockSize; - tem->next = pool->blocks; - pool->blocks = tem; - if (pool->ptr != pool->start) - memcpy(tem->s, pool->start, - (pool->ptr - pool->start) * sizeof(XML_Char)); - pool->ptr = tem->s + (pool->ptr - pool->start); - pool->start = tem->s; - pool->end = tem->s + blockSize; - } - return XML_TRUE; -} - -static int FASTCALL -nextScaffoldPart(XML_Parser parser) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - CONTENT_SCAFFOLD * me; - int next; - - if (!dtd->scaffIndex) { - dtd->scaffIndex = (int *)MALLOC(groupSize * sizeof(int)); - if (!dtd->scaffIndex) - return -1; - dtd->scaffIndex[0] = 0; - } - - if (dtd->scaffCount >= dtd->scaffSize) { - CONTENT_SCAFFOLD *temp; - if (dtd->scaffold) { - temp = (CONTENT_SCAFFOLD *) - REALLOC(dtd->scaffold, dtd->scaffSize * 2 * sizeof(CONTENT_SCAFFOLD)); - if (temp == NULL) - return -1; - dtd->scaffSize *= 2; - } - else { - temp = (CONTENT_SCAFFOLD *)MALLOC(INIT_SCAFFOLD_ELEMENTS - * sizeof(CONTENT_SCAFFOLD)); - if (temp == NULL) - return -1; - dtd->scaffSize = INIT_SCAFFOLD_ELEMENTS; - } - dtd->scaffold = temp; - } - next = dtd->scaffCount++; - me = &dtd->scaffold[next]; - if (dtd->scaffLevel) { - CONTENT_SCAFFOLD *parent = &dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel-1]]; - if (parent->lastchild) { - dtd->scaffold[parent->lastchild].nextsib = next; - } - if (!parent->childcnt) - parent->firstchild = next; - parent->lastchild = next; - parent->childcnt++; - } - me->firstchild = me->lastchild = me->childcnt = me->nextsib = 0; - return next; -} - -static void -build_node(XML_Parser parser, - int src_node, - XML_Content *dest, - XML_Content **contpos, - XML_Char **strpos) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - dest->type = dtd->scaffold[src_node].type; - dest->quant = dtd->scaffold[src_node].quant; - if (dest->type == XML_CTYPE_NAME) { - const XML_Char *src; - dest->name = *strpos; - src = dtd->scaffold[src_node].name; - for (;;) { - *(*strpos)++ = *src; - if (!*src) - break; - src++; - } - dest->numchildren = 0; - dest->children = NULL; - } - else { - unsigned int i; - int cn; - dest->numchildren = dtd->scaffold[src_node].childcnt; - dest->children = *contpos; - *contpos += dest->numchildren; - for (i = 0, cn = dtd->scaffold[src_node].firstchild; - i < dest->numchildren; - i++, cn = dtd->scaffold[cn].nextsib) { - build_node(parser, cn, &(dest->children[i]), contpos, strpos); - } - dest->name = NULL; - } -} - -static XML_Content * -build_model (XML_Parser parser) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - XML_Content *ret; - XML_Content *cpos; - XML_Char * str; - int allocsize = (dtd->scaffCount * sizeof(XML_Content) - + (dtd->contentStringLen * sizeof(XML_Char))); - - ret = (XML_Content *)MALLOC(allocsize); - if (!ret) - return NULL; - - str = (XML_Char *) (&ret[dtd->scaffCount]); - cpos = &ret[1]; - - build_node(parser, 0, ret, &cpos, &str); - return ret; -} - -static ELEMENT_TYPE * -getElementType(XML_Parser parser, - const ENCODING *enc, - const char *ptr, - const char *end) -{ - DTD * const dtd = _dtd; /* save one level of indirection */ - const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end); - ELEMENT_TYPE *ret; - - if (!name) - return NULL; - ret = (ELEMENT_TYPE *) lookup(&dtd->elementTypes, name, sizeof(ELEMENT_TYPE)); - if (!ret) - return NULL; - if (ret->name != name) - poolDiscard(&dtd->pool); - else { - poolFinish(&dtd->pool); - if (!setElementTypePrefix(parser, ret)) - return NULL; - } - return ret; -} diff --git a/3rdparty/expat-2.0.1/lib/xmlrole.c b/3rdparty/expat-2.0.1/lib/xmlrole.c deleted file mode 100644 index 9c5e25b179..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmlrole.c +++ /dev/null @@ -1,1336 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include - -#ifdef COMPILED_FROM_DSP -#include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos4__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" -#else -#ifdef HAVE_EXPAT_CONFIG_H -#include -#endif -#endif /* ndef COMPILED_FROM_DSP */ - -#include "expat_external.h" -#include "internal.h" -#include "xmlrole.h" -#include "ascii.h" - -/* Doesn't check: - - that ,| are not mixed in a model group - content of literals - -*/ - -static const char KW_ANY[] = { - ASCII_A, ASCII_N, ASCII_Y, '\0' }; -static const char KW_ATTLIST[] = { - ASCII_A, ASCII_T, ASCII_T, ASCII_L, ASCII_I, ASCII_S, ASCII_T, '\0' }; -static const char KW_CDATA[] = { - ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; -static const char KW_DOCTYPE[] = { - ASCII_D, ASCII_O, ASCII_C, ASCII_T, ASCII_Y, ASCII_P, ASCII_E, '\0' }; -static const char KW_ELEMENT[] = { - ASCII_E, ASCII_L, ASCII_E, ASCII_M, ASCII_E, ASCII_N, ASCII_T, '\0' }; -static const char KW_EMPTY[] = { - ASCII_E, ASCII_M, ASCII_P, ASCII_T, ASCII_Y, '\0' }; -static const char KW_ENTITIES[] = { - ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_I, ASCII_E, ASCII_S, - '\0' }; -static const char KW_ENTITY[] = { - ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0' }; -static const char KW_FIXED[] = { - ASCII_F, ASCII_I, ASCII_X, ASCII_E, ASCII_D, '\0' }; -static const char KW_ID[] = { - ASCII_I, ASCII_D, '\0' }; -static const char KW_IDREF[] = { - ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0' }; -static const char KW_IDREFS[] = { - ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0' }; -#ifdef XML_DTD -static const char KW_IGNORE[] = { - ASCII_I, ASCII_G, ASCII_N, ASCII_O, ASCII_R, ASCII_E, '\0' }; -#endif -static const char KW_IMPLIED[] = { - ASCII_I, ASCII_M, ASCII_P, ASCII_L, ASCII_I, ASCII_E, ASCII_D, '\0' }; -#ifdef XML_DTD -static const char KW_INCLUDE[] = { - ASCII_I, ASCII_N, ASCII_C, ASCII_L, ASCII_U, ASCII_D, ASCII_E, '\0' }; -#endif -static const char KW_NDATA[] = { - ASCII_N, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; -static const char KW_NMTOKEN[] = { - ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0' }; -static const char KW_NMTOKENS[] = { - ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, ASCII_S, - '\0' }; -static const char KW_NOTATION[] = - { ASCII_N, ASCII_O, ASCII_T, ASCII_A, ASCII_T, ASCII_I, ASCII_O, ASCII_N, - '\0' }; -static const char KW_PCDATA[] = { - ASCII_P, ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; -static const char KW_PUBLIC[] = { - ASCII_P, ASCII_U, ASCII_B, ASCII_L, ASCII_I, ASCII_C, '\0' }; -static const char KW_REQUIRED[] = { - ASCII_R, ASCII_E, ASCII_Q, ASCII_U, ASCII_I, ASCII_R, ASCII_E, ASCII_D, - '\0' }; -static const char KW_SYSTEM[] = { - ASCII_S, ASCII_Y, ASCII_S, ASCII_T, ASCII_E, ASCII_M, '\0' }; - -#ifndef MIN_BYTES_PER_CHAR -#define MIN_BYTES_PER_CHAR(enc) ((enc)->minBytesPerChar) -#endif - -#ifdef XML_DTD -#define setTopLevel(state) \ - ((state)->handler = ((state)->documentEntity \ - ? internalSubset \ - : externalSubset1)) -#else /* not XML_DTD */ -#define setTopLevel(state) ((state)->handler = internalSubset) -#endif /* not XML_DTD */ - -typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc); - -static PROLOG_HANDLER - prolog0, prolog1, prolog2, - doctype0, doctype1, doctype2, doctype3, doctype4, doctype5, - internalSubset, - entity0, entity1, entity2, entity3, entity4, entity5, entity6, - entity7, entity8, entity9, entity10, - notation0, notation1, notation2, notation3, notation4, - attlist0, attlist1, attlist2, attlist3, attlist4, attlist5, attlist6, - attlist7, attlist8, attlist9, - element0, element1, element2, element3, element4, element5, element6, - element7, -#ifdef XML_DTD - externalSubset0, externalSubset1, - condSect0, condSect1, condSect2, -#endif /* XML_DTD */ - declClose, - error; - -static int FASTCALL common(PROLOG_STATE *state, int tok); - -static int PTRCALL -prolog0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - state->handler = prolog1; - return XML_ROLE_NONE; - case XML_TOK_XML_DECL: - state->handler = prolog1; - return XML_ROLE_XML_DECL; - case XML_TOK_PI: - state->handler = prolog1; - return XML_ROLE_PI; - case XML_TOK_COMMENT: - state->handler = prolog1; - return XML_ROLE_COMMENT; - case XML_TOK_BOM: - return XML_ROLE_NONE; - case XML_TOK_DECL_OPEN: - if (!XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_DOCTYPE)) - break; - state->handler = doctype0; - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_INSTANCE_START: - state->handler = error; - return XML_ROLE_INSTANCE_START; - } - return common(state, tok); -} - -static int PTRCALL -prolog1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_PI: - return XML_ROLE_PI; - case XML_TOK_COMMENT: - return XML_ROLE_COMMENT; - case XML_TOK_BOM: - return XML_ROLE_NONE; - case XML_TOK_DECL_OPEN: - if (!XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_DOCTYPE)) - break; - state->handler = doctype0; - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_INSTANCE_START: - state->handler = error; - return XML_ROLE_INSTANCE_START; - } - return common(state, tok); -} - -static int PTRCALL -prolog2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_PI: - return XML_ROLE_PI; - case XML_TOK_COMMENT: - return XML_ROLE_COMMENT; - case XML_TOK_INSTANCE_START: - state->handler = error; - return XML_ROLE_INSTANCE_START; - } - return common(state, tok); -} - -static int PTRCALL -doctype0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = doctype1; - return XML_ROLE_DOCTYPE_NAME; - } - return common(state, tok); -} - -static int PTRCALL -doctype1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_OPEN_BRACKET: - state->handler = internalSubset; - return XML_ROLE_DOCTYPE_INTERNAL_SUBSET; - case XML_TOK_DECL_CLOSE: - state->handler = prolog2; - return XML_ROLE_DOCTYPE_CLOSE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { - state->handler = doctype3; - return XML_ROLE_DOCTYPE_NONE; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { - state->handler = doctype2; - return XML_ROLE_DOCTYPE_NONE; - } - break; - } - return common(state, tok); -} - -static int PTRCALL -doctype2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_LITERAL: - state->handler = doctype3; - return XML_ROLE_DOCTYPE_PUBLIC_ID; - } - return common(state, tok); -} - -static int PTRCALL -doctype3(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_LITERAL: - state->handler = doctype4; - return XML_ROLE_DOCTYPE_SYSTEM_ID; - } - return common(state, tok); -} - -static int PTRCALL -doctype4(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_OPEN_BRACKET: - state->handler = internalSubset; - return XML_ROLE_DOCTYPE_INTERNAL_SUBSET; - case XML_TOK_DECL_CLOSE: - state->handler = prolog2; - return XML_ROLE_DOCTYPE_CLOSE; - } - return common(state, tok); -} - -static int PTRCALL -doctype5(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_DECL_CLOSE: - state->handler = prolog2; - return XML_ROLE_DOCTYPE_CLOSE; - } - return common(state, tok); -} - -static int PTRCALL -internalSubset(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_DECL_OPEN: - if (XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_ENTITY)) { - state->handler = entity0; - return XML_ROLE_ENTITY_NONE; - } - if (XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_ATTLIST)) { - state->handler = attlist0; - return XML_ROLE_ATTLIST_NONE; - } - if (XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_ELEMENT)) { - state->handler = element0; - return XML_ROLE_ELEMENT_NONE; - } - if (XmlNameMatchesAscii(enc, - ptr + 2 * MIN_BYTES_PER_CHAR(enc), - end, - KW_NOTATION)) { - state->handler = notation0; - return XML_ROLE_NOTATION_NONE; - } - break; - case XML_TOK_PI: - return XML_ROLE_PI; - case XML_TOK_COMMENT: - return XML_ROLE_COMMENT; - case XML_TOK_PARAM_ENTITY_REF: - return XML_ROLE_PARAM_ENTITY_REF; - case XML_TOK_CLOSE_BRACKET: - state->handler = doctype5; - return XML_ROLE_DOCTYPE_NONE; - case XML_TOK_NONE: - return XML_ROLE_NONE; - } - return common(state, tok); -} - -#ifdef XML_DTD - -static int PTRCALL -externalSubset0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - state->handler = externalSubset1; - if (tok == XML_TOK_XML_DECL) - return XML_ROLE_TEXT_DECL; - return externalSubset1(state, tok, ptr, end, enc); -} - -static int PTRCALL -externalSubset1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_COND_SECT_OPEN: - state->handler = condSect0; - return XML_ROLE_NONE; - case XML_TOK_COND_SECT_CLOSE: - if (state->includeLevel == 0) - break; - state->includeLevel -= 1; - return XML_ROLE_NONE; - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_CLOSE_BRACKET: - break; - case XML_TOK_NONE: - if (state->includeLevel) - break; - return XML_ROLE_NONE; - default: - return internalSubset(state, tok, ptr, end, enc); - } - return common(state, tok); -} - -#endif /* XML_DTD */ - -static int PTRCALL -entity0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_PERCENT: - state->handler = entity1; - return XML_ROLE_ENTITY_NONE; - case XML_TOK_NAME: - state->handler = entity2; - return XML_ROLE_GENERAL_ENTITY_NAME; - } - return common(state, tok); -} - -static int PTRCALL -entity1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_NAME: - state->handler = entity7; - return XML_ROLE_PARAM_ENTITY_NAME; - } - return common(state, tok); -} - -static int PTRCALL -entity2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { - state->handler = entity4; - return XML_ROLE_ENTITY_NONE; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { - state->handler = entity3; - return XML_ROLE_ENTITY_NONE; - } - break; - case XML_TOK_LITERAL: - state->handler = declClose; - state->role_none = XML_ROLE_ENTITY_NONE; - return XML_ROLE_ENTITY_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -entity3(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_LITERAL: - state->handler = entity4; - return XML_ROLE_ENTITY_PUBLIC_ID; - } - return common(state, tok); -} - -static int PTRCALL -entity4(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_LITERAL: - state->handler = entity5; - return XML_ROLE_ENTITY_SYSTEM_ID; - } - return common(state, tok); -} - -static int PTRCALL -entity5(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_DECL_CLOSE: - setTopLevel(state); - return XML_ROLE_ENTITY_COMPLETE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) { - state->handler = entity6; - return XML_ROLE_ENTITY_NONE; - } - break; - } - return common(state, tok); -} - -static int PTRCALL -entity6(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_NAME: - state->handler = declClose; - state->role_none = XML_ROLE_ENTITY_NONE; - return XML_ROLE_ENTITY_NOTATION_NAME; - } - return common(state, tok); -} - -static int PTRCALL -entity7(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { - state->handler = entity9; - return XML_ROLE_ENTITY_NONE; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { - state->handler = entity8; - return XML_ROLE_ENTITY_NONE; - } - break; - case XML_TOK_LITERAL: - state->handler = declClose; - state->role_none = XML_ROLE_ENTITY_NONE; - return XML_ROLE_ENTITY_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -entity8(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_LITERAL: - state->handler = entity9; - return XML_ROLE_ENTITY_PUBLIC_ID; - } - return common(state, tok); -} - -static int PTRCALL -entity9(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_LITERAL: - state->handler = entity10; - return XML_ROLE_ENTITY_SYSTEM_ID; - } - return common(state, tok); -} - -static int PTRCALL -entity10(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ENTITY_NONE; - case XML_TOK_DECL_CLOSE: - setTopLevel(state); - return XML_ROLE_ENTITY_COMPLETE; - } - return common(state, tok); -} - -static int PTRCALL -notation0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NOTATION_NONE; - case XML_TOK_NAME: - state->handler = notation1; - return XML_ROLE_NOTATION_NAME; - } - return common(state, tok); -} - -static int PTRCALL -notation1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NOTATION_NONE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) { - state->handler = notation3; - return XML_ROLE_NOTATION_NONE; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) { - state->handler = notation2; - return XML_ROLE_NOTATION_NONE; - } - break; - } - return common(state, tok); -} - -static int PTRCALL -notation2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NOTATION_NONE; - case XML_TOK_LITERAL: - state->handler = notation4; - return XML_ROLE_NOTATION_PUBLIC_ID; - } - return common(state, tok); -} - -static int PTRCALL -notation3(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NOTATION_NONE; - case XML_TOK_LITERAL: - state->handler = declClose; - state->role_none = XML_ROLE_NOTATION_NONE; - return XML_ROLE_NOTATION_SYSTEM_ID; - } - return common(state, tok); -} - -static int PTRCALL -notation4(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NOTATION_NONE; - case XML_TOK_LITERAL: - state->handler = declClose; - state->role_none = XML_ROLE_NOTATION_NONE; - return XML_ROLE_NOTATION_SYSTEM_ID; - case XML_TOK_DECL_CLOSE: - setTopLevel(state); - return XML_ROLE_NOTATION_NO_SYSTEM_ID; - } - return common(state, tok); -} - -static int PTRCALL -attlist0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = attlist1; - return XML_ROLE_ATTLIST_ELEMENT_NAME; - } - return common(state, tok); -} - -static int PTRCALL -attlist1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_DECL_CLOSE: - setTopLevel(state); - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = attlist2; - return XML_ROLE_ATTRIBUTE_NAME; - } - return common(state, tok); -} - -static int PTRCALL -attlist2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_NAME: - { - static const char * const types[] = { - KW_CDATA, - KW_ID, - KW_IDREF, - KW_IDREFS, - KW_ENTITY, - KW_ENTITIES, - KW_NMTOKEN, - KW_NMTOKENS, - }; - int i; - for (i = 0; i < (int)(sizeof(types)/sizeof(types[0])); i++) - if (XmlNameMatchesAscii(enc, ptr, end, types[i])) { - state->handler = attlist8; - return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i; - } - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) { - state->handler = attlist5; - return XML_ROLE_ATTLIST_NONE; - } - break; - case XML_TOK_OPEN_PAREN: - state->handler = attlist3; - return XML_ROLE_ATTLIST_NONE; - } - return common(state, tok); -} - -static int PTRCALL -attlist3(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_NMTOKEN: - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = attlist4; - return XML_ROLE_ATTRIBUTE_ENUM_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -attlist4(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_CLOSE_PAREN: - state->handler = attlist8; - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_OR: - state->handler = attlist3; - return XML_ROLE_ATTLIST_NONE; - } - return common(state, tok); -} - -static int PTRCALL -attlist5(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_OPEN_PAREN: - state->handler = attlist6; - return XML_ROLE_ATTLIST_NONE; - } - return common(state, tok); -} - -static int PTRCALL -attlist6(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_NAME: - state->handler = attlist7; - return XML_ROLE_ATTRIBUTE_NOTATION_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -attlist7(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_CLOSE_PAREN: - state->handler = attlist8; - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_OR: - state->handler = attlist6; - return XML_ROLE_ATTLIST_NONE; - } - return common(state, tok); -} - -/* default value */ -static int PTRCALL -attlist8(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_POUND_NAME: - if (XmlNameMatchesAscii(enc, - ptr + MIN_BYTES_PER_CHAR(enc), - end, - KW_IMPLIED)) { - state->handler = attlist1; - return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE; - } - if (XmlNameMatchesAscii(enc, - ptr + MIN_BYTES_PER_CHAR(enc), - end, - KW_REQUIRED)) { - state->handler = attlist1; - return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE; - } - if (XmlNameMatchesAscii(enc, - ptr + MIN_BYTES_PER_CHAR(enc), - end, - KW_FIXED)) { - state->handler = attlist9; - return XML_ROLE_ATTLIST_NONE; - } - break; - case XML_TOK_LITERAL: - state->handler = attlist1; - return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -attlist9(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ATTLIST_NONE; - case XML_TOK_LITERAL: - state->handler = attlist1; - return XML_ROLE_FIXED_ATTRIBUTE_VALUE; - } - return common(state, tok); -} - -static int PTRCALL -element0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = element1; - return XML_ROLE_ELEMENT_NAME; - } - return common(state, tok); -} - -static int PTRCALL -element1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - return XML_ROLE_CONTENT_EMPTY; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - return XML_ROLE_CONTENT_ANY; - } - break; - case XML_TOK_OPEN_PAREN: - state->handler = element2; - state->level = 1; - return XML_ROLE_GROUP_OPEN; - } - return common(state, tok); -} - -static int PTRCALL -element2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_POUND_NAME: - if (XmlNameMatchesAscii(enc, - ptr + MIN_BYTES_PER_CHAR(enc), - end, - KW_PCDATA)) { - state->handler = element3; - return XML_ROLE_CONTENT_PCDATA; - } - break; - case XML_TOK_OPEN_PAREN: - state->level = 2; - state->handler = element6; - return XML_ROLE_GROUP_OPEN; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT; - case XML_TOK_NAME_QUESTION: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_OPT; - case XML_TOK_NAME_ASTERISK: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_REP; - case XML_TOK_NAME_PLUS: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_PLUS; - } - return common(state, tok); -} - -static int PTRCALL -element3(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_CLOSE_PAREN: - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - return XML_ROLE_GROUP_CLOSE; - case XML_TOK_CLOSE_PAREN_ASTERISK: - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - return XML_ROLE_GROUP_CLOSE_REP; - case XML_TOK_OR: - state->handler = element4; - return XML_ROLE_ELEMENT_NONE; - } - return common(state, tok); -} - -static int PTRCALL -element4(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = element5; - return XML_ROLE_CONTENT_ELEMENT; - } - return common(state, tok); -} - -static int PTRCALL -element5(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_CLOSE_PAREN_ASTERISK: - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - return XML_ROLE_GROUP_CLOSE_REP; - case XML_TOK_OR: - state->handler = element4; - return XML_ROLE_ELEMENT_NONE; - } - return common(state, tok); -} - -static int PTRCALL -element6(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_OPEN_PAREN: - state->level += 1; - return XML_ROLE_GROUP_OPEN; - case XML_TOK_NAME: - case XML_TOK_PREFIXED_NAME: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT; - case XML_TOK_NAME_QUESTION: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_OPT; - case XML_TOK_NAME_ASTERISK: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_REP; - case XML_TOK_NAME_PLUS: - state->handler = element7; - return XML_ROLE_CONTENT_ELEMENT_PLUS; - } - return common(state, tok); -} - -static int PTRCALL -element7(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_ELEMENT_NONE; - case XML_TOK_CLOSE_PAREN: - state->level -= 1; - if (state->level == 0) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - } - return XML_ROLE_GROUP_CLOSE; - case XML_TOK_CLOSE_PAREN_ASTERISK: - state->level -= 1; - if (state->level == 0) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - } - return XML_ROLE_GROUP_CLOSE_REP; - case XML_TOK_CLOSE_PAREN_QUESTION: - state->level -= 1; - if (state->level == 0) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - } - return XML_ROLE_GROUP_CLOSE_OPT; - case XML_TOK_CLOSE_PAREN_PLUS: - state->level -= 1; - if (state->level == 0) { - state->handler = declClose; - state->role_none = XML_ROLE_ELEMENT_NONE; - } - return XML_ROLE_GROUP_CLOSE_PLUS; - case XML_TOK_COMMA: - state->handler = element6; - return XML_ROLE_GROUP_SEQUENCE; - case XML_TOK_OR: - state->handler = element6; - return XML_ROLE_GROUP_CHOICE; - } - return common(state, tok); -} - -#ifdef XML_DTD - -static int PTRCALL -condSect0(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_NAME: - if (XmlNameMatchesAscii(enc, ptr, end, KW_INCLUDE)) { - state->handler = condSect1; - return XML_ROLE_NONE; - } - if (XmlNameMatchesAscii(enc, ptr, end, KW_IGNORE)) { - state->handler = condSect2; - return XML_ROLE_NONE; - } - break; - } - return common(state, tok); -} - -static int PTRCALL -condSect1(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_OPEN_BRACKET: - state->handler = externalSubset1; - state->includeLevel += 1; - return XML_ROLE_NONE; - } - return common(state, tok); -} - -static int PTRCALL -condSect2(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return XML_ROLE_NONE; - case XML_TOK_OPEN_BRACKET: - state->handler = externalSubset1; - return XML_ROLE_IGNORE_SECT; - } - return common(state, tok); -} - -#endif /* XML_DTD */ - -static int PTRCALL -declClose(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - switch (tok) { - case XML_TOK_PROLOG_S: - return state->role_none; - case XML_TOK_DECL_CLOSE: - setTopLevel(state); - return state->role_none; - } - return common(state, tok); -} - -static int PTRCALL -error(PROLOG_STATE *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc) -{ - return XML_ROLE_NONE; -} - -static int FASTCALL -common(PROLOG_STATE *state, int tok) -{ -#ifdef XML_DTD - if (!state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) - return XML_ROLE_INNER_PARAM_ENTITY_REF; -#endif - state->handler = error; - return XML_ROLE_ERROR; -} - -void -XmlPrologStateInit(PROLOG_STATE *state) -{ - state->handler = prolog0; -#ifdef XML_DTD - state->documentEntity = 1; - state->includeLevel = 0; - state->inEntityValue = 0; -#endif /* XML_DTD */ -} - -#ifdef XML_DTD - -void -XmlPrologStateInitExternalEntity(PROLOG_STATE *state) -{ - state->handler = externalSubset0; - state->documentEntity = 0; - state->includeLevel = 0; -} - -#endif /* XML_DTD */ diff --git a/3rdparty/expat-2.0.1/lib/xmlrole.h b/3rdparty/expat-2.0.1/lib/xmlrole.h deleted file mode 100644 index 4dd9f06f97..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmlrole.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#ifndef XmlRole_INCLUDED -#define XmlRole_INCLUDED 1 - -#ifdef __VMS -/* 0 1 2 3 0 1 2 3 - 1234567890123456789012345678901 1234567890123456789012345678901 */ -#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt -#endif - -#include "xmltok.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - XML_ROLE_ERROR = -1, - XML_ROLE_NONE = 0, - XML_ROLE_XML_DECL, - XML_ROLE_INSTANCE_START, - XML_ROLE_DOCTYPE_NONE, - XML_ROLE_DOCTYPE_NAME, - XML_ROLE_DOCTYPE_SYSTEM_ID, - XML_ROLE_DOCTYPE_PUBLIC_ID, - XML_ROLE_DOCTYPE_INTERNAL_SUBSET, - XML_ROLE_DOCTYPE_CLOSE, - XML_ROLE_GENERAL_ENTITY_NAME, - XML_ROLE_PARAM_ENTITY_NAME, - XML_ROLE_ENTITY_NONE, - XML_ROLE_ENTITY_VALUE, - XML_ROLE_ENTITY_SYSTEM_ID, - XML_ROLE_ENTITY_PUBLIC_ID, - XML_ROLE_ENTITY_COMPLETE, - XML_ROLE_ENTITY_NOTATION_NAME, - XML_ROLE_NOTATION_NONE, - XML_ROLE_NOTATION_NAME, - XML_ROLE_NOTATION_SYSTEM_ID, - XML_ROLE_NOTATION_NO_SYSTEM_ID, - XML_ROLE_NOTATION_PUBLIC_ID, - XML_ROLE_ATTRIBUTE_NAME, - XML_ROLE_ATTRIBUTE_TYPE_CDATA, - XML_ROLE_ATTRIBUTE_TYPE_ID, - XML_ROLE_ATTRIBUTE_TYPE_IDREF, - XML_ROLE_ATTRIBUTE_TYPE_IDREFS, - XML_ROLE_ATTRIBUTE_TYPE_ENTITY, - XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, - XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, - XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, - XML_ROLE_ATTRIBUTE_ENUM_VALUE, - XML_ROLE_ATTRIBUTE_NOTATION_VALUE, - XML_ROLE_ATTLIST_NONE, - XML_ROLE_ATTLIST_ELEMENT_NAME, - XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, - XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, - XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, - XML_ROLE_FIXED_ATTRIBUTE_VALUE, - XML_ROLE_ELEMENT_NONE, - XML_ROLE_ELEMENT_NAME, - XML_ROLE_CONTENT_ANY, - XML_ROLE_CONTENT_EMPTY, - XML_ROLE_CONTENT_PCDATA, - XML_ROLE_GROUP_OPEN, - XML_ROLE_GROUP_CLOSE, - XML_ROLE_GROUP_CLOSE_REP, - XML_ROLE_GROUP_CLOSE_OPT, - XML_ROLE_GROUP_CLOSE_PLUS, - XML_ROLE_GROUP_CHOICE, - XML_ROLE_GROUP_SEQUENCE, - XML_ROLE_CONTENT_ELEMENT, - XML_ROLE_CONTENT_ELEMENT_REP, - XML_ROLE_CONTENT_ELEMENT_OPT, - XML_ROLE_CONTENT_ELEMENT_PLUS, - XML_ROLE_PI, - XML_ROLE_COMMENT, -#ifdef XML_DTD - XML_ROLE_TEXT_DECL, - XML_ROLE_IGNORE_SECT, - XML_ROLE_INNER_PARAM_ENTITY_REF, -#endif /* XML_DTD */ - XML_ROLE_PARAM_ENTITY_REF -}; - -typedef struct prolog_state { - int (PTRCALL *handler) (struct prolog_state *state, - int tok, - const char *ptr, - const char *end, - const ENCODING *enc); - unsigned level; - int role_none; -#ifdef XML_DTD - unsigned includeLevel; - int documentEntity; - int inEntityValue; -#endif /* XML_DTD */ -} PROLOG_STATE; - -void XmlPrologStateInit(PROLOG_STATE *); -#ifdef XML_DTD -void XmlPrologStateInitExternalEntity(PROLOG_STATE *); -#endif /* XML_DTD */ - -#define XmlTokenRole(state, tok, ptr, end, enc) \ - (((state)->handler)(state, tok, ptr, end, enc)) - -#ifdef __cplusplus -} -#endif - -#endif /* not XmlRole_INCLUDED */ diff --git a/3rdparty/expat-2.0.1/lib/xmltok.c b/3rdparty/expat-2.0.1/lib/xmltok.c deleted file mode 100644 index 22e25020e3..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmltok.c +++ /dev/null @@ -1,1651 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include - -#ifdef COMPILED_FROM_DSP -#include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos4__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" -#else -#ifdef HAVE_EXPAT_CONFIG_H -#include "expat_config.h" -#endif -#endif /* ndef COMPILED_FROM_DSP */ - -#include "expat_external.h" -#include "internal.h" -#include "xmltok.h" -#include "nametab.h" - -#ifdef XML_DTD -#define IGNORE_SECTION_TOK_VTABLE , PREFIX(ignoreSectionTok) -#else -#define IGNORE_SECTION_TOK_VTABLE /* as nothing */ -#endif - -#define VTABLE1 \ - { PREFIX(prologTok), PREFIX(contentTok), \ - PREFIX(cdataSectionTok) IGNORE_SECTION_TOK_VTABLE }, \ - { PREFIX(attributeValueTok), PREFIX(entityValueTok) }, \ - PREFIX(sameName), \ - PREFIX(nameMatchesAscii), \ - PREFIX(nameLength), \ - PREFIX(skipS), \ - PREFIX(getAtts), \ - PREFIX(charRefNumber), \ - PREFIX(predefinedEntityName), \ - PREFIX(updatePosition), \ - PREFIX(isPublicId) - -#define VTABLE VTABLE1, PREFIX(toUtf8), PREFIX(toUtf16) - -#define UCS2_GET_NAMING(pages, hi, lo) \ - (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) - -/* A 2 byte UTF-8 representation splits the characters 11 bits between - the bottom 5 and 6 bits of the bytes. We need 8 bits to index into - pages, 3 bits to add to that index and 5 bits to generate the mask. -*/ -#define UTF8_GET_NAMING2(pages, byte) \ - (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \ - + ((((byte)[0]) & 3) << 1) \ - + ((((byte)[1]) >> 5) & 1)] \ - & (1 << (((byte)[1]) & 0x1F))) - -/* A 3 byte UTF-8 representation splits the characters 16 bits between - the bottom 4, 6 and 6 bits of the bytes. We need 8 bits to index - into pages, 3 bits to add to that index and 5 bits to generate the - mask. -*/ -#define UTF8_GET_NAMING3(pages, byte) \ - (namingBitmap[((pages)[((((byte)[0]) & 0xF) << 4) \ - + ((((byte)[1]) >> 2) & 0xF)] \ - << 3) \ - + ((((byte)[1]) & 3) << 1) \ - + ((((byte)[2]) >> 5) & 1)] \ - & (1 << (((byte)[2]) & 0x1F))) - -#define UTF8_GET_NAMING(pages, p, n) \ - ((n) == 2 \ - ? UTF8_GET_NAMING2(pages, (const unsigned char *)(p)) \ - : ((n) == 3 \ - ? UTF8_GET_NAMING3(pages, (const unsigned char *)(p)) \ - : 0)) - -/* Detection of invalid UTF-8 sequences is based on Table 3.1B - of Unicode 3.2: http://www.unicode.org/unicode/reports/tr28/ - with the additional restriction of not allowing the Unicode - code points 0xFFFF and 0xFFFE (sequences EF,BF,BF and EF,BF,BE). - Implementation details: - (A & 0x80) == 0 means A < 0x80 - and - (A & 0xC0) == 0xC0 means A > 0xBF -*/ - -#define UTF8_INVALID2(p) \ - ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0) - -#define UTF8_INVALID3(p) \ - (((p)[2] & 0x80) == 0 \ - || \ - ((*p) == 0xEF && (p)[1] == 0xBF \ - ? \ - (p)[2] > 0xBD \ - : \ - ((p)[2] & 0xC0) == 0xC0) \ - || \ - ((*p) == 0xE0 \ - ? \ - (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0 \ - : \ - ((p)[1] & 0x80) == 0 \ - || \ - ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0))) - -#define UTF8_INVALID4(p) \ - (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 \ - || \ - ((p)[2] & 0x80) == 0 || ((p)[2] & 0xC0) == 0xC0 \ - || \ - ((*p) == 0xF0 \ - ? \ - (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0 \ - : \ - ((p)[1] & 0x80) == 0 \ - || \ - ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0))) - -static int PTRFASTCALL -isNever(const ENCODING *enc, const char *p) -{ - return 0; -} - -static int PTRFASTCALL -utf8_isName2(const ENCODING *enc, const char *p) -{ - return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); -} - -static int PTRFASTCALL -utf8_isName3(const ENCODING *enc, const char *p) -{ - return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); -} - -#define utf8_isName4 isNever - -static int PTRFASTCALL -utf8_isNmstrt2(const ENCODING *enc, const char *p) -{ - return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); -} - -static int PTRFASTCALL -utf8_isNmstrt3(const ENCODING *enc, const char *p) -{ - return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); -} - -#define utf8_isNmstrt4 isNever - -static int PTRFASTCALL -utf8_isInvalid2(const ENCODING *enc, const char *p) -{ - return UTF8_INVALID2((const unsigned char *)p); -} - -static int PTRFASTCALL -utf8_isInvalid3(const ENCODING *enc, const char *p) -{ - return UTF8_INVALID3((const unsigned char *)p); -} - -static int PTRFASTCALL -utf8_isInvalid4(const ENCODING *enc, const char *p) -{ - return UTF8_INVALID4((const unsigned char *)p); -} - -struct normal_encoding { - ENCODING enc; - unsigned char type[256]; -#ifdef XML_MIN_SIZE - int (PTRFASTCALL *byteType)(const ENCODING *, const char *); - int (PTRFASTCALL *isNameMin)(const ENCODING *, const char *); - int (PTRFASTCALL *isNmstrtMin)(const ENCODING *, const char *); - int (PTRFASTCALL *byteToAscii)(const ENCODING *, const char *); - int (PTRCALL *charMatches)(const ENCODING *, const char *, int); -#endif /* XML_MIN_SIZE */ - int (PTRFASTCALL *isName2)(const ENCODING *, const char *); - int (PTRFASTCALL *isName3)(const ENCODING *, const char *); - int (PTRFASTCALL *isName4)(const ENCODING *, const char *); - int (PTRFASTCALL *isNmstrt2)(const ENCODING *, const char *); - int (PTRFASTCALL *isNmstrt3)(const ENCODING *, const char *); - int (PTRFASTCALL *isNmstrt4)(const ENCODING *, const char *); - int (PTRFASTCALL *isInvalid2)(const ENCODING *, const char *); - int (PTRFASTCALL *isInvalid3)(const ENCODING *, const char *); - int (PTRFASTCALL *isInvalid4)(const ENCODING *, const char *); -}; - -#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *) (enc)) - -#ifdef XML_MIN_SIZE - -#define STANDARD_VTABLE(E) \ - E ## byteType, \ - E ## isNameMin, \ - E ## isNmstrtMin, \ - E ## byteToAscii, \ - E ## charMatches, - -#else - -#define STANDARD_VTABLE(E) /* as nothing */ - -#endif - -#define NORMAL_VTABLE(E) \ - E ## isName2, \ - E ## isName3, \ - E ## isName4, \ - E ## isNmstrt2, \ - E ## isNmstrt3, \ - E ## isNmstrt4, \ - E ## isInvalid2, \ - E ## isInvalid3, \ - E ## isInvalid4 - -static int FASTCALL checkCharRefNumber(int); - -#include "xmltok_impl.h" -#include "ascii.h" - -#ifdef XML_MIN_SIZE -#define sb_isNameMin isNever -#define sb_isNmstrtMin isNever -#endif - -#ifdef XML_MIN_SIZE -#define MINBPC(enc) ((enc)->minBytesPerChar) -#else -/* minimum bytes per character */ -#define MINBPC(enc) 1 -#endif - -#define SB_BYTE_TYPE(enc, p) \ - (((struct normal_encoding *)(enc))->type[(unsigned char)*(p)]) - -#ifdef XML_MIN_SIZE -static int PTRFASTCALL -sb_byteType(const ENCODING *enc, const char *p) -{ - return SB_BYTE_TYPE(enc, p); -} -#define BYTE_TYPE(enc, p) \ - (AS_NORMAL_ENCODING(enc)->byteType(enc, p)) -#else -#define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p) -#endif - -#ifdef XML_MIN_SIZE -#define BYTE_TO_ASCII(enc, p) \ - (AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p)) -static int PTRFASTCALL -sb_byteToAscii(const ENCODING *enc, const char *p) -{ - return *p; -} -#else -#define BYTE_TO_ASCII(enc, p) (*(p)) -#endif - -#define IS_NAME_CHAR(enc, p, n) \ - (AS_NORMAL_ENCODING(enc)->isName ## n(enc, p)) -#define IS_NMSTRT_CHAR(enc, p, n) \ - (AS_NORMAL_ENCODING(enc)->isNmstrt ## n(enc, p)) -#define IS_INVALID_CHAR(enc, p, n) \ - (AS_NORMAL_ENCODING(enc)->isInvalid ## n(enc, p)) - -#ifdef XML_MIN_SIZE -#define IS_NAME_CHAR_MINBPC(enc, p) \ - (AS_NORMAL_ENCODING(enc)->isNameMin(enc, p)) -#define IS_NMSTRT_CHAR_MINBPC(enc, p) \ - (AS_NORMAL_ENCODING(enc)->isNmstrtMin(enc, p)) -#else -#define IS_NAME_CHAR_MINBPC(enc, p) (0) -#define IS_NMSTRT_CHAR_MINBPC(enc, p) (0) -#endif - -#ifdef XML_MIN_SIZE -#define CHAR_MATCHES(enc, p, c) \ - (AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c)) -static int PTRCALL -sb_charMatches(const ENCODING *enc, const char *p, int c) -{ - return *p == c; -} -#else -/* c is an ASCII character */ -#define CHAR_MATCHES(enc, p, c) (*(p) == c) -#endif - -#define PREFIX(ident) normal_ ## ident -#define XML_TOK_IMPL_C -#include "xmltok_impl.c" -#undef XML_TOK_IMPL_C - -#undef MINBPC -#undef BYTE_TYPE -#undef BYTE_TO_ASCII -#undef CHAR_MATCHES -#undef IS_NAME_CHAR -#undef IS_NAME_CHAR_MINBPC -#undef IS_NMSTRT_CHAR -#undef IS_NMSTRT_CHAR_MINBPC -#undef IS_INVALID_CHAR - -enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */ - UTF8_cval1 = 0x00, - UTF8_cval2 = 0xc0, - UTF8_cval3 = 0xe0, - UTF8_cval4 = 0xf0 -}; - -static void PTRCALL -utf8_toUtf8(const ENCODING *enc, - const char **fromP, const char *fromLim, - char **toP, const char *toLim) -{ - char *to; - const char *from; - if (fromLim - *fromP > toLim - *toP) { - /* Avoid copying partial characters. */ - for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--) - if (((unsigned char)fromLim[-1] & 0xc0) != 0x80) - break; - } - for (to = *toP, from = *fromP; from != fromLim; from++, to++) - *to = *from; - *fromP = from; - *toP = to; -} - -static void PTRCALL -utf8_toUtf16(const ENCODING *enc, - const char **fromP, const char *fromLim, - unsigned short **toP, const unsigned short *toLim) -{ - unsigned short *to = *toP; - const char *from = *fromP; - while (from != fromLim && to != toLim) { - switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) { - case BT_LEAD2: - *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f)); - from += 2; - break; - case BT_LEAD3: - *to++ = (unsigned short)(((from[0] & 0xf) << 12) - | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f)); - from += 3; - break; - case BT_LEAD4: - { - unsigned long n; - if (to + 1 == toLim) - goto after; - n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12) - | ((from[2] & 0x3f) << 6) | (from[3] & 0x3f); - n -= 0x10000; - to[0] = (unsigned short)((n >> 10) | 0xD800); - to[1] = (unsigned short)((n & 0x3FF) | 0xDC00); - to += 2; - from += 4; - } - break; - default: - *to++ = *from++; - break; - } - } -after: - *fromP = from; - *toP = to; -} - -#ifdef XML_NS -static const struct normal_encoding utf8_encoding_ns = { - { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, - { -#include "asciitab.h" -#include "utf8tab.h" - }, - STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) -}; -#endif - -static const struct normal_encoding utf8_encoding = { - { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, - { -#define BT_COLON BT_NMSTRT -#include "asciitab.h" -#undef BT_COLON -#include "utf8tab.h" - }, - STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) -}; - -#ifdef XML_NS - -static const struct normal_encoding internal_utf8_encoding_ns = { - { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, - { -#include "iasciitab.h" -#include "utf8tab.h" - }, - STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) -}; - -#endif - -static const struct normal_encoding internal_utf8_encoding = { - { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 }, - { -#define BT_COLON BT_NMSTRT -#include "iasciitab.h" -#undef BT_COLON -#include "utf8tab.h" - }, - STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) -}; - -static void PTRCALL -latin1_toUtf8(const ENCODING *enc, - const char **fromP, const char *fromLim, - char **toP, const char *toLim) -{ - for (;;) { - unsigned char c; - if (*fromP == fromLim) - break; - c = (unsigned char)**fromP; - if (c & 0x80) { - if (toLim - *toP < 2) - break; - *(*toP)++ = (char)((c >> 6) | UTF8_cval2); - *(*toP)++ = (char)((c & 0x3f) | 0x80); - (*fromP)++; - } - else { - if (*toP == toLim) - break; - *(*toP)++ = *(*fromP)++; - } - } -} - -static void PTRCALL -latin1_toUtf16(const ENCODING *enc, - const char **fromP, const char *fromLim, - unsigned short **toP, const unsigned short *toLim) -{ - while (*fromP != fromLim && *toP != toLim) - *(*toP)++ = (unsigned char)*(*fromP)++; -} - -#ifdef XML_NS - -static const struct normal_encoding latin1_encoding_ns = { - { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 }, - { -#include "asciitab.h" -#include "latin1tab.h" - }, - STANDARD_VTABLE(sb_) -}; - -#endif - -static const struct normal_encoding latin1_encoding = { - { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 }, - { -#define BT_COLON BT_NMSTRT -#include "asciitab.h" -#undef BT_COLON -#include "latin1tab.h" - }, - STANDARD_VTABLE(sb_) -}; - -static void PTRCALL -ascii_toUtf8(const ENCODING *enc, - const char **fromP, const char *fromLim, - char **toP, const char *toLim) -{ - while (*fromP != fromLim && *toP != toLim) - *(*toP)++ = *(*fromP)++; -} - -#ifdef XML_NS - -static const struct normal_encoding ascii_encoding_ns = { - { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 }, - { -#include "asciitab.h" -/* BT_NONXML == 0 */ - }, - STANDARD_VTABLE(sb_) -}; - -#endif - -static const struct normal_encoding ascii_encoding = { - { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 }, - { -#define BT_COLON BT_NMSTRT -#include "asciitab.h" -#undef BT_COLON -/* BT_NONXML == 0 */ - }, - STANDARD_VTABLE(sb_) -}; - -static int PTRFASTCALL -unicode_byte_type(char hi, char lo) -{ - switch ((unsigned char)hi) { - case 0xD8: case 0xD9: case 0xDA: case 0xDB: - return BT_LEAD4; - case 0xDC: case 0xDD: case 0xDE: case 0xDF: - return BT_TRAIL; - case 0xFF: - switch ((unsigned char)lo) { - case 0xFF: - case 0xFE: - return BT_NONXML; - } - break; - } - return BT_NONASCII; -} - -#define DEFINE_UTF16_TO_UTF8(E) \ -static void PTRCALL \ -E ## toUtf8(const ENCODING *enc, \ - const char **fromP, const char *fromLim, \ - char **toP, const char *toLim) \ -{ \ - const char *from; \ - for (from = *fromP; from != fromLim; from += 2) { \ - int plane; \ - unsigned char lo2; \ - unsigned char lo = GET_LO(from); \ - unsigned char hi = GET_HI(from); \ - switch (hi) { \ - case 0: \ - if (lo < 0x80) { \ - if (*toP == toLim) { \ - *fromP = from; \ - return; \ - } \ - *(*toP)++ = lo; \ - break; \ - } \ - /* fall through */ \ - case 0x1: case 0x2: case 0x3: \ - case 0x4: case 0x5: case 0x6: case 0x7: \ - if (toLim - *toP < 2) { \ - *fromP = from; \ - return; \ - } \ - *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2); \ - *(*toP)++ = ((lo & 0x3f) | 0x80); \ - break; \ - default: \ - if (toLim - *toP < 3) { \ - *fromP = from; \ - return; \ - } \ - /* 16 bits divided 4, 6, 6 amongst 3 bytes */ \ - *(*toP)++ = ((hi >> 4) | UTF8_cval3); \ - *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80); \ - *(*toP)++ = ((lo & 0x3f) | 0x80); \ - break; \ - case 0xD8: case 0xD9: case 0xDA: case 0xDB: \ - if (toLim - *toP < 4) { \ - *fromP = from; \ - return; \ - } \ - plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \ - *(*toP)++ = ((plane >> 2) | UTF8_cval4); \ - *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80); \ - from += 2; \ - lo2 = GET_LO(from); \ - *(*toP)++ = (((lo & 0x3) << 4) \ - | ((GET_HI(from) & 0x3) << 2) \ - | (lo2 >> 6) \ - | 0x80); \ - *(*toP)++ = ((lo2 & 0x3f) | 0x80); \ - break; \ - } \ - } \ - *fromP = from; \ -} - -#define DEFINE_UTF16_TO_UTF16(E) \ -static void PTRCALL \ -E ## toUtf16(const ENCODING *enc, \ - const char **fromP, const char *fromLim, \ - unsigned short **toP, const unsigned short *toLim) \ -{ \ - /* Avoid copying first half only of surrogate */ \ - if (fromLim - *fromP > ((toLim - *toP) << 1) \ - && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \ - fromLim -= 2; \ - for (; *fromP != fromLim && *toP != toLim; *fromP += 2) \ - *(*toP)++ = (GET_HI(*fromP) << 8) | GET_LO(*fromP); \ -} - -#define SET2(ptr, ch) \ - (((ptr)[0] = ((ch) & 0xff)), ((ptr)[1] = ((ch) >> 8))) -#define GET_LO(ptr) ((unsigned char)(ptr)[0]) -#define GET_HI(ptr) ((unsigned char)(ptr)[1]) - -DEFINE_UTF16_TO_UTF8(little2_) -DEFINE_UTF16_TO_UTF16(little2_) - -#undef SET2 -#undef GET_LO -#undef GET_HI - -#define SET2(ptr, ch) \ - (((ptr)[0] = ((ch) >> 8)), ((ptr)[1] = ((ch) & 0xFF))) -#define GET_LO(ptr) ((unsigned char)(ptr)[1]) -#define GET_HI(ptr) ((unsigned char)(ptr)[0]) - -DEFINE_UTF16_TO_UTF8(big2_) -DEFINE_UTF16_TO_UTF16(big2_) - -#undef SET2 -#undef GET_LO -#undef GET_HI - -#define LITTLE2_BYTE_TYPE(enc, p) \ - ((p)[1] == 0 \ - ? ((struct normal_encoding *)(enc))->type[(unsigned char)*(p)] \ - : unicode_byte_type((p)[1], (p)[0])) -#define LITTLE2_BYTE_TO_ASCII(enc, p) ((p)[1] == 0 ? (p)[0] : -1) -#define LITTLE2_CHAR_MATCHES(enc, p, c) ((p)[1] == 0 && (p)[0] == c) -#define LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) \ - UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0]) -#define LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ - UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0]) - -#ifdef XML_MIN_SIZE - -static int PTRFASTCALL -little2_byteType(const ENCODING *enc, const char *p) -{ - return LITTLE2_BYTE_TYPE(enc, p); -} - -static int PTRFASTCALL -little2_byteToAscii(const ENCODING *enc, const char *p) -{ - return LITTLE2_BYTE_TO_ASCII(enc, p); -} - -static int PTRCALL -little2_charMatches(const ENCODING *enc, const char *p, int c) -{ - return LITTLE2_CHAR_MATCHES(enc, p, c); -} - -static int PTRFASTCALL -little2_isNameMin(const ENCODING *enc, const char *p) -{ - return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p); -} - -static int PTRFASTCALL -little2_isNmstrtMin(const ENCODING *enc, const char *p) -{ - return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p); -} - -#undef VTABLE -#define VTABLE VTABLE1, little2_toUtf8, little2_toUtf16 - -#else /* not XML_MIN_SIZE */ - -#undef PREFIX -#define PREFIX(ident) little2_ ## ident -#define MINBPC(enc) 2 -/* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */ -#define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p) -#define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p) -#define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c) -#define IS_NAME_CHAR(enc, p, n) 0 -#define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) -#define IS_NMSTRT_CHAR(enc, p, n) (0) -#define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) - -#define XML_TOK_IMPL_C -#include "xmltok_impl.c" -#undef XML_TOK_IMPL_C - -#undef MINBPC -#undef BYTE_TYPE -#undef BYTE_TO_ASCII -#undef CHAR_MATCHES -#undef IS_NAME_CHAR -#undef IS_NAME_CHAR_MINBPC -#undef IS_NMSTRT_CHAR -#undef IS_NMSTRT_CHAR_MINBPC -#undef IS_INVALID_CHAR - -#endif /* not XML_MIN_SIZE */ - -#ifdef XML_NS - -static const struct normal_encoding little2_encoding_ns = { - { VTABLE, 2, 0, -#if BYTEORDER == 1234 - 1 -#else - 0 -#endif - }, - { -#include "asciitab.h" -#include "latin1tab.h" - }, - STANDARD_VTABLE(little2_) -}; - -#endif - -static const struct normal_encoding little2_encoding = { - { VTABLE, 2, 0, -#if BYTEORDER == 1234 - 1 -#else - 0 -#endif - }, - { -#define BT_COLON BT_NMSTRT -#include "asciitab.h" -#undef BT_COLON -#include "latin1tab.h" - }, - STANDARD_VTABLE(little2_) -}; - -#if BYTEORDER != 4321 - -#ifdef XML_NS - -static const struct normal_encoding internal_little2_encoding_ns = { - { VTABLE, 2, 0, 1 }, - { -#include "iasciitab.h" -#include "latin1tab.h" - }, - STANDARD_VTABLE(little2_) -}; - -#endif - -static const struct normal_encoding internal_little2_encoding = { - { VTABLE, 2, 0, 1 }, - { -#define BT_COLON BT_NMSTRT -#include "iasciitab.h" -#undef BT_COLON -#include "latin1tab.h" - }, - STANDARD_VTABLE(little2_) -}; - -#endif - - -#define BIG2_BYTE_TYPE(enc, p) \ - ((p)[0] == 0 \ - ? ((struct normal_encoding *)(enc))->type[(unsigned char)(p)[1]] \ - : unicode_byte_type((p)[0], (p)[1])) -#define BIG2_BYTE_TO_ASCII(enc, p) ((p)[0] == 0 ? (p)[1] : -1) -#define BIG2_CHAR_MATCHES(enc, p, c) ((p)[0] == 0 && (p)[1] == c) -#define BIG2_IS_NAME_CHAR_MINBPC(enc, p) \ - UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1]) -#define BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) \ - UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1]) - -#ifdef XML_MIN_SIZE - -static int PTRFASTCALL -big2_byteType(const ENCODING *enc, const char *p) -{ - return BIG2_BYTE_TYPE(enc, p); -} - -static int PTRFASTCALL -big2_byteToAscii(const ENCODING *enc, const char *p) -{ - return BIG2_BYTE_TO_ASCII(enc, p); -} - -static int PTRCALL -big2_charMatches(const ENCODING *enc, const char *p, int c) -{ - return BIG2_CHAR_MATCHES(enc, p, c); -} - -static int PTRFASTCALL -big2_isNameMin(const ENCODING *enc, const char *p) -{ - return BIG2_IS_NAME_CHAR_MINBPC(enc, p); -} - -static int PTRFASTCALL -big2_isNmstrtMin(const ENCODING *enc, const char *p) -{ - return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p); -} - -#undef VTABLE -#define VTABLE VTABLE1, big2_toUtf8, big2_toUtf16 - -#else /* not XML_MIN_SIZE */ - -#undef PREFIX -#define PREFIX(ident) big2_ ## ident -#define MINBPC(enc) 2 -/* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */ -#define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p) -#define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p) -#define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c) -#define IS_NAME_CHAR(enc, p, n) 0 -#define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p) -#define IS_NMSTRT_CHAR(enc, p, n) (0) -#define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) - -#define XML_TOK_IMPL_C -#include "xmltok_impl.c" -#undef XML_TOK_IMPL_C - -#undef MINBPC -#undef BYTE_TYPE -#undef BYTE_TO_ASCII -#undef CHAR_MATCHES -#undef IS_NAME_CHAR -#undef IS_NAME_CHAR_MINBPC -#undef IS_NMSTRT_CHAR -#undef IS_NMSTRT_CHAR_MINBPC -#undef IS_INVALID_CHAR - -#endif /* not XML_MIN_SIZE */ - -#ifdef XML_NS - -static const struct normal_encoding big2_encoding_ns = { - { VTABLE, 2, 0, -#if BYTEORDER == 4321 - 1 -#else - 0 -#endif - }, - { -#include "asciitab.h" -#include "latin1tab.h" - }, - STANDARD_VTABLE(big2_) -}; - -#endif - -static const struct normal_encoding big2_encoding = { - { VTABLE, 2, 0, -#if BYTEORDER == 4321 - 1 -#else - 0 -#endif - }, - { -#define BT_COLON BT_NMSTRT -#include "asciitab.h" -#undef BT_COLON -#include "latin1tab.h" - }, - STANDARD_VTABLE(big2_) -}; - -#if BYTEORDER != 1234 - -#ifdef XML_NS - -static const struct normal_encoding internal_big2_encoding_ns = { - { VTABLE, 2, 0, 1 }, - { -#include "iasciitab.h" -#include "latin1tab.h" - }, - STANDARD_VTABLE(big2_) -}; - -#endif - -static const struct normal_encoding internal_big2_encoding = { - { VTABLE, 2, 0, 1 }, - { -#define BT_COLON BT_NMSTRT -#include "iasciitab.h" -#undef BT_COLON -#include "latin1tab.h" - }, - STANDARD_VTABLE(big2_) -}; - -#endif - -#undef PREFIX - -static int FASTCALL -streqci(const char *s1, const char *s2) -{ - for (;;) { - char c1 = *s1++; - char c2 = *s2++; - if (ASCII_a <= c1 && c1 <= ASCII_z) - c1 += ASCII_A - ASCII_a; - if (ASCII_a <= c2 && c2 <= ASCII_z) - c2 += ASCII_A - ASCII_a; - if (c1 != c2) - return 0; - if (!c1) - break; - } - return 1; -} - -static void PTRCALL -initUpdatePosition(const ENCODING *enc, const char *ptr, - const char *end, POSITION *pos) -{ - normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); -} - -static int -toAscii(const ENCODING *enc, const char *ptr, const char *end) -{ - char buf[1]; - char *p = buf; - XmlUtf8Convert(enc, &ptr, end, &p, p + 1); - if (p == buf) - return -1; - else - return buf[0]; -} - -static int FASTCALL -isSpace(int c) -{ - switch (c) { - case 0x20: - case 0xD: - case 0xA: - case 0x9: - return 1; - } - return 0; -} - -/* Return 1 if there's just optional white space or there's an S - followed by name=val. -*/ -static int -parsePseudoAttribute(const ENCODING *enc, - const char *ptr, - const char *end, - const char **namePtr, - const char **nameEndPtr, - const char **valPtr, - const char **nextTokPtr) -{ - int c; - char open; - if (ptr == end) { - *namePtr = NULL; - return 1; - } - if (!isSpace(toAscii(enc, ptr, end))) { - *nextTokPtr = ptr; - return 0; - } - do { - ptr += enc->minBytesPerChar; - } while (isSpace(toAscii(enc, ptr, end))); - if (ptr == end) { - *namePtr = NULL; - return 1; - } - *namePtr = ptr; - for (;;) { - c = toAscii(enc, ptr, end); - if (c == -1) { - *nextTokPtr = ptr; - return 0; - } - if (c == ASCII_EQUALS) { - *nameEndPtr = ptr; - break; - } - if (isSpace(c)) { - *nameEndPtr = ptr; - do { - ptr += enc->minBytesPerChar; - } while (isSpace(c = toAscii(enc, ptr, end))); - if (c != ASCII_EQUALS) { - *nextTokPtr = ptr; - return 0; - } - break; - } - ptr += enc->minBytesPerChar; - } - if (ptr == *namePtr) { - *nextTokPtr = ptr; - return 0; - } - ptr += enc->minBytesPerChar; - c = toAscii(enc, ptr, end); - while (isSpace(c)) { - ptr += enc->minBytesPerChar; - c = toAscii(enc, ptr, end); - } - if (c != ASCII_QUOT && c != ASCII_APOS) { - *nextTokPtr = ptr; - return 0; - } - open = (char)c; - ptr += enc->minBytesPerChar; - *valPtr = ptr; - for (;; ptr += enc->minBytesPerChar) { - c = toAscii(enc, ptr, end); - if (c == open) - break; - if (!(ASCII_a <= c && c <= ASCII_z) - && !(ASCII_A <= c && c <= ASCII_Z) - && !(ASCII_0 <= c && c <= ASCII_9) - && c != ASCII_PERIOD - && c != ASCII_MINUS - && c != ASCII_UNDERSCORE) { - *nextTokPtr = ptr; - return 0; - } - } - *nextTokPtr = ptr + enc->minBytesPerChar; - return 1; -} - -static const char KW_version[] = { - ASCII_v, ASCII_e, ASCII_r, ASCII_s, ASCII_i, ASCII_o, ASCII_n, '\0' -}; - -static const char KW_encoding[] = { - ASCII_e, ASCII_n, ASCII_c, ASCII_o, ASCII_d, ASCII_i, ASCII_n, ASCII_g, '\0' -}; - -static const char KW_standalone[] = { - ASCII_s, ASCII_t, ASCII_a, ASCII_n, ASCII_d, ASCII_a, ASCII_l, ASCII_o, - ASCII_n, ASCII_e, '\0' -}; - -static const char KW_yes[] = { - ASCII_y, ASCII_e, ASCII_s, '\0' -}; - -static const char KW_no[] = { - ASCII_n, ASCII_o, '\0' -}; - -static int -doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, - const char *, - const char *), - int isGeneralTextEntity, - const ENCODING *enc, - const char *ptr, - const char *end, - const char **badPtr, - const char **versionPtr, - const char **versionEndPtr, - const char **encodingName, - const ENCODING **encoding, - int *standalone) -{ - const char *val = NULL; - const char *name = NULL; - const char *nameEnd = NULL; - ptr += 5 * enc->minBytesPerChar; - end -= 2 * enc->minBytesPerChar; - if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr) - || !name) { - *badPtr = ptr; - return 0; - } - if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) { - if (!isGeneralTextEntity) { - *badPtr = name; - return 0; - } - } - else { - if (versionPtr) - *versionPtr = val; - if (versionEndPtr) - *versionEndPtr = ptr; - if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { - *badPtr = ptr; - return 0; - } - if (!name) { - if (isGeneralTextEntity) { - /* a TextDecl must have an EncodingDecl */ - *badPtr = ptr; - return 0; - } - return 1; - } - } - if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) { - int c = toAscii(enc, val, end); - if (!(ASCII_a <= c && c <= ASCII_z) && !(ASCII_A <= c && c <= ASCII_Z)) { - *badPtr = val; - return 0; - } - if (encodingName) - *encodingName = val; - if (encoding) - *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar); - if (!parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { - *badPtr = ptr; - return 0; - } - if (!name) - return 1; - } - if (!XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone) - || isGeneralTextEntity) { - *badPtr = name; - return 0; - } - if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) { - if (standalone) - *standalone = 1; - } - else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) { - if (standalone) - *standalone = 0; - } - else { - *badPtr = val; - return 0; - } - while (isSpace(toAscii(enc, ptr, end))) - ptr += enc->minBytesPerChar; - if (ptr != end) { - *badPtr = ptr; - return 0; - } - return 1; -} - -static int FASTCALL -checkCharRefNumber(int result) -{ - switch (result >> 8) { - case 0xD8: case 0xD9: case 0xDA: case 0xDB: - case 0xDC: case 0xDD: case 0xDE: case 0xDF: - return -1; - case 0: - if (latin1_encoding.type[result] == BT_NONXML) - return -1; - break; - case 0xFF: - if (result == 0xFFFE || result == 0xFFFF) - return -1; - break; - } - return result; -} - -int FASTCALL -XmlUtf8Encode(int c, char *buf) -{ - enum { - /* minN is minimum legal resulting value for N byte sequence */ - min2 = 0x80, - min3 = 0x800, - min4 = 0x10000 - }; - - if (c < 0) - return 0; - if (c < min2) { - buf[0] = (char)(c | UTF8_cval1); - return 1; - } - if (c < min3) { - buf[0] = (char)((c >> 6) | UTF8_cval2); - buf[1] = (char)((c & 0x3f) | 0x80); - return 2; - } - if (c < min4) { - buf[0] = (char)((c >> 12) | UTF8_cval3); - buf[1] = (char)(((c >> 6) & 0x3f) | 0x80); - buf[2] = (char)((c & 0x3f) | 0x80); - return 3; - } - if (c < 0x110000) { - buf[0] = (char)((c >> 18) | UTF8_cval4); - buf[1] = (char)(((c >> 12) & 0x3f) | 0x80); - buf[2] = (char)(((c >> 6) & 0x3f) | 0x80); - buf[3] = (char)((c & 0x3f) | 0x80); - return 4; - } - return 0; -} - -int FASTCALL -XmlUtf16Encode(int charNum, unsigned short *buf) -{ - if (charNum < 0) - return 0; - if (charNum < 0x10000) { - buf[0] = (unsigned short)charNum; - return 1; - } - if (charNum < 0x110000) { - charNum -= 0x10000; - buf[0] = (unsigned short)((charNum >> 10) + 0xD800); - buf[1] = (unsigned short)((charNum & 0x3FF) + 0xDC00); - return 2; - } - return 0; -} - -struct unknown_encoding { - struct normal_encoding normal; - CONVERTER convert; - void *userData; - unsigned short utf16[256]; - char utf8[256][4]; -}; - -#define AS_UNKNOWN_ENCODING(enc) ((const struct unknown_encoding *) (enc)) - -int -XmlSizeOfUnknownEncoding(void) -{ - return sizeof(struct unknown_encoding); -} - -static int PTRFASTCALL -unknown_isName(const ENCODING *enc, const char *p) -{ - const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); - int c = uenc->convert(uenc->userData, p); - if (c & ~0xFFFF) - return 0; - return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF); -} - -static int PTRFASTCALL -unknown_isNmstrt(const ENCODING *enc, const char *p) -{ - const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); - int c = uenc->convert(uenc->userData, p); - if (c & ~0xFFFF) - return 0; - return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF); -} - -static int PTRFASTCALL -unknown_isInvalid(const ENCODING *enc, const char *p) -{ - const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); - int c = uenc->convert(uenc->userData, p); - return (c & ~0xFFFF) || checkCharRefNumber(c) < 0; -} - -static void PTRCALL -unknown_toUtf8(const ENCODING *enc, - const char **fromP, const char *fromLim, - char **toP, const char *toLim) -{ - const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); - char buf[XML_UTF8_ENCODE_MAX]; - for (;;) { - const char *utf8; - int n; - if (*fromP == fromLim) - break; - utf8 = uenc->utf8[(unsigned char)**fromP]; - n = *utf8++; - if (n == 0) { - int c = uenc->convert(uenc->userData, *fromP); - n = XmlUtf8Encode(c, buf); - if (n > toLim - *toP) - break; - utf8 = buf; - *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] - - (BT_LEAD2 - 2)); - } - else { - if (n > toLim - *toP) - break; - (*fromP)++; - } - do { - *(*toP)++ = *utf8++; - } while (--n != 0); - } -} - -static void PTRCALL -unknown_toUtf16(const ENCODING *enc, - const char **fromP, const char *fromLim, - unsigned short **toP, const unsigned short *toLim) -{ - const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); - while (*fromP != fromLim && *toP != toLim) { - unsigned short c = uenc->utf16[(unsigned char)**fromP]; - if (c == 0) { - c = (unsigned short) - uenc->convert(uenc->userData, *fromP); - *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] - - (BT_LEAD2 - 2)); - } - else - (*fromP)++; - *(*toP)++ = c; - } -} - -ENCODING * -XmlInitUnknownEncoding(void *mem, - int *table, - CONVERTER convert, - void *userData) -{ - int i; - struct unknown_encoding *e = (struct unknown_encoding *)mem; - for (i = 0; i < (int)sizeof(struct normal_encoding); i++) - ((char *)mem)[i] = ((char *)&latin1_encoding)[i]; - for (i = 0; i < 128; i++) - if (latin1_encoding.type[i] != BT_OTHER - && latin1_encoding.type[i] != BT_NONXML - && table[i] != i) - return 0; - for (i = 0; i < 256; i++) { - int c = table[i]; - if (c == -1) { - e->normal.type[i] = BT_MALFORM; - /* This shouldn't really get used. */ - e->utf16[i] = 0xFFFF; - e->utf8[i][0] = 1; - e->utf8[i][1] = 0; - } - else if (c < 0) { - if (c < -4) - return 0; - e->normal.type[i] = (unsigned char)(BT_LEAD2 - (c + 2)); - e->utf8[i][0] = 0; - e->utf16[i] = 0; - } - else if (c < 0x80) { - if (latin1_encoding.type[c] != BT_OTHER - && latin1_encoding.type[c] != BT_NONXML - && c != i) - return 0; - e->normal.type[i] = latin1_encoding.type[c]; - e->utf8[i][0] = 1; - e->utf8[i][1] = (char)c; - e->utf16[i] = (unsigned short)(c == 0 ? 0xFFFF : c); - } - else if (checkCharRefNumber(c) < 0) { - e->normal.type[i] = BT_NONXML; - /* This shouldn't really get used. */ - e->utf16[i] = 0xFFFF; - e->utf8[i][0] = 1; - e->utf8[i][1] = 0; - } - else { - if (c > 0xFFFF) - return 0; - if (UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xff)) - e->normal.type[i] = BT_NMSTRT; - else if (UCS2_GET_NAMING(namePages, c >> 8, c & 0xff)) - e->normal.type[i] = BT_NAME; - else - e->normal.type[i] = BT_OTHER; - e->utf8[i][0] = (char)XmlUtf8Encode(c, e->utf8[i] + 1); - e->utf16[i] = (unsigned short)c; - } - } - e->userData = userData; - e->convert = convert; - if (convert) { - e->normal.isName2 = unknown_isName; - e->normal.isName3 = unknown_isName; - e->normal.isName4 = unknown_isName; - e->normal.isNmstrt2 = unknown_isNmstrt; - e->normal.isNmstrt3 = unknown_isNmstrt; - e->normal.isNmstrt4 = unknown_isNmstrt; - e->normal.isInvalid2 = unknown_isInvalid; - e->normal.isInvalid3 = unknown_isInvalid; - e->normal.isInvalid4 = unknown_isInvalid; - } - e->normal.enc.utf8Convert = unknown_toUtf8; - e->normal.enc.utf16Convert = unknown_toUtf16; - return &(e->normal.enc); -} - -/* If this enumeration is changed, getEncodingIndex and encodings -must also be changed. */ -enum { - UNKNOWN_ENC = -1, - ISO_8859_1_ENC = 0, - US_ASCII_ENC, - UTF_8_ENC, - UTF_16_ENC, - UTF_16BE_ENC, - UTF_16LE_ENC, - /* must match encodingNames up to here */ - NO_ENC -}; - -static const char KW_ISO_8859_1[] = { - ASCII_I, ASCII_S, ASCII_O, ASCII_MINUS, ASCII_8, ASCII_8, ASCII_5, ASCII_9, - ASCII_MINUS, ASCII_1, '\0' -}; -static const char KW_US_ASCII[] = { - ASCII_U, ASCII_S, ASCII_MINUS, ASCII_A, ASCII_S, ASCII_C, ASCII_I, ASCII_I, - '\0' -}; -static const char KW_UTF_8[] = { - ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_8, '\0' -}; -static const char KW_UTF_16[] = { - ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, '\0' -}; -static const char KW_UTF_16BE[] = { - ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_B, ASCII_E, - '\0' -}; -static const char KW_UTF_16LE[] = { - ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_L, ASCII_E, - '\0' -}; - -static int FASTCALL -getEncodingIndex(const char *name) -{ - static const char * const encodingNames[] = { - KW_ISO_8859_1, - KW_US_ASCII, - KW_UTF_8, - KW_UTF_16, - KW_UTF_16BE, - KW_UTF_16LE, - }; - int i; - if (name == NULL) - return NO_ENC; - for (i = 0; i < (int)(sizeof(encodingNames)/sizeof(encodingNames[0])); i++) - if (streqci(name, encodingNames[i])) - return i; - return UNKNOWN_ENC; -} - -/* For binary compatibility, we store the index of the encoding - specified at initialization in the isUtf16 member. -*/ - -#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16) -#define SET_INIT_ENC_INDEX(enc, i) ((enc)->initEnc.isUtf16 = (char)i) - -/* This is what detects the encoding. encodingTable maps from - encoding indices to encodings; INIT_ENC_INDEX(enc) is the index of - the external (protocol) specified encoding; state is - XML_CONTENT_STATE if we're parsing an external text entity, and - XML_PROLOG_STATE otherwise. -*/ - - -static int -initScan(const ENCODING * const *encodingTable, - const INIT_ENCODING *enc, - int state, - const char *ptr, - const char *end, - const char **nextTokPtr) -{ - const ENCODING **encPtr; - - if (ptr == end) - return XML_TOK_NONE; - encPtr = enc->encPtr; - if (ptr + 1 == end) { - /* only a single byte available for auto-detection */ -#ifndef XML_DTD /* FIXME */ - /* a well-formed document entity must have more than one byte */ - if (state != XML_CONTENT_STATE) - return XML_TOK_PARTIAL; -#endif - /* so we're parsing an external text entity... */ - /* if UTF-16 was externally specified, then we need at least 2 bytes */ - switch (INIT_ENC_INDEX(enc)) { - case UTF_16_ENC: - case UTF_16LE_ENC: - case UTF_16BE_ENC: - return XML_TOK_PARTIAL; - } - switch ((unsigned char)*ptr) { - case 0xFE: - case 0xFF: - case 0xEF: /* possibly first byte of UTF-8 BOM */ - if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC - && state == XML_CONTENT_STATE) - break; - /* fall through */ - case 0x00: - case 0x3C: - return XML_TOK_PARTIAL; - } - } - else { - switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) { - case 0xFEFF: - if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC - && state == XML_CONTENT_STATE) - break; - *nextTokPtr = ptr + 2; - *encPtr = encodingTable[UTF_16BE_ENC]; - return XML_TOK_BOM; - /* 00 3C is handled in the default case */ - case 0x3C00: - if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC - || INIT_ENC_INDEX(enc) == UTF_16_ENC) - && state == XML_CONTENT_STATE) - break; - *encPtr = encodingTable[UTF_16LE_ENC]; - return XmlTok(*encPtr, state, ptr, end, nextTokPtr); - case 0xFFFE: - if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC - && state == XML_CONTENT_STATE) - break; - *nextTokPtr = ptr + 2; - *encPtr = encodingTable[UTF_16LE_ENC]; - return XML_TOK_BOM; - case 0xEFBB: - /* Maybe a UTF-8 BOM (EF BB BF) */ - /* If there's an explicitly specified (external) encoding - of ISO-8859-1 or some flavour of UTF-16 - and this is an external text entity, - don't look for the BOM, - because it might be a legal data. - */ - if (state == XML_CONTENT_STATE) { - int e = INIT_ENC_INDEX(enc); - if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC - || e == UTF_16LE_ENC || e == UTF_16_ENC) - break; - } - if (ptr + 2 == end) - return XML_TOK_PARTIAL; - if ((unsigned char)ptr[2] == 0xBF) { - *nextTokPtr = ptr + 3; - *encPtr = encodingTable[UTF_8_ENC]; - return XML_TOK_BOM; - } - break; - default: - if (ptr[0] == '\0') { - /* 0 isn't a legal data character. Furthermore a document - entity can only start with ASCII characters. So the only - way this can fail to be big-endian UTF-16 if it it's an - external parsed general entity that's labelled as - UTF-16LE. - */ - if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC) - break; - *encPtr = encodingTable[UTF_16BE_ENC]; - return XmlTok(*encPtr, state, ptr, end, nextTokPtr); - } - else if (ptr[1] == '\0') { - /* We could recover here in the case: - - parsing an external entity - - second byte is 0 - - no externally specified encoding - - no encoding declaration - by assuming UTF-16LE. But we don't, because this would mean when - presented just with a single byte, we couldn't reliably determine - whether we needed further bytes. - */ - if (state == XML_CONTENT_STATE) - break; - *encPtr = encodingTable[UTF_16LE_ENC]; - return XmlTok(*encPtr, state, ptr, end, nextTokPtr); - } - break; - } - } - *encPtr = encodingTable[INIT_ENC_INDEX(enc)]; - return XmlTok(*encPtr, state, ptr, end, nextTokPtr); -} - - -#define NS(x) x -#define ns(x) x -#define XML_TOK_NS_C -#include "xmltok_ns.c" -#undef XML_TOK_NS_C -#undef NS -#undef ns - -#ifdef XML_NS - -#define NS(x) x ## NS -#define ns(x) x ## _ns - -#define XML_TOK_NS_C -#include "xmltok_ns.c" -#undef XML_TOK_NS_C - -#undef NS -#undef ns - -ENCODING * -XmlInitUnknownEncodingNS(void *mem, - int *table, - CONVERTER convert, - void *userData) -{ - ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); - if (enc) - ((struct normal_encoding *)enc)->type[ASCII_COLON] = BT_COLON; - return enc; -} - -#endif /* XML_NS */ diff --git a/3rdparty/expat-2.0.1/lib/xmltok.h b/3rdparty/expat-2.0.1/lib/xmltok.h deleted file mode 100644 index ca867aa6b4..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmltok.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#ifndef XmlTok_INCLUDED -#define XmlTok_INCLUDED 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* The following token may be returned by XmlContentTok */ -#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be - start of illegal ]]> sequence */ -/* The following tokens may be returned by both XmlPrologTok and - XmlContentTok. -*/ -#define XML_TOK_NONE -4 /* The string to be scanned is empty */ -#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; - might be part of CRLF sequence */ -#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ -#define XML_TOK_PARTIAL -1 /* only part of a token */ -#define XML_TOK_INVALID 0 - -/* The following tokens are returned by XmlContentTok; some are also - returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok. -*/ -#define XML_TOK_START_TAG_WITH_ATTS 1 -#define XML_TOK_START_TAG_NO_ATTS 2 -#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag */ -#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4 -#define XML_TOK_END_TAG 5 -#define XML_TOK_DATA_CHARS 6 -#define XML_TOK_DATA_NEWLINE 7 -#define XML_TOK_CDATA_SECT_OPEN 8 -#define XML_TOK_ENTITY_REF 9 -#define XML_TOK_CHAR_REF 10 /* numeric character reference */ - -/* The following tokens may be returned by both XmlPrologTok and - XmlContentTok. -*/ -#define XML_TOK_PI 11 /* processing instruction */ -#define XML_TOK_XML_DECL 12 /* XML decl or text decl */ -#define XML_TOK_COMMENT 13 -#define XML_TOK_BOM 14 /* Byte order mark */ - -/* The following tokens are returned only by XmlPrologTok */ -#define XML_TOK_PROLOG_S 15 -#define XML_TOK_DECL_OPEN 16 /* */ -#define XML_TOK_NAME 18 -#define XML_TOK_NMTOKEN 19 -#define XML_TOK_POUND_NAME 20 /* #name */ -#define XML_TOK_OR 21 /* | */ -#define XML_TOK_PERCENT 22 -#define XML_TOK_OPEN_PAREN 23 -#define XML_TOK_CLOSE_PAREN 24 -#define XML_TOK_OPEN_BRACKET 25 -#define XML_TOK_CLOSE_BRACKET 26 -#define XML_TOK_LITERAL 27 -#define XML_TOK_PARAM_ENTITY_REF 28 -#define XML_TOK_INSTANCE_START 29 - -/* The following occur only in element type declarations */ -#define XML_TOK_NAME_QUESTION 30 /* name? */ -#define XML_TOK_NAME_ASTERISK 31 /* name* */ -#define XML_TOK_NAME_PLUS 32 /* name+ */ -#define XML_TOK_COND_SECT_OPEN 33 /* */ -#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */ -#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */ -#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */ -#define XML_TOK_COMMA 38 - -/* The following token is returned only by XmlAttributeValueTok */ -#define XML_TOK_ATTRIBUTE_VALUE_S 39 - -/* The following token is returned only by XmlCdataSectionTok */ -#define XML_TOK_CDATA_SECT_CLOSE 40 - -/* With namespace processing this is returned by XmlPrologTok for a - name with a colon. -*/ -#define XML_TOK_PREFIXED_NAME 41 - -#ifdef XML_DTD -#define XML_TOK_IGNORE_SECT 42 -#endif /* XML_DTD */ - -#ifdef XML_DTD -#define XML_N_STATES 4 -#else /* not XML_DTD */ -#define XML_N_STATES 3 -#endif /* not XML_DTD */ - -#define XML_PROLOG_STATE 0 -#define XML_CONTENT_STATE 1 -#define XML_CDATA_SECTION_STATE 2 -#ifdef XML_DTD -#define XML_IGNORE_SECTION_STATE 3 -#endif /* XML_DTD */ - -#define XML_N_LITERAL_TYPES 2 -#define XML_ATTRIBUTE_VALUE_LITERAL 0 -#define XML_ENTITY_VALUE_LITERAL 1 - -/* The size of the buffer passed to XmlUtf8Encode must be at least this. */ -#define XML_UTF8_ENCODE_MAX 4 -/* The size of the buffer passed to XmlUtf16Encode must be at least this. */ -#define XML_UTF16_ENCODE_MAX 2 - -typedef struct position { - /* first line and first column are 0 not 1 */ - XML_Size lineNumber; - XML_Size columnNumber; -} POSITION; - -typedef struct { - const char *name; - const char *valuePtr; - const char *valueEnd; - char normalized; -} ATTRIBUTE; - -struct encoding; -typedef struct encoding ENCODING; - -typedef int (PTRCALL *SCANNER)(const ENCODING *, - const char *, - const char *, - const char **); - -struct encoding { - SCANNER scanners[XML_N_STATES]; - SCANNER literalScanners[XML_N_LITERAL_TYPES]; - int (PTRCALL *sameName)(const ENCODING *, - const char *, - const char *); - int (PTRCALL *nameMatchesAscii)(const ENCODING *, - const char *, - const char *, - const char *); - int (PTRFASTCALL *nameLength)(const ENCODING *, const char *); - const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *); - int (PTRCALL *getAtts)(const ENCODING *enc, - const char *ptr, - int attsMax, - ATTRIBUTE *atts); - int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr); - int (PTRCALL *predefinedEntityName)(const ENCODING *, - const char *, - const char *); - void (PTRCALL *updatePosition)(const ENCODING *, - const char *ptr, - const char *end, - POSITION *); - int (PTRCALL *isPublicId)(const ENCODING *enc, - const char *ptr, - const char *end, - const char **badPtr); - void (PTRCALL *utf8Convert)(const ENCODING *enc, - const char **fromP, - const char *fromLim, - char **toP, - const char *toLim); - void (PTRCALL *utf16Convert)(const ENCODING *enc, - const char **fromP, - const char *fromLim, - unsigned short **toP, - const unsigned short *toLim); - int minBytesPerChar; - char isUtf8; - char isUtf16; -}; - -/* Scan the string starting at ptr until the end of the next complete - token, but do not scan past eptr. Return an integer giving the - type of token. - - Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set. - - Return XML_TOK_PARTIAL when the string does not contain a complete - token; nextTokPtr will not be set. - - Return XML_TOK_INVALID when the string does not start a valid - token; nextTokPtr will be set to point to the character which made - the token invalid. - - Otherwise the string starts with a valid token; nextTokPtr will be - set to point to the character following the end of that token. - - Each data character counts as a single token, but adjacent data - characters may be returned together. Similarly for characters in - the prolog outside literals, comments and processing instructions. -*/ - - -#define XmlTok(enc, state, ptr, end, nextTokPtr) \ - (((enc)->scanners[state])(enc, ptr, end, nextTokPtr)) - -#define XmlPrologTok(enc, ptr, end, nextTokPtr) \ - XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr) - -#define XmlContentTok(enc, ptr, end, nextTokPtr) \ - XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr) - -#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \ - XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr) - -#ifdef XML_DTD - -#define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \ - XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr) - -#endif /* XML_DTD */ - -/* This is used for performing a 2nd-level tokenization on the content - of a literal that has already been returned by XmlTok. -*/ -#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ - (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr)) - -#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \ - XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr) - -#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \ - XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr) - -#define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2)) - -#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \ - (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2)) - -#define XmlNameLength(enc, ptr) \ - (((enc)->nameLength)(enc, ptr)) - -#define XmlSkipS(enc, ptr) \ - (((enc)->skipS)(enc, ptr)) - -#define XmlGetAttributes(enc, ptr, attsMax, atts) \ - (((enc)->getAtts)(enc, ptr, attsMax, atts)) - -#define XmlCharRefNumber(enc, ptr) \ - (((enc)->charRefNumber)(enc, ptr)) - -#define XmlPredefinedEntityName(enc, ptr, end) \ - (((enc)->predefinedEntityName)(enc, ptr, end)) - -#define XmlUpdatePosition(enc, ptr, end, pos) \ - (((enc)->updatePosition)(enc, ptr, end, pos)) - -#define XmlIsPublicId(enc, ptr, end, badPtr) \ - (((enc)->isPublicId)(enc, ptr, end, badPtr)) - -#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \ - (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) - -#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \ - (((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim)) - -typedef struct { - ENCODING initEnc; - const ENCODING **encPtr; -} INIT_ENCODING; - -int XmlParseXmlDecl(int isGeneralTextEntity, - const ENCODING *enc, - const char *ptr, - const char *end, - const char **badPtr, - const char **versionPtr, - const char **versionEndPtr, - const char **encodingNamePtr, - const ENCODING **namedEncodingPtr, - int *standalonePtr); - -int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); -const ENCODING *XmlGetUtf8InternalEncoding(void); -const ENCODING *XmlGetUtf16InternalEncoding(void); -int FASTCALL XmlUtf8Encode(int charNumber, char *buf); -int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf); -int XmlSizeOfUnknownEncoding(void); - - -typedef int (XMLCALL *CONVERTER) (void *userData, const char *p); - -ENCODING * -XmlInitUnknownEncoding(void *mem, - int *table, - CONVERTER convert, - void *userData); - -int XmlParseXmlDeclNS(int isGeneralTextEntity, - const ENCODING *enc, - const char *ptr, - const char *end, - const char **badPtr, - const char **versionPtr, - const char **versionEndPtr, - const char **encodingNamePtr, - const ENCODING **namedEncodingPtr, - int *standalonePtr); - -int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); -const ENCODING *XmlGetUtf8InternalEncodingNS(void); -const ENCODING *XmlGetUtf16InternalEncodingNS(void); -ENCODING * -XmlInitUnknownEncodingNS(void *mem, - int *table, - CONVERTER convert, - void *userData); -#ifdef __cplusplus -} -#endif - -#endif /* not XmlTok_INCLUDED */ diff --git a/3rdparty/expat-2.0.1/lib/xmltok_impl.c b/3rdparty/expat-2.0.1/lib/xmltok_impl.c deleted file mode 100644 index 1268819252..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmltok_impl.c +++ /dev/null @@ -1,1783 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -/* This file is included! */ -#ifdef XML_TOK_IMPL_C - -#ifndef IS_INVALID_CHAR -#define IS_INVALID_CHAR(enc, ptr, n) (0) -#endif - -#define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \ - case BT_LEAD ## n: \ - if (end - ptr < n) \ - return XML_TOK_PARTIAL_CHAR; \ - if (IS_INVALID_CHAR(enc, ptr, n)) { \ - *(nextTokPtr) = (ptr); \ - return XML_TOK_INVALID; \ - } \ - ptr += n; \ - break; - -#define INVALID_CASES(ptr, nextTokPtr) \ - INVALID_LEAD_CASE(2, ptr, nextTokPtr) \ - INVALID_LEAD_CASE(3, ptr, nextTokPtr) \ - INVALID_LEAD_CASE(4, ptr, nextTokPtr) \ - case BT_NONXML: \ - case BT_MALFORM: \ - case BT_TRAIL: \ - *(nextTokPtr) = (ptr); \ - return XML_TOK_INVALID; - -#define CHECK_NAME_CASE(n, enc, ptr, end, nextTokPtr) \ - case BT_LEAD ## n: \ - if (end - ptr < n) \ - return XML_TOK_PARTIAL_CHAR; \ - if (!IS_NAME_CHAR(enc, ptr, n)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_INVALID; \ - } \ - ptr += n; \ - break; - -#define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ - case BT_NONASCII: \ - if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_INVALID; \ - } \ - case BT_NMSTRT: \ - case BT_HEX: \ - case BT_DIGIT: \ - case BT_NAME: \ - case BT_MINUS: \ - ptr += MINBPC(enc); \ - break; \ - CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr) \ - CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr) \ - CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr) - -#define CHECK_NMSTRT_CASE(n, enc, ptr, end, nextTokPtr) \ - case BT_LEAD ## n: \ - if (end - ptr < n) \ - return XML_TOK_PARTIAL_CHAR; \ - if (!IS_NMSTRT_CHAR(enc, ptr, n)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_INVALID; \ - } \ - ptr += n; \ - break; - -#define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ - case BT_NONASCII: \ - if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_INVALID; \ - } \ - case BT_NMSTRT: \ - case BT_HEX: \ - ptr += MINBPC(enc); \ - break; \ - CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \ - CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \ - CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr) - -#ifndef PREFIX -#define PREFIX(ident) ident -#endif - -/* ptr points to character following " */ - switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) { - case BT_S: case BT_CR: case BT_LF: case BT_PERCNT: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - /* fall through */ - case BT_S: case BT_CR: case BT_LF: - *nextTokPtr = ptr; - return XML_TOK_DECL_OPEN; - case BT_NMSTRT: - case BT_HEX: - ptr += MINBPC(enc); - break; - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - } - return XML_TOK_PARTIAL; -} - -static int PTRCALL -PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, - const char *end, int *tokPtr) -{ - int upper = 0; - *tokPtr = XML_TOK_PI; - if (end - ptr != MINBPC(enc)*3) - return 1; - switch (BYTE_TO_ASCII(enc, ptr)) { - case ASCII_x: - break; - case ASCII_X: - upper = 1; - break; - default: - return 1; - } - ptr += MINBPC(enc); - switch (BYTE_TO_ASCII(enc, ptr)) { - case ASCII_m: - break; - case ASCII_M: - upper = 1; - break; - default: - return 1; - } - ptr += MINBPC(enc); - switch (BYTE_TO_ASCII(enc, ptr)) { - case ASCII_l: - break; - case ASCII_L: - upper = 1; - break; - default: - return 1; - } - if (upper) - return 0; - *tokPtr = XML_TOK_XML_DECL; - return 1; -} - -/* ptr points to character following " 1) { - size_t n = end - ptr; - if (n & (MINBPC(enc) - 1)) { - n &= ~(MINBPC(enc) - 1); - if (n == 0) - return XML_TOK_PARTIAL; - end = ptr + n; - } - } - switch (BYTE_TYPE(enc, ptr)) { - case BT_RSQB: - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_PARTIAL; - if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) - break; - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_PARTIAL; - if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { - ptr -= MINBPC(enc); - break; - } - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_CDATA_SECT_CLOSE; - case BT_CR: - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_PARTIAL; - if (BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); - *nextTokPtr = ptr; - return XML_TOK_DATA_NEWLINE; - case BT_LF: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_DATA_NEWLINE; - INVALID_CASES(ptr, nextTokPtr) - default: - ptr += MINBPC(enc); - break; - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: \ - if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_DATA_CHARS; \ - } \ - ptr += n; \ - break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_NONXML: - case BT_MALFORM: - case BT_TRAIL: - case BT_CR: - case BT_LF: - case BT_RSQB: - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - default: - ptr += MINBPC(enc); - break; - } - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; -} - -/* ptr points to character following " 1) { - size_t n = end - ptr; - if (n & (MINBPC(enc) - 1)) { - n &= ~(MINBPC(enc) - 1); - if (n == 0) - return XML_TOK_PARTIAL; - end = ptr + n; - } - } - switch (BYTE_TYPE(enc, ptr)) { - case BT_LT: - return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_AMP: - return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_CR: - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_TRAILING_CR; - if (BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); - *nextTokPtr = ptr; - return XML_TOK_DATA_NEWLINE; - case BT_LF: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_DATA_NEWLINE; - case BT_RSQB: - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_TRAILING_RSQB; - if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) - break; - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_TRAILING_RSQB; - if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { - ptr -= MINBPC(enc); - break; - } - *nextTokPtr = ptr; - return XML_TOK_INVALID; - INVALID_CASES(ptr, nextTokPtr) - default: - ptr += MINBPC(enc); - break; - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: \ - if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ - *nextTokPtr = ptr; \ - return XML_TOK_DATA_CHARS; \ - } \ - ptr += n; \ - break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_RSQB: - if (ptr + MINBPC(enc) != end) { - if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) { - ptr += MINBPC(enc); - break; - } - if (ptr + 2*MINBPC(enc) != end) { - if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) { - ptr += MINBPC(enc); - break; - } - *nextTokPtr = ptr + 2*MINBPC(enc); - return XML_TOK_INVALID; - } - } - /* fall through */ - case BT_AMP: - case BT_LT: - case BT_NONXML: - case BT_MALFORM: - case BT_TRAIL: - case BT_CR: - case BT_LF: - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - default: - ptr += MINBPC(enc); - break; - } - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; -} - -/* ptr points to character following "%" */ - -static int PTRCALL -PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, - const char **nextTokPtr) -{ - if (ptr == end) - return -XML_TOK_PERCENT; - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) - case BT_S: case BT_LF: case BT_CR: case BT_PERCNT: - *nextTokPtr = ptr; - return XML_TOK_PERCENT; - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) - case BT_SEMI: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_PARAM_ENTITY_REF; - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - } - return XML_TOK_PARTIAL; -} - -static int PTRCALL -PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, - const char **nextTokPtr) -{ - if (ptr == end) - return XML_TOK_PARTIAL; - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) - case BT_CR: case BT_LF: case BT_S: - case BT_RPAR: case BT_GT: case BT_PERCNT: case BT_VERBAR: - *nextTokPtr = ptr; - return XML_TOK_POUND_NAME; - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - } - return -XML_TOK_POUND_NAME; -} - -static int PTRCALL -PREFIX(scanLit)(int open, const ENCODING *enc, - const char *ptr, const char *end, - const char **nextTokPtr) -{ - while (ptr != end) { - int t = BYTE_TYPE(enc, ptr); - switch (t) { - INVALID_CASES(ptr, nextTokPtr) - case BT_QUOT: - case BT_APOS: - ptr += MINBPC(enc); - if (t != open) - break; - if (ptr == end) - return -XML_TOK_LITERAL; - *nextTokPtr = ptr; - switch (BYTE_TYPE(enc, ptr)) { - case BT_S: case BT_CR: case BT_LF: - case BT_GT: case BT_PERCNT: case BT_LSQB: - return XML_TOK_LITERAL; - default: - return XML_TOK_INVALID; - } - default: - ptr += MINBPC(enc); - break; - } - } - return XML_TOK_PARTIAL; -} - -static int PTRCALL -PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, - const char **nextTokPtr) -{ - int tok; - if (ptr == end) - return XML_TOK_NONE; - if (MINBPC(enc) > 1) { - size_t n = end - ptr; - if (n & (MINBPC(enc) - 1)) { - n &= ~(MINBPC(enc) - 1); - if (n == 0) - return XML_TOK_PARTIAL; - end = ptr + n; - } - } - switch (BYTE_TYPE(enc, ptr)) { - case BT_QUOT: - return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_APOS: - return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_LT: - { - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_PARTIAL; - switch (BYTE_TYPE(enc, ptr)) { - case BT_EXCL: - return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_QUEST: - return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_NMSTRT: - case BT_HEX: - case BT_NONASCII: - case BT_LEAD2: - case BT_LEAD3: - case BT_LEAD4: - *nextTokPtr = ptr - MINBPC(enc); - return XML_TOK_INSTANCE_START; - } - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - case BT_CR: - if (ptr + MINBPC(enc) == end) { - *nextTokPtr = end; - /* indicate that this might be part of a CR/LF pair */ - return -XML_TOK_PROLOG_S; - } - /* fall through */ - case BT_S: case BT_LF: - for (;;) { - ptr += MINBPC(enc); - if (ptr == end) - break; - switch (BYTE_TYPE(enc, ptr)) { - case BT_S: case BT_LF: - break; - case BT_CR: - /* don't split CR/LF pair */ - if (ptr + MINBPC(enc) != end) - break; - /* fall through */ - default: - *nextTokPtr = ptr; - return XML_TOK_PROLOG_S; - } - } - *nextTokPtr = ptr; - return XML_TOK_PROLOG_S; - case BT_PERCNT: - return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); - case BT_COMMA: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_COMMA; - case BT_LSQB: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_OPEN_BRACKET; - case BT_RSQB: - ptr += MINBPC(enc); - if (ptr == end) - return -XML_TOK_CLOSE_BRACKET; - if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { - if (ptr + MINBPC(enc) == end) - return XML_TOK_PARTIAL; - if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) { - *nextTokPtr = ptr + 2*MINBPC(enc); - return XML_TOK_COND_SECT_CLOSE; - } - } - *nextTokPtr = ptr; - return XML_TOK_CLOSE_BRACKET; - case BT_LPAR: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_OPEN_PAREN; - case BT_RPAR: - ptr += MINBPC(enc); - if (ptr == end) - return -XML_TOK_CLOSE_PAREN; - switch (BYTE_TYPE(enc, ptr)) { - case BT_AST: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_CLOSE_PAREN_ASTERISK; - case BT_QUEST: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_CLOSE_PAREN_QUESTION; - case BT_PLUS: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_CLOSE_PAREN_PLUS; - case BT_CR: case BT_LF: case BT_S: - case BT_GT: case BT_COMMA: case BT_VERBAR: - case BT_RPAR: - *nextTokPtr = ptr; - return XML_TOK_CLOSE_PAREN; - } - *nextTokPtr = ptr; - return XML_TOK_INVALID; - case BT_VERBAR: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_OR; - case BT_GT: - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_DECL_CLOSE; - case BT_NUM: - return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr); -#define LEAD_CASE(n) \ - case BT_LEAD ## n: \ - if (end - ptr < n) \ - return XML_TOK_PARTIAL_CHAR; \ - if (IS_NMSTRT_CHAR(enc, ptr, n)) { \ - ptr += n; \ - tok = XML_TOK_NAME; \ - break; \ - } \ - if (IS_NAME_CHAR(enc, ptr, n)) { \ - ptr += n; \ - tok = XML_TOK_NMTOKEN; \ - break; \ - } \ - *nextTokPtr = ptr; \ - return XML_TOK_INVALID; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_NMSTRT: - case BT_HEX: - tok = XML_TOK_NAME; - ptr += MINBPC(enc); - break; - case BT_DIGIT: - case BT_NAME: - case BT_MINUS: -#ifdef XML_NS - case BT_COLON: -#endif - tok = XML_TOK_NMTOKEN; - ptr += MINBPC(enc); - break; - case BT_NONASCII: - if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { - ptr += MINBPC(enc); - tok = XML_TOK_NAME; - break; - } - if (IS_NAME_CHAR_MINBPC(enc, ptr)) { - ptr += MINBPC(enc); - tok = XML_TOK_NMTOKEN; - break; - } - /* fall through */ - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) - case BT_GT: case BT_RPAR: case BT_COMMA: - case BT_VERBAR: case BT_LSQB: case BT_PERCNT: - case BT_S: case BT_CR: case BT_LF: - *nextTokPtr = ptr; - return tok; -#ifdef XML_NS - case BT_COLON: - ptr += MINBPC(enc); - switch (tok) { - case XML_TOK_NAME: - if (ptr == end) - return XML_TOK_PARTIAL; - tok = XML_TOK_PREFIXED_NAME; - switch (BYTE_TYPE(enc, ptr)) { - CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) - default: - tok = XML_TOK_NMTOKEN; - break; - } - break; - case XML_TOK_PREFIXED_NAME: - tok = XML_TOK_NMTOKEN; - break; - } - break; -#endif - case BT_PLUS: - if (tok == XML_TOK_NMTOKEN) { - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_NAME_PLUS; - case BT_AST: - if (tok == XML_TOK_NMTOKEN) { - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_NAME_ASTERISK; - case BT_QUEST: - if (tok == XML_TOK_NMTOKEN) { - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_NAME_QUESTION; - default: - *nextTokPtr = ptr; - return XML_TOK_INVALID; - } - } - return -tok; -} - -static int PTRCALL -PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, - const char *end, const char **nextTokPtr) -{ - const char *start; - if (ptr == end) - return XML_TOK_NONE; - start = ptr; - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: ptr += n; break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_AMP: - if (ptr == start) - return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_LT: - /* this is for inside entity references */ - *nextTokPtr = ptr; - return XML_TOK_INVALID; - case BT_LF: - if (ptr == start) { - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_DATA_NEWLINE; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_CR: - if (ptr == start) { - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_TRAILING_CR; - if (BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); - *nextTokPtr = ptr; - return XML_TOK_DATA_NEWLINE; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_S: - if (ptr == start) { - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_ATTRIBUTE_VALUE_S; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - default: - ptr += MINBPC(enc); - break; - } - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; -} - -static int PTRCALL -PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, - const char *end, const char **nextTokPtr) -{ - const char *start; - if (ptr == end) - return XML_TOK_NONE; - start = ptr; - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: ptr += n; break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_AMP: - if (ptr == start) - return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_PERCNT: - if (ptr == start) { - int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), - end, nextTokPtr); - return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_LF: - if (ptr == start) { - *nextTokPtr = ptr + MINBPC(enc); - return XML_TOK_DATA_NEWLINE; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - case BT_CR: - if (ptr == start) { - ptr += MINBPC(enc); - if (ptr == end) - return XML_TOK_TRAILING_CR; - if (BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); - *nextTokPtr = ptr; - return XML_TOK_DATA_NEWLINE; - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; - default: - ptr += MINBPC(enc); - break; - } - } - *nextTokPtr = ptr; - return XML_TOK_DATA_CHARS; -} - -#ifdef XML_DTD - -static int PTRCALL -PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, - const char *end, const char **nextTokPtr) -{ - int level = 0; - if (MINBPC(enc) > 1) { - size_t n = end - ptr; - if (n & (MINBPC(enc) - 1)) { - n &= ~(MINBPC(enc) - 1); - end = ptr + n; - } - } - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { - INVALID_CASES(ptr, nextTokPtr) - case BT_LT: - if ((ptr += MINBPC(enc)) == end) - return XML_TOK_PARTIAL; - if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) { - if ((ptr += MINBPC(enc)) == end) - return XML_TOK_PARTIAL; - if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) { - ++level; - ptr += MINBPC(enc); - } - } - break; - case BT_RSQB: - if ((ptr += MINBPC(enc)) == end) - return XML_TOK_PARTIAL; - if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { - if ((ptr += MINBPC(enc)) == end) - return XML_TOK_PARTIAL; - if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { - ptr += MINBPC(enc); - if (level == 0) { - *nextTokPtr = ptr; - return XML_TOK_IGNORE_SECT; - } - --level; - } - } - break; - default: - ptr += MINBPC(enc); - break; - } - } - return XML_TOK_PARTIAL; -} - -#endif /* XML_DTD */ - -static int PTRCALL -PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, - const char **badPtr) -{ - ptr += MINBPC(enc); - end -= MINBPC(enc); - for (; ptr != end; ptr += MINBPC(enc)) { - switch (BYTE_TYPE(enc, ptr)) { - case BT_DIGIT: - case BT_HEX: - case BT_MINUS: - case BT_APOS: - case BT_LPAR: - case BT_RPAR: - case BT_PLUS: - case BT_COMMA: - case BT_SOL: - case BT_EQUALS: - case BT_QUEST: - case BT_CR: - case BT_LF: - case BT_SEMI: - case BT_EXCL: - case BT_AST: - case BT_PERCNT: - case BT_NUM: -#ifdef XML_NS - case BT_COLON: -#endif - break; - case BT_S: - if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) { - *badPtr = ptr; - return 0; - } - break; - case BT_NAME: - case BT_NMSTRT: - if (!(BYTE_TO_ASCII(enc, ptr) & ~0x7f)) - break; - default: - switch (BYTE_TO_ASCII(enc, ptr)) { - case 0x24: /* $ */ - case 0x40: /* @ */ - break; - default: - *badPtr = ptr; - return 0; - } - break; - } - } - return 1; -} - -/* This must only be called for a well-formed start-tag or empty - element tag. Returns the number of attributes. Pointers to the - first attsMax attributes are stored in atts. -*/ - -static int PTRCALL -PREFIX(getAtts)(const ENCODING *enc, const char *ptr, - int attsMax, ATTRIBUTE *atts) -{ - enum { other, inName, inValue } state = inName; - int nAtts = 0; - int open = 0; /* defined when state == inValue; - initialization just to shut up compilers */ - - for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) { - switch (BYTE_TYPE(enc, ptr)) { -#define START_NAME \ - if (state == other) { \ - if (nAtts < attsMax) { \ - atts[nAtts].name = ptr; \ - atts[nAtts].normalized = 1; \ - } \ - state = inName; \ - } -#define LEAD_CASE(n) \ - case BT_LEAD ## n: START_NAME ptr += (n - MINBPC(enc)); break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_NONASCII: - case BT_NMSTRT: - case BT_HEX: - START_NAME - break; -#undef START_NAME - case BT_QUOT: - if (state != inValue) { - if (nAtts < attsMax) - atts[nAtts].valuePtr = ptr + MINBPC(enc); - state = inValue; - open = BT_QUOT; - } - else if (open == BT_QUOT) { - state = other; - if (nAtts < attsMax) - atts[nAtts].valueEnd = ptr; - nAtts++; - } - break; - case BT_APOS: - if (state != inValue) { - if (nAtts < attsMax) - atts[nAtts].valuePtr = ptr + MINBPC(enc); - state = inValue; - open = BT_APOS; - } - else if (open == BT_APOS) { - state = other; - if (nAtts < attsMax) - atts[nAtts].valueEnd = ptr; - nAtts++; - } - break; - case BT_AMP: - if (nAtts < attsMax) - atts[nAtts].normalized = 0; - break; - case BT_S: - if (state == inName) - state = other; - else if (state == inValue - && nAtts < attsMax - && atts[nAtts].normalized - && (ptr == atts[nAtts].valuePtr - || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE - || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE - || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open)) - atts[nAtts].normalized = 0; - break; - case BT_CR: case BT_LF: - /* This case ensures that the first attribute name is counted - Apart from that we could just change state on the quote. */ - if (state == inName) - state = other; - else if (state == inValue && nAtts < attsMax) - atts[nAtts].normalized = 0; - break; - case BT_GT: - case BT_SOL: - if (state != inValue) - return nAtts; - break; - default: - break; - } - } - /* not reached */ -} - -static int PTRFASTCALL -PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) -{ - int result = 0; - /* skip &# */ - ptr += 2*MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_x)) { - for (ptr += MINBPC(enc); - !CHAR_MATCHES(enc, ptr, ASCII_SEMI); - ptr += MINBPC(enc)) { - int c = BYTE_TO_ASCII(enc, ptr); - switch (c) { - case ASCII_0: case ASCII_1: case ASCII_2: case ASCII_3: case ASCII_4: - case ASCII_5: case ASCII_6: case ASCII_7: case ASCII_8: case ASCII_9: - result <<= 4; - result |= (c - ASCII_0); - break; - case ASCII_A: case ASCII_B: case ASCII_C: - case ASCII_D: case ASCII_E: case ASCII_F: - result <<= 4; - result += 10 + (c - ASCII_A); - break; - case ASCII_a: case ASCII_b: case ASCII_c: - case ASCII_d: case ASCII_e: case ASCII_f: - result <<= 4; - result += 10 + (c - ASCII_a); - break; - } - if (result >= 0x110000) - return -1; - } - } - else { - for (; !CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { - int c = BYTE_TO_ASCII(enc, ptr); - result *= 10; - result += (c - ASCII_0); - if (result >= 0x110000) - return -1; - } - } - return checkCharRefNumber(result); -} - -static int PTRCALL -PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, - const char *end) -{ - switch ((end - ptr)/MINBPC(enc)) { - case 2: - if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) { - switch (BYTE_TO_ASCII(enc, ptr)) { - case ASCII_l: - return ASCII_LT; - case ASCII_g: - return ASCII_GT; - } - } - break; - case 3: - if (CHAR_MATCHES(enc, ptr, ASCII_a)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_m)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_p)) - return ASCII_AMP; - } - } - break; - case 4: - switch (BYTE_TO_ASCII(enc, ptr)) { - case ASCII_q: - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_u)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_o)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_t)) - return ASCII_QUOT; - } - } - break; - case ASCII_a: - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_p)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_o)) { - ptr += MINBPC(enc); - if (CHAR_MATCHES(enc, ptr, ASCII_s)) - return ASCII_APOS; - } - } - break; - } - } - return 0; -} - -static int PTRCALL -PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2) -{ - for (;;) { - switch (BYTE_TYPE(enc, ptr1)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: \ - if (*ptr1++ != *ptr2++) \ - return 0; - LEAD_CASE(4) LEAD_CASE(3) LEAD_CASE(2) -#undef LEAD_CASE - /* fall through */ - if (*ptr1++ != *ptr2++) - return 0; - break; - case BT_NONASCII: - case BT_NMSTRT: -#ifdef XML_NS - case BT_COLON: -#endif - case BT_HEX: - case BT_DIGIT: - case BT_NAME: - case BT_MINUS: - if (*ptr2++ != *ptr1++) - return 0; - if (MINBPC(enc) > 1) { - if (*ptr2++ != *ptr1++) - return 0; - if (MINBPC(enc) > 2) { - if (*ptr2++ != *ptr1++) - return 0; - if (MINBPC(enc) > 3) { - if (*ptr2++ != *ptr1++) - return 0; - } - } - } - break; - default: - if (MINBPC(enc) == 1 && *ptr1 == *ptr2) - return 1; - switch (BYTE_TYPE(enc, ptr2)) { - case BT_LEAD2: - case BT_LEAD3: - case BT_LEAD4: - case BT_NONASCII: - case BT_NMSTRT: -#ifdef XML_NS - case BT_COLON: -#endif - case BT_HEX: - case BT_DIGIT: - case BT_NAME: - case BT_MINUS: - return 0; - default: - return 1; - } - } - } - /* not reached */ -} - -static int PTRCALL -PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, - const char *end1, const char *ptr2) -{ - for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { - if (ptr1 == end1) - return 0; - if (!CHAR_MATCHES(enc, ptr1, *ptr2)) - return 0; - } - return ptr1 == end1; -} - -static int PTRFASTCALL -PREFIX(nameLength)(const ENCODING *enc, const char *ptr) -{ - const char *start = ptr; - for (;;) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: ptr += n; break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_NONASCII: - case BT_NMSTRT: -#ifdef XML_NS - case BT_COLON: -#endif - case BT_HEX: - case BT_DIGIT: - case BT_NAME: - case BT_MINUS: - ptr += MINBPC(enc); - break; - default: - return (int)(ptr - start); - } - } -} - -static const char * PTRFASTCALL -PREFIX(skipS)(const ENCODING *enc, const char *ptr) -{ - for (;;) { - switch (BYTE_TYPE(enc, ptr)) { - case BT_LF: - case BT_CR: - case BT_S: - ptr += MINBPC(enc); - break; - default: - return ptr; - } - } -} - -static void PTRCALL -PREFIX(updatePosition)(const ENCODING *enc, - const char *ptr, - const char *end, - POSITION *pos) -{ - while (ptr != end) { - switch (BYTE_TYPE(enc, ptr)) { -#define LEAD_CASE(n) \ - case BT_LEAD ## n: \ - ptr += n; \ - break; - LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) -#undef LEAD_CASE - case BT_LF: - pos->columnNumber = (XML_Size)-1; - pos->lineNumber++; - ptr += MINBPC(enc); - break; - case BT_CR: - pos->lineNumber++; - ptr += MINBPC(enc); - if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); - pos->columnNumber = (XML_Size)-1; - break; - default: - ptr += MINBPC(enc); - break; - } - pos->columnNumber++; - } -} - -#undef DO_LEAD_CASE -#undef MULTIBYTE_CASES -#undef INVALID_CASES -#undef CHECK_NAME_CASE -#undef CHECK_NAME_CASES -#undef CHECK_NMSTRT_CASE -#undef CHECK_NMSTRT_CASES - -#endif /* XML_TOK_IMPL_C */ diff --git a/3rdparty/expat-2.0.1/lib/xmltok_impl.h b/3rdparty/expat-2.0.1/lib/xmltok_impl.h deleted file mode 100644 index da0ea60a65..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmltok_impl.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd -See the file COPYING for copying permission. -*/ - -enum { - BT_NONXML, - BT_MALFORM, - BT_LT, - BT_AMP, - BT_RSQB, - BT_LEAD2, - BT_LEAD3, - BT_LEAD4, - BT_TRAIL, - BT_CR, - BT_LF, - BT_GT, - BT_QUOT, - BT_APOS, - BT_EQUALS, - BT_QUEST, - BT_EXCL, - BT_SOL, - BT_SEMI, - BT_NUM, - BT_LSQB, - BT_S, - BT_NMSTRT, - BT_COLON, - BT_HEX, - BT_DIGIT, - BT_NAME, - BT_MINUS, - BT_OTHER, /* known not to be a name or name start character */ - BT_NONASCII, /* might be a name or name start character */ - BT_PERCNT, - BT_LPAR, - BT_RPAR, - BT_AST, - BT_PLUS, - BT_COMMA, - BT_VERBAR -}; - -#include diff --git a/3rdparty/expat-2.0.1/lib/xmltok_ns.c b/3rdparty/expat-2.0.1/lib/xmltok_ns.c deleted file mode 100644 index c3b88fdf4e..0000000000 --- a/3rdparty/expat-2.0.1/lib/xmltok_ns.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -/* This file is included! */ -#ifdef XML_TOK_NS_C - -const ENCODING * -NS(XmlGetUtf8InternalEncoding)(void) -{ - return &ns(internal_utf8_encoding).enc; -} - -const ENCODING * -NS(XmlGetUtf16InternalEncoding)(void) -{ -#if BYTEORDER == 1234 - return &ns(internal_little2_encoding).enc; -#elif BYTEORDER == 4321 - return &ns(internal_big2_encoding).enc; -#else - const short n = 1; - return (*(const char *)&n - ? &ns(internal_little2_encoding).enc - : &ns(internal_big2_encoding).enc); -#endif -} - -static const ENCODING * const NS(encodings)[] = { - &ns(latin1_encoding).enc, - &ns(ascii_encoding).enc, - &ns(utf8_encoding).enc, - &ns(big2_encoding).enc, - &ns(big2_encoding).enc, - &ns(little2_encoding).enc, - &ns(utf8_encoding).enc /* NO_ENC */ -}; - -static int PTRCALL -NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, - const char **nextTokPtr) -{ - return initScan(NS(encodings), (const INIT_ENCODING *)enc, - XML_PROLOG_STATE, ptr, end, nextTokPtr); -} - -static int PTRCALL -NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, - const char **nextTokPtr) -{ - return initScan(NS(encodings), (const INIT_ENCODING *)enc, - XML_CONTENT_STATE, ptr, end, nextTokPtr); -} - -int -NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, - const char *name) -{ - int i = getEncodingIndex(name); - if (i == UNKNOWN_ENC) - return 0; - SET_INIT_ENC_INDEX(p, i); - p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog); - p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent); - p->initEnc.updatePosition = initUpdatePosition; - p->encPtr = encPtr; - *encPtr = &(p->initEnc); - return 1; -} - -static const ENCODING * -NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) -{ -#define ENCODING_MAX 128 - char buf[ENCODING_MAX]; - char *p = buf; - int i; - XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); - if (ptr != end) - return 0; - *p = 0; - if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2) - return enc; - i = getEncodingIndex(buf); - if (i == UNKNOWN_ENC) - return 0; - return NS(encodings)[i]; -} - -int -NS(XmlParseXmlDecl)(int isGeneralTextEntity, - const ENCODING *enc, - const char *ptr, - const char *end, - const char **badPtr, - const char **versionPtr, - const char **versionEndPtr, - const char **encodingName, - const ENCODING **encoding, - int *standalone) -{ - return doParseXmlDecl(NS(findEncoding), - isGeneralTextEntity, - enc, - ptr, - end, - badPtr, - versionPtr, - versionEndPtr, - encodingName, - encoding, - standalone); -} - -#endif /* XML_TOK_NS_C */ diff --git a/3rdparty/expat-2.0.1/tests/README.txt b/3rdparty/expat-2.0.1/tests/README.txt deleted file mode 100644 index a7853aa91e..0000000000 --- a/3rdparty/expat-2.0.1/tests/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -This directory contains the (fledgling) test suite for Expat. The -tests provide general unit testing and regression coverage. The tests -are not expected to be useful examples of Expat usage; see the -examples/ directory for that. - -The Expat tests use a partial internal implementation of the "Check" -unit testing framework for C. More information on Check can be found at: - - http://check.sourceforge.net/ - -Expat must be built and installed before "make check" can be executed. - -Since both Check and this test suite are young, it can all change in a -later version. diff --git a/3rdparty/expat-2.0.1/tests/benchmark/README.txt b/3rdparty/expat-2.0.1/tests/benchmark/README.txt deleted file mode 100644 index 2950596115..0000000000 --- a/3rdparty/expat-2.0.1/tests/benchmark/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Use this benchmark command line utility as follows: - - benchmark [-n] <# iterations> - -The command line arguments are: - - -n ... optional; if supplied, namespace processing is turned on - ... name/path of test xml file - ... size of processing buffer; - the file is parsed in chunks of this size - <# iterations> ... how often will the file be parsed - -Returns: - - The time (in seconds) it takes to parse the test file, - averaged over the number of iterations. \ No newline at end of file diff --git a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.c b/3rdparty/expat-2.0.1/tests/benchmark/benchmark.c deleted file mode 100644 index 0f0fd18c1d..0000000000 --- a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.c +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -#include -#include "expat.h" - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -#ifdef XML_LARGE_SIZE -#define XML_FMT_INT_MOD "ll" -#else -#define XML_FMT_INT_MOD "l" -#endif - -static void -usage(const char *prog, int rc) -{ - fprintf(stderr, - "usage: %s [-n] filename bufferSize nr_of_loops\n", prog); - exit(rc); -} - -int main (int argc, char *argv[]) -{ - XML_Parser parser; - char *XMLBuf, *XMLBufEnd, *XMLBufPtr; - FILE *fd; - struct stat fileAttr; - int nrOfLoops, bufferSize, fileSize, i, isFinal; - int j = 0, ns = 0; - clock_t tstart, tend; - double cpuTime = 0.0; - - if (argc > 1) { - if (argv[1][0] == '-') { - if (argv[1][1] == 'n' && argv[1][2] == '\0') { - ns = 1; - j = 1; - } - else - usage(argv[0], 1); - } - } - - if (argc != j + 4) - usage(argv[0], 1); - - if (stat (argv[j + 1], &fileAttr) != 0) { - fprintf (stderr, "could not access file '%s'\n", argv[j + 1]); - return 2; - } - - fd = fopen (argv[j + 1], "r"); - if (!fd) { - fprintf (stderr, "could not open file '%s'\n", argv[j + 1]); - exit(2); - } - - bufferSize = atoi (argv[j + 2]); - nrOfLoops = atoi (argv[j + 3]); - if (bufferSize <= 0 || nrOfLoops <= 0) { - fprintf (stderr, - "buffer size and nr of loops must be greater than zero.\n"); - exit(3); - } - - XMLBuf = malloc (fileAttr.st_size); - fileSize = fread (XMLBuf, sizeof (char), fileAttr.st_size, fd); - fclose (fd); - - if (ns) - parser = XML_ParserCreateNS(NULL, '!'); - else - parser = XML_ParserCreate(NULL); - - i = 0; - XMLBufEnd = XMLBuf + fileSize; - while (i < nrOfLoops) { - XMLBufPtr = XMLBuf; - isFinal = 0; - tstart = clock(); - do { - int parseBufferSize = XMLBufEnd - XMLBufPtr; - if (parseBufferSize <= bufferSize) - isFinal = 1; - else - parseBufferSize = bufferSize; - if (!XML_Parse (parser, XMLBufPtr, parseBufferSize, isFinal)) { - fprintf (stderr, "error '%s' at line %" XML_FMT_INT_MOD \ - "u character %" XML_FMT_INT_MOD "u\n", - XML_ErrorString (XML_GetErrorCode (parser)), - XML_GetCurrentLineNumber (parser), - XML_GetCurrentColumnNumber (parser)); - free (XMLBuf); - XML_ParserFree (parser); - exit (4); - } - XMLBufPtr += bufferSize; - } while (!isFinal); - tend = clock(); - cpuTime += ((double) (tend - tstart)) / CLOCKS_PER_SEC; - XML_ParserReset(parser, NULL); - i++; - } - - XML_ParserFree (parser); - free (XMLBuf); - - printf ("%d loops, with buffer size %d. Average time per loop: %f\n", - nrOfLoops, bufferSize, cpuTime / (double) nrOfLoops); - return 0; -} diff --git a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsp b/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsp deleted file mode 100644 index 6f310d0a93..0000000000 --- a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsp +++ /dev/null @@ -1,88 +0,0 @@ -# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=benchmark - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "benchmark.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "benchmark - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x1009 /d "NDEBUG" -# ADD RSC /l 0x1009 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "benchmark - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x1009 /d "_DEBUG" -# ADD RSC /l 0x1009 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "benchmark - Win32 Release" -# Name "benchmark - Win32 Debug" -# Begin Source File - -SOURCE=.\benchmark.c -# End Source File -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsw b/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsw deleted file mode 100644 index 3346a9ad98..0000000000 --- a/3rdparty/expat-2.0.1/tests/benchmark/benchmark.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "benchmark"=.\benchmark.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name expat - End Project Dependency -}}} - -############################################################################### - -Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/3rdparty/expat-2.0.1/tests/chardata.c b/3rdparty/expat-2.0.1/tests/chardata.c deleted file mode 100644 index 5fb0299d88..0000000000 --- a/3rdparty/expat-2.0.1/tests/chardata.c +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (c) 1998-2003 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. - - chardata.c -*/ - -#ifdef HAVE_EXPAT_CONFIG_H -#include -#endif -#ifdef HAVE_CHECK_H -#include -#else -#include "minicheck.h" -#endif - -#include -#include -#include - -#include "chardata.h" - - -static int -xmlstrlen(const XML_Char *s) -{ - int len = 0; - assert(s != NULL); - while (s[len] != 0) - ++len; - return len; -} - - -void -CharData_Init(CharData *storage) -{ - assert(storage != NULL); - storage->count = -1; -} - -void -CharData_AppendString(CharData *storage, const char *s) -{ - int maxchars = sizeof(storage->data) / sizeof(storage->data[0]); - int len; - - assert(s != NULL); - len = strlen(s); - if (storage->count < 0) - storage->count = 0; - if ((len + storage->count) > maxchars) { - len = (maxchars - storage->count); - } - if (len + storage->count < sizeof(storage->data)) { - memcpy(storage->data + storage->count, s, len); - storage->count += len; - } -} - -void -CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len) -{ - int maxchars; - - assert(storage != NULL); - assert(s != NULL); - maxchars = sizeof(storage->data) / sizeof(storage->data[0]); - if (storage->count < 0) - storage->count = 0; - if (len < 0) - len = xmlstrlen(s); - if ((len + storage->count) > maxchars) { - len = (maxchars - storage->count); - } - if (len + storage->count < sizeof(storage->data)) { - memcpy(storage->data + storage->count, s, - len * sizeof(storage->data[0])); - storage->count += len; - } -} - -int -CharData_CheckString(CharData *storage, const char *expected) -{ - char buffer[1280]; - int len; - int count; - - assert(storage != NULL); - assert(expected != NULL); - count = (storage->count < 0) ? 0 : storage->count; - len = strlen(expected); - if (len != count) { - if (sizeof(XML_Char) == 1) - sprintf(buffer, "wrong number of data characters:" - " got %d, expected %d:\n%s", count, len, storage->data); - else - sprintf(buffer, - "wrong number of data characters: got %d, expected %d", - count, len); - fail(buffer); - return 0; - } - if (memcmp(expected, storage->data, len) != 0) { - fail("got bad data bytes"); - return 0; - } - return 1; -} - -int -CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) -{ - char buffer[1024]; - int len = xmlstrlen(expected); - int count; - - assert(storage != NULL); - count = (storage->count < 0) ? 0 : storage->count; - if (len != count) { - sprintf(buffer, "wrong number of data characters: got %d, expected %d", - count, len); - fail(buffer); - return 0; - } - if (memcmp(expected, storage->data, len * sizeof(storage->data[0])) != 0) { - fail("got bad data bytes"); - return 0; - } - return 1; -} diff --git a/3rdparty/expat-2.0.1/tests/chardata.h b/3rdparty/expat-2.0.1/tests/chardata.h deleted file mode 100644 index e8dc4ce22c..0000000000 --- a/3rdparty/expat-2.0.1/tests/chardata.h +++ /dev/null @@ -1,40 +0,0 @@ -/* chardata.h - - Interface to some helper routines used to accumulate and check text - and attribute content. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef XML_CHARDATA_H -#define XML_CHARDATA_H 1 - -#ifndef XML_VERSION -#include "expat.h" /* need XML_Char */ -#endif - - -typedef struct { - int count; /* # of chars, < 0 if not set */ - XML_Char data[1024]; -} CharData; - - -void CharData_Init(CharData *storage); - -void CharData_AppendString(CharData *storage, const char *s); - -void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); - -int CharData_CheckString(CharData *storage, const char *s); - -int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); - - -#endif /* XML_CHARDATA_H */ - -#ifdef __cplusplus -} -#endif diff --git a/3rdparty/expat-2.0.1/tests/minicheck.c b/3rdparty/expat-2.0.1/tests/minicheck.c deleted file mode 100644 index d2f4295ffb..0000000000 --- a/3rdparty/expat-2.0.1/tests/minicheck.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Miniature re-implementation of the "check" library. - * - * This is intended to support just enough of check to run the Expat - * tests. This interface is based entirely on the portion of the - * check library being used. - */ - -#include -#include -#include -#include - -#include "minicheck.h" - -Suite * -suite_create(char *name) -{ - Suite *suite = (Suite *) calloc(1, sizeof(Suite)); - if (suite != NULL) { - suite->name = name; - } - return suite; -} - -TCase * -tcase_create(char *name) -{ - TCase *tc = (TCase *) calloc(1, sizeof(TCase)); - if (tc != NULL) { - tc->name = name; - } - return tc; -} - -void -suite_add_tcase(Suite *suite, TCase *tc) -{ - assert(suite != NULL); - assert(tc != NULL); - assert(tc->next_tcase == NULL); - - tc->next_tcase = suite->tests; - suite->tests = tc; -} - -void -tcase_add_checked_fixture(TCase *tc, - tcase_setup_function setup, - tcase_teardown_function teardown) -{ - assert(tc != NULL); - tc->setup = setup; - tc->teardown = teardown; -} - -void -tcase_add_test(TCase *tc, tcase_test_function test) -{ - assert(tc != NULL); - if (tc->allocated == tc->ntests) { - int nalloc = tc->allocated + 100; - size_t new_size = sizeof(tcase_test_function) * nalloc; - tcase_test_function *new_tests = realloc(tc->tests, new_size); - assert(new_tests != NULL); - if (new_tests != tc->tests) { - free(tc->tests); - tc->tests = new_tests; - } - tc->allocated = nalloc; - } - tc->tests[tc->ntests] = test; - tc->ntests++; -} - -SRunner * -srunner_create(Suite *suite) -{ - SRunner *runner = calloc(1, sizeof(SRunner)); - if (runner != NULL) { - runner->suite = suite; - } - return runner; -} - -static jmp_buf env; - -static char const *_check_current_function = NULL; -static int _check_current_lineno = -1; -static char const *_check_current_filename = NULL; - -void -_check_set_test_info(char const *function, char const *filename, int lineno) -{ - _check_current_function = function; - _check_current_lineno = lineno; - _check_current_filename = filename; -} - - -static void -add_failure(SRunner *runner, int verbosity) -{ - runner->nfailures++; - if (verbosity >= CK_VERBOSE) { - printf("%s:%d: %s\n", _check_current_filename, - _check_current_lineno, _check_current_function); - } -} - -void -srunner_run_all(SRunner *runner, int verbosity) -{ - Suite *suite; - TCase *tc; - assert(runner != NULL); - suite = runner->suite; - tc = suite->tests; - while (tc != NULL) { - int i; - for (i = 0; i < tc->ntests; ++i) { - runner->nchecks++; - - if (tc->setup != NULL) { - /* setup */ - if (setjmp(env)) { - add_failure(runner, verbosity); - continue; - } - tc->setup(); - } - /* test */ - if (setjmp(env)) { - add_failure(runner, verbosity); - continue; - } - (tc->tests[i])(); - - /* teardown */ - if (tc->teardown != NULL) { - if (setjmp(env)) { - add_failure(runner, verbosity); - continue; - } - tc->teardown(); - } - } - tc = tc->next_tcase; - } - if (verbosity) { - int passed = runner->nchecks - runner->nfailures; - double percentage = ((double) passed) / runner->nchecks; - int display = (int) (percentage * 100); - printf("%d%%: Checks: %d, Failed: %d\n", - display, runner->nchecks, runner->nfailures); - } -} - -void -_fail_unless(int condition, const char *file, int line, char *msg) -{ - /* Always print the error message so it isn't lost. In this case, - we have a failure, so there's no reason to be quiet about what - it is. - */ - if (msg != NULL) - printf("%s", msg); - longjmp(env, 1); -} - -int -srunner_ntests_failed(SRunner *runner) -{ - assert(runner != NULL); - return runner->nfailures; -} - -void -srunner_free(SRunner *runner) -{ - free(runner->suite); - free(runner); -} diff --git a/3rdparty/expat-2.0.1/tests/minicheck.h b/3rdparty/expat-2.0.1/tests/minicheck.h deleted file mode 100644 index f846bead1a..0000000000 --- a/3rdparty/expat-2.0.1/tests/minicheck.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Miniature re-implementation of the "check" library. - * - * This is intended to support just enough of check to run the Expat - * tests. This interface is based entirely on the portion of the - * check library being used. - * - * This is *source* compatible, but not necessary *link* compatible. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define CK_NOFORK 0 -#define CK_FORK 1 - -#define CK_SILENT 0 -#define CK_NORMAL 1 -#define CK_VERBOSE 2 - -/* Workaround for Tru64 Unix systems where the C compiler has a working - __func__, but the C++ compiler only has a working __FUNCTION__. This - could be fixed in configure.in, but it's not worth it right now. */ -#if defined(__osf__) && defined(__cplusplus) -#define __func__ __FUNCTION__ -#endif - -#define START_TEST(testname) static void testname(void) { \ - _check_set_test_info(__func__, __FILE__, __LINE__); \ - { -#define END_TEST } } - -#define fail(msg) _fail_unless(0, __FILE__, __LINE__, msg) - -typedef void (*tcase_setup_function)(void); -typedef void (*tcase_teardown_function)(void); -typedef void (*tcase_test_function)(void); - -typedef struct SRunner SRunner; -typedef struct Suite Suite; -typedef struct TCase TCase; - -struct SRunner { - Suite *suite; - int nchecks; - int nfailures; -}; - -struct Suite { - char *name; - TCase *tests; -}; - -struct TCase { - char *name; - tcase_setup_function setup; - tcase_teardown_function teardown; - tcase_test_function *tests; - int ntests; - int allocated; - TCase *next_tcase; -}; - - -/* Internal helper. */ -void _check_set_test_info(char const *function, - char const *filename, int lineno); - - -/* - * Prototypes for the actual implementation. - */ - -void _fail_unless(int condition, const char *file, int line, char *msg); -Suite *suite_create(char *name); -TCase *tcase_create(char *name); -void suite_add_tcase(Suite *suite, TCase *tc); -void tcase_add_checked_fixture(TCase *, - tcase_setup_function, - tcase_teardown_function); -void tcase_add_test(TCase *tc, tcase_test_function test); -SRunner *srunner_create(Suite *suite); -void srunner_run_all(SRunner *runner, int verbosity); -int srunner_ntests_failed(SRunner *runner); -void srunner_free(SRunner *runner); - -#ifdef __cplusplus -} -#endif diff --git a/3rdparty/expat-2.0.1/tests/runtests.c b/3rdparty/expat-2.0.1/tests/runtests.c deleted file mode 100644 index 3521c086bb..0000000000 --- a/3rdparty/expat-2.0.1/tests/runtests.c +++ /dev/null @@ -1,1514 +0,0 @@ -/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. - - runtest.c : run the Expat test suite -*/ - -#ifdef HAVE_EXPAT_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "expat.h" -#include "chardata.h" -#include "minicheck.h" - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -#ifdef XML_LARGE_SIZE -#define XML_FMT_INT_MOD "ll" -#else -#define XML_FMT_INT_MOD "l" -#endif - -static XML_Parser parser; - - -static void -basic_setup(void) -{ - parser = XML_ParserCreate(NULL); - if (parser == NULL) - fail("Parser not created."); -} - -static void -basic_teardown(void) -{ - if (parser != NULL) - XML_ParserFree(parser); -} - -/* Generate a failure using the parser state to create an error message; - this should be used when the parser reports an error we weren't - expecting. -*/ -static void -_xml_failure(XML_Parser parser, const char *file, int line) -{ - char buffer[1024]; - enum XML_Error err = XML_GetErrorCode(parser); - sprintf(buffer, - " %d: %s (line %" XML_FMT_INT_MOD "u, offset %"\ - XML_FMT_INT_MOD "u)\n reported from %s, line %d\n", - err, - XML_ErrorString(err), - XML_GetCurrentLineNumber(parser), - XML_GetCurrentColumnNumber(parser), - file, line); - _fail_unless(0, file, line, buffer); -} - -#define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__) - -static void -_expect_failure(char *text, enum XML_Error errorCode, char *errorMessage, - char *file, int lineno) -{ - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) - /* Hackish use of _fail_unless() macro, but let's us report - the right filename and line number. */ - _fail_unless(0, file, lineno, errorMessage); - if (XML_GetErrorCode(parser) != errorCode) - _xml_failure(parser, file, lineno); -} - -#define expect_failure(text, errorCode, errorMessage) \ - _expect_failure((text), (errorCode), (errorMessage), \ - __FILE__, __LINE__) - -/* Dummy handlers for when we need to set a handler to tickle a bug, - but it doesn't need to do anything. -*/ - -static void XMLCALL -dummy_start_doctype_handler(void *userData, - const XML_Char *doctypeName, - const XML_Char *sysid, - const XML_Char *pubid, - int has_internal_subset) -{} - -static void XMLCALL -dummy_end_doctype_handler(void *userData) -{} - -static void XMLCALL -dummy_entity_decl_handler(void *userData, - const XML_Char *entityName, - int is_parameter_entity, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName) -{} - -static void XMLCALL -dummy_notation_decl_handler(void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{} - -static void XMLCALL -dummy_element_decl_handler(void *userData, - const XML_Char *name, - XML_Content *model) -{} - -static void XMLCALL -dummy_attlist_decl_handler(void *userData, - const XML_Char *elname, - const XML_Char *attname, - const XML_Char *att_type, - const XML_Char *dflt, - int isrequired) -{} - -static void XMLCALL -dummy_comment_handler(void *userData, const XML_Char *data) -{} - -static void XMLCALL -dummy_pi_handler(void *userData, const XML_Char *target, const XML_Char *data) -{} - -static void XMLCALL -dummy_start_element(void *userData, - const XML_Char *name, const XML_Char **atts) -{} - - -/* - * Character & encoding tests. - */ - -START_TEST(test_nul_byte) -{ - char text[] = "\0"; - - /* test that a NUL byte (in US-ASCII data) is an error */ - if (XML_Parse(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_OK) - fail("Parser did not report error on NUL-byte."); - if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) - xml_failure(parser); -} -END_TEST - - -START_TEST(test_u0000_char) -{ - /* test that a NUL byte (in US-ASCII data) is an error */ - expect_failure("", - XML_ERROR_BAD_CHAR_REF, - "Parser did not report error on NUL-byte."); -} -END_TEST - -START_TEST(test_bom_utf8) -{ - /* This test is really just making sure we don't core on a UTF-8 BOM. */ - char *text = "\357\273\277"; - - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -START_TEST(test_bom_utf16_be) -{ - char text[] = "\376\377\0<\0e\0/\0>"; - - if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -START_TEST(test_bom_utf16_le) -{ - char text[] = "\377\376<\0e\0/\0>\0"; - - if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -static void XMLCALL -accumulate_characters(void *userData, const XML_Char *s, int len) -{ - CharData_AppendXMLChars((CharData *)userData, s, len); -} - -static void XMLCALL -accumulate_attribute(void *userData, const XML_Char *name, - const XML_Char **atts) -{ - CharData *storage = (CharData *)userData; - if (storage->count < 0 && atts != NULL && atts[0] != NULL) { - /* "accumulate" the value of the first attribute we see */ - CharData_AppendXMLChars(storage, atts[1], -1); - } -} - - -static void -_run_character_check(XML_Char *text, XML_Char *expected, - const char *file, int line) -{ - CharData storage; - - CharData_Init(&storage); - XML_SetUserData(parser, &storage); - XML_SetCharacterDataHandler(parser, accumulate_characters); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - _xml_failure(parser, file, line); - CharData_CheckXMLChars(&storage, expected); -} - -#define run_character_check(text, expected) \ - _run_character_check(text, expected, __FILE__, __LINE__) - -static void -_run_attribute_check(XML_Char *text, XML_Char *expected, - const char *file, int line) -{ - CharData storage; - - CharData_Init(&storage); - XML_SetUserData(parser, &storage); - XML_SetStartElementHandler(parser, accumulate_attribute); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - _xml_failure(parser, file, line); - CharData_CheckXMLChars(&storage, expected); -} - -#define run_attribute_check(text, expected) \ - _run_attribute_check(text, expected, __FILE__, __LINE__) - -/* Regression test for SF bug #491986. */ -START_TEST(test_danish_latin1) -{ - char *text = - "\n" - "J\xF8rgen \xE6\xF8\xE5\xC6\xD8\xC5"; - run_character_check(text, - "J\xC3\xB8rgen \xC3\xA6\xC3\xB8\xC3\xA5\xC3\x86\xC3\x98\xC3\x85"); -} -END_TEST - - -/* Regression test for SF bug #514281. */ -START_TEST(test_french_charref_hexidecimal) -{ - char *text = - "\n" - "éèàçêÈ"; - run_character_check(text, - "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); -} -END_TEST - -START_TEST(test_french_charref_decimal) -{ - char *text = - "\n" - "éèàçêÈ"; - run_character_check(text, - "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); -} -END_TEST - -START_TEST(test_french_latin1) -{ - char *text = - "\n" - "\xE9\xE8\xE0\xE7\xEa\xC8"; - run_character_check(text, - "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); -} -END_TEST - -START_TEST(test_french_utf8) -{ - char *text = - "\n" - "\xC3\xA9"; - run_character_check(text, "\xC3\xA9"); -} -END_TEST - -/* Regression test for SF bug #600479. - XXX There should be a test that exercises all legal XML Unicode - characters as PCDATA and attribute value content, and XML Name - characters as part of element and attribute names. -*/ -START_TEST(test_utf8_false_rejection) -{ - char *text = "\xEF\xBA\xBF"; - run_character_check(text, "\xEF\xBA\xBF"); -} -END_TEST - -/* Regression test for SF bug #477667. - This test assures that any 8-bit character followed by a 7-bit - character will not be mistakenly interpreted as a valid UTF-8 - sequence. -*/ -START_TEST(test_illegal_utf8) -{ - char text[100]; - int i; - - for (i = 128; i <= 255; ++i) { - sprintf(text, "%ccd", i); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) { - sprintf(text, - "expected token error for '%c' (ordinal %d) in UTF-8 text", - i, i); - fail(text); - } - else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) - xml_failure(parser); - /* Reset the parser since we use the same parser repeatedly. */ - XML_ParserReset(parser, NULL); - } -} -END_TEST - -START_TEST(test_utf16) -{ - /* - some text - */ - char text[] = - "\000<\000?\000x\000m\000\154\000 \000v\000e\000r\000s\000i\000o" - "\000n\000=\000'\0001\000.\000\060\000'\000 \000e\000n\000c\000o" - "\000d\000i\000n\000g\000=\000'\000U\000T\000F\000-\0001\000\066" - "\000'\000?\000>\000\n" - "\000<\000d\000o\000c\000 \000a\000=\000'\0001\0002\0003\000'" - "\000>\000s\000o\000m\000e\000 \000t\000e\000x\000t\000<\000/" - "\000d\000o\000c\000>"; - if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -START_TEST(test_utf16_le_epilog_newline) -{ - unsigned int first_chunk_bytes = 17; - char text[] = - "\xFF\xFE" /* BOM */ - "<\000e\000/\000>\000" /* document element */ - "\r\000\n\000\r\000\n\000"; /* epilog */ - - if (first_chunk_bytes >= sizeof(text) - 1) - fail("bad value of first_chunk_bytes"); - if ( XML_Parse(parser, text, first_chunk_bytes, XML_FALSE) - == XML_STATUS_ERROR) - xml_failure(parser); - else { - enum XML_Status rc; - rc = XML_Parse(parser, text + first_chunk_bytes, - sizeof(text) - first_chunk_bytes - 1, XML_TRUE); - if (rc == XML_STATUS_ERROR) - xml_failure(parser); - } -} -END_TEST - -/* Regression test for SF bug #481609, #774028. */ -START_TEST(test_latin1_umlauts) -{ - char *text = - "\n" - "\xE4 \xF6 \xFC ä ö ü ä ö ü >"; - char *utf8 = - "\xC3\xA4 \xC3\xB6 \xC3\xBC " - "\xC3\xA4 \xC3\xB6 \xC3\xBC " - "\xC3\xA4 \xC3\xB6 \xC3\xBC >"; - run_character_check(text, utf8); - XML_ParserReset(parser, NULL); - run_attribute_check(text, utf8); -} -END_TEST - -/* Regression test #1 for SF bug #653180. */ -START_TEST(test_line_number_after_parse) -{ - char *text = - "\n" - "\n" - "\n"; - XML_Size lineno; - - if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) - xml_failure(parser); - lineno = XML_GetCurrentLineNumber(parser); - if (lineno != 4) { - char buffer[100]; - sprintf(buffer, - "expected 4 lines, saw %" XML_FMT_INT_MOD "u", lineno); - fail(buffer); - } -} -END_TEST - -/* Regression test #2 for SF bug #653180. */ -START_TEST(test_column_number_after_parse) -{ - char *text = ""; - XML_Size colno; - - if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) - xml_failure(parser); - colno = XML_GetCurrentColumnNumber(parser); - if (colno != 11) { - char buffer[100]; - sprintf(buffer, - "expected 11 columns, saw %" XML_FMT_INT_MOD "u", colno); - fail(buffer); - } -} -END_TEST - -static void XMLCALL -start_element_event_handler2(void *userData, const XML_Char *name, - const XML_Char **attr) -{ - CharData *storage = (CharData *) userData; - char buffer[100]; - - sprintf(buffer, - "<%s> at col:%" XML_FMT_INT_MOD "u line:%"\ - XML_FMT_INT_MOD "u\n", name, - XML_GetCurrentColumnNumber(parser), - XML_GetCurrentLineNumber(parser)); - CharData_AppendString(storage, buffer); -} - -static void XMLCALL -end_element_event_handler2(void *userData, const XML_Char *name) -{ - CharData *storage = (CharData *) userData; - char buffer[100]; - - sprintf(buffer, - " at col:%" XML_FMT_INT_MOD "u line:%"\ - XML_FMT_INT_MOD "u\n", name, - XML_GetCurrentColumnNumber(parser), - XML_GetCurrentLineNumber(parser)); - CharData_AppendString(storage, buffer); -} - -/* Regression test #3 for SF bug #653180. */ -START_TEST(test_line_and_column_numbers_inside_handlers) -{ - char *text = - "\n" /* Unix end-of-line */ - " \r\n" /* Windows end-of-line */ - " \r" /* Mac OS end-of-line */ - " \n" - " \n" - " \n" - " \n" - ""; - char *expected = - " at col:0 line:1\n" - " at col:2 line:2\n" - " at col:4 line:3\n" - " at col:8 line:3\n" - " at col:2 line:4\n" - " at col:2 line:5\n" - " at col:4 line:6\n" - " at col:8 line:6\n" - " at col:2 line:7\n" - " at col:0 line:8\n"; - CharData storage; - - CharData_Init(&storage); - XML_SetUserData(parser, &storage); - XML_SetStartElementHandler(parser, start_element_event_handler2); - XML_SetEndElementHandler(parser, end_element_event_handler2); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); - - CharData_CheckString(&storage, expected); -} -END_TEST - -/* Regression test #4 for SF bug #653180. */ -START_TEST(test_line_number_after_error) -{ - char *text = - "\n" - " \n" - " "; /* missing */ - XML_Size lineno; - if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) - fail("Expected a parse error"); - - lineno = XML_GetCurrentLineNumber(parser); - if (lineno != 3) { - char buffer[100]; - sprintf(buffer, "expected 3 lines, saw %" XML_FMT_INT_MOD "u", lineno); - fail(buffer); - } -} -END_TEST - -/* Regression test #5 for SF bug #653180. */ -START_TEST(test_column_number_after_error) -{ - char *text = - "\n" - " \n" - " "; /* missing */ - XML_Size colno; - if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR) - fail("Expected a parse error"); - - colno = XML_GetCurrentColumnNumber(parser); - if (colno != 4) { - char buffer[100]; - sprintf(buffer, - "expected 4 columns, saw %" XML_FMT_INT_MOD "u", colno); - fail(buffer); - } -} -END_TEST - -/* Regression test for SF bug #478332. */ -START_TEST(test_really_long_lines) -{ - /* This parses an input line longer than INIT_DATA_BUF_SIZE - characters long (defined to be 1024 in xmlparse.c). We take a - really cheesy approach to building the input buffer, because - this avoids writing bugs in buffer-filling code. - */ - char *text = - "" - /* 64 chars */ - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - /* until we have at least 1024 characters on the line: */ - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+" - ""; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - - -/* - * Element event tests. - */ - -static void XMLCALL -end_element_event_handler(void *userData, const XML_Char *name) -{ - CharData *storage = (CharData *) userData; - CharData_AppendString(storage, "/"); - CharData_AppendXMLChars(storage, name, -1); -} - -START_TEST(test_end_element_events) -{ - char *text = ""; - char *expected = "/c/b/f/d/a"; - CharData storage; - - CharData_Init(&storage); - XML_SetUserData(parser, &storage); - XML_SetEndElementHandler(parser, end_element_event_handler); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); - CharData_CheckString(&storage, expected); -} -END_TEST - - -/* - * Attribute tests. - */ - -/* Helpers used by the following test; this checks any "attr" and "refs" - attributes to make sure whitespace has been normalized. - - Return true if whitespace has been normalized in a string, using - the rules for attribute value normalization. The 'is_cdata' flag - is needed since CDATA attributes don't need to have multiple - whitespace characters collapsed to a single space, while other - attribute data types do. (Section 3.3.3 of the recommendation.) -*/ -static int -is_whitespace_normalized(const XML_Char *s, int is_cdata) -{ - int blanks = 0; - int at_start = 1; - while (*s) { - if (*s == ' ') - ++blanks; - else if (*s == '\t' || *s == '\n' || *s == '\r') - return 0; - else { - if (at_start) { - at_start = 0; - if (blanks && !is_cdata) - /* illegal leading blanks */ - return 0; - } - else if (blanks > 1 && !is_cdata) - return 0; - blanks = 0; - } - ++s; - } - if (blanks && !is_cdata) - return 0; - return 1; -} - -/* Check the attribute whitespace checker: */ -static void -testhelper_is_whitespace_normalized(void) -{ - assert(is_whitespace_normalized("abc", 0)); - assert(is_whitespace_normalized("abc", 1)); - assert(is_whitespace_normalized("abc def ghi", 0)); - assert(is_whitespace_normalized("abc def ghi", 1)); - assert(!is_whitespace_normalized(" abc def ghi", 0)); - assert(is_whitespace_normalized(" abc def ghi", 1)); - assert(!is_whitespace_normalized("abc def ghi", 0)); - assert(is_whitespace_normalized("abc def ghi", 1)); - assert(!is_whitespace_normalized("abc def ghi ", 0)); - assert(is_whitespace_normalized("abc def ghi ", 1)); - assert(!is_whitespace_normalized(" ", 0)); - assert(is_whitespace_normalized(" ", 1)); - assert(!is_whitespace_normalized("\t", 0)); - assert(!is_whitespace_normalized("\t", 1)); - assert(!is_whitespace_normalized("\n", 0)); - assert(!is_whitespace_normalized("\n", 1)); - assert(!is_whitespace_normalized("\r", 0)); - assert(!is_whitespace_normalized("\r", 1)); - assert(!is_whitespace_normalized("abc\t def", 1)); -} - -static void XMLCALL -check_attr_contains_normalized_whitespace(void *userData, - const XML_Char *name, - const XML_Char **atts) -{ - int i; - for (i = 0; atts[i] != NULL; i += 2) { - const XML_Char *attrname = atts[i]; - const XML_Char *value = atts[i + 1]; - if (strcmp("attr", attrname) == 0 - || strcmp("ents", attrname) == 0 - || strcmp("refs", attrname) == 0) { - if (!is_whitespace_normalized(value, 0)) { - char buffer[256]; - sprintf(buffer, "attribute value not normalized: %s='%s'", - attrname, value); - fail(buffer); - } - } - } -} - -START_TEST(test_attr_whitespace_normalization) -{ - char *text = - "\n" - "]>\n" - "\n" - " \n" - " \n" - ""; - - XML_SetStartElementHandler(parser, - check_attr_contains_normalized_whitespace); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - - -/* - * XML declaration tests. - */ - -START_TEST(test_xmldecl_misplaced) -{ - expect_failure("\n" - "\n" - "", - XML_ERROR_MISPLACED_XML_PI, - "failed to report misplaced XML declaration"); -} -END_TEST - -/* Regression test for SF bug #584832. */ -static int XMLCALL -UnknownEncodingHandler(void *data,const XML_Char *encoding,XML_Encoding *info) -{ - if (strcmp(encoding,"unsupported-encoding") == 0) { - int i; - for (i = 0; i < 256; ++i) - info->map[i] = i; - info->data = NULL; - info->convert = NULL; - info->release = NULL; - return XML_STATUS_OK; - } - return XML_STATUS_ERROR; -} - -START_TEST(test_unknown_encoding_internal_entity) -{ - char *text = - "\n" - "]>\n" - ""; - - XML_SetUnknownEncodingHandler(parser, UnknownEncodingHandler, NULL); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Regression test for SF bug #620106. */ -static int XMLCALL -external_entity_loader_set_encoding(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - /* This text says it's an unsupported encoding, but it's really - UTF-8, which we tell Expat using XML_SetEncoding(). - */ - char *text = - "" - "\xC3\xA9"; - XML_Parser extparser; - - extparser = XML_ExternalEntityParserCreate(parser, context, NULL); - if (extparser == NULL) - fail("Could not create external entity parser."); - if (!XML_SetEncoding(extparser, "utf-8")) - fail("XML_SetEncoding() ignored for external entity"); - if ( XML_Parse(extparser, text, strlen(text), XML_TRUE) - == XML_STATUS_ERROR) { - xml_failure(parser); - return 0; - } - return 1; -} - -START_TEST(test_ext_entity_set_encoding) -{ - char *text = - "\n" - "]>\n" - "&en;"; - - XML_SetExternalEntityRefHandler(parser, - external_entity_loader_set_encoding); - run_character_check(text, "\xC3\xA9"); -} -END_TEST - -/* Test that no error is reported for unknown entities if we don't - read an external subset. This was fixed in Expat 1.95.5. -*/ -START_TEST(test_wfc_undeclared_entity_unread_external_subset) { - char *text = - "\n" - "&entity;"; - - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Test that an error is reported for unknown entities if we don't - have an external subset. -*/ -START_TEST(test_wfc_undeclared_entity_no_external_subset) { - expect_failure("&entity;", - XML_ERROR_UNDEFINED_ENTITY, - "Parser did not report undefined entity w/out a DTD."); -} -END_TEST - -/* Test that an error is reported for unknown entities if we don't - read an external subset, but have been declared standalone. -*/ -START_TEST(test_wfc_undeclared_entity_standalone) { - char *text = - "\n" - "\n" - "&entity;"; - - expect_failure(text, - XML_ERROR_UNDEFINED_ENTITY, - "Parser did not report undefined entity (standalone)."); -} -END_TEST - -static int XMLCALL -external_entity_loader(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - char *text = (char *)XML_GetUserData(parser); - XML_Parser extparser; - - extparser = XML_ExternalEntityParserCreate(parser, context, NULL); - if (extparser == NULL) - fail("Could not create external entity parser."); - if ( XML_Parse(extparser, text, strlen(text), XML_TRUE) - == XML_STATUS_ERROR) { - xml_failure(parser); - return XML_STATUS_ERROR; - } - return XML_STATUS_OK; -} - -/* Test that an error is reported for unknown entities if we have read - an external subset, and standalone is true. -*/ -START_TEST(test_wfc_undeclared_entity_with_external_subset_standalone) { - char *text = - "\n" - "\n" - "&entity;"; - char *foo_text = - ""; - - XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); - XML_SetUserData(parser, foo_text); - XML_SetExternalEntityRefHandler(parser, external_entity_loader); - expect_failure(text, - XML_ERROR_UNDEFINED_ENTITY, - "Parser did not report undefined entity (external DTD)."); -} -END_TEST - -/* Test that no error is reported for unknown entities if we have read - an external subset, and standalone is false. -*/ -START_TEST(test_wfc_undeclared_entity_with_external_subset) { - char *text = - "\n" - "\n" - "&entity;"; - char *foo_text = - ""; - - XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); - XML_SetUserData(parser, foo_text); - XML_SetExternalEntityRefHandler(parser, external_entity_loader); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -START_TEST(test_wfc_no_recursive_entity_refs) -{ - char *text = - "\n" - "]>\n" - "&entity;"; - - expect_failure(text, - XML_ERROR_RECURSIVE_ENTITY_REF, - "Parser did not report recursive entity reference."); -} -END_TEST - -/* Regression test for SF bug #483514. */ -START_TEST(test_dtd_default_handling) -{ - char *text = - "\n" - "\n" - "\n" - "\n" - "\n" - "\n" - "]>"; - - XML_SetDefaultHandler(parser, accumulate_characters); - XML_SetDoctypeDeclHandler(parser, - dummy_start_doctype_handler, - dummy_end_doctype_handler); - XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); - XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); - XML_SetElementDeclHandler(parser, dummy_element_decl_handler); - XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); - XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); - XML_SetCommentHandler(parser, dummy_comment_handler); - run_character_check(text, "\n\n\n\n\n\n\n"); -} -END_TEST - -/* See related SF bug #673791. - When namespace processing is enabled, setting the namespace URI for - a prefix is not allowed; this test ensures that it *is* allowed - when namespace processing is not enabled. - (See Namespaces in XML, section 2.) -*/ -START_TEST(test_empty_ns_without_namespaces) -{ - char *text = - "\n" - " \n" - ""; - - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Regression test for SF bug #824420. - Checks that an xmlns:prefix attribute set in an attribute's default - value isn't misinterpreted. -*/ -START_TEST(test_ns_in_attribute_default_without_namespaces) -{ - char *text = - "\n" - " ]>\n" - ""; - - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -static char *long_character_data_text = - "" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - "012345678901234567890123456789012345678901234567890123456789" - ""; - -static XML_Bool resumable = XML_FALSE; - -static void -clearing_aborting_character_handler(void *userData, - const XML_Char *s, int len) -{ - XML_StopParser(parser, resumable); - XML_SetCharacterDataHandler(parser, NULL); -} - -/* Regression test for SF bug #1515266: missing check of stopped - parser in doContext() 'for' loop. */ -START_TEST(test_stop_parser_between_char_data_calls) -{ - /* The sample data must be big enough that there are two calls to - the character data handler from within the inner "for" loop of - the XML_TOK_DATA_CHARS case in doContent(), and the character - handler must stop the parser and clear the character data - handler. - */ - char *text = long_character_data_text; - - XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); - resumable = XML_FALSE; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) - xml_failure(parser); - if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED) - xml_failure(parser); -} -END_TEST - -/* Regression test for SF bug #1515266: missing check of stopped - parser in doContext() 'for' loop. */ -START_TEST(test_suspend_parser_between_char_data_calls) -{ - /* The sample data must be big enough that there are two calls to - the character data handler from within the inner "for" loop of - the XML_TOK_DATA_CHARS case in doContent(), and the character - handler must stop the parser and clear the character data - handler. - */ - char *text = long_character_data_text; - - XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); - resumable = XML_TRUE; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED) - xml_failure(parser); - if (XML_GetErrorCode(parser) != XML_ERROR_NONE) - xml_failure(parser); -} -END_TEST - - -/* - * Namespaces tests. - */ - -static void -namespace_setup(void) -{ - parser = XML_ParserCreateNS(NULL, ' '); - if (parser == NULL) - fail("Parser not created."); -} - -static void -namespace_teardown(void) -{ - basic_teardown(); -} - -/* Check that an element name and attribute name match the expected values. - The expected values are passed as an array reference of string pointers - provided as the userData argument; the first is the expected - element name, and the second is the expected attribute name. -*/ -static void XMLCALL -triplet_start_checker(void *userData, const XML_Char *name, - const XML_Char **atts) -{ - char **elemstr = (char **)userData; - char buffer[1024]; - if (strcmp(elemstr[0], name) != 0) { - sprintf(buffer, "unexpected start string: '%s'", name); - fail(buffer); - } - if (strcmp(elemstr[1], atts[0]) != 0) { - sprintf(buffer, "unexpected attribute string: '%s'", atts[0]); - fail(buffer); - } -} - -/* Check that the element name passed to the end-element handler matches - the expected value. The expected value is passed as the first element - in an array of strings passed as the userData argument. -*/ -static void XMLCALL -triplet_end_checker(void *userData, const XML_Char *name) -{ - char **elemstr = (char **)userData; - if (strcmp(elemstr[0], name) != 0) { - char buffer[1024]; - sprintf(buffer, "unexpected end string: '%s'", name); - fail(buffer); - } -} - -START_TEST(test_return_ns_triplet) -{ - char *text = - ""; - char *elemstr[] = { - "http://expat.sf.net/ e foo", - "http://expat.sf.net/ a bar" - }; - XML_SetReturnNSTriplet(parser, XML_TRUE); - XML_SetUserData(parser, elemstr); - XML_SetElementHandler(parser, triplet_start_checker, triplet_end_checker); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -static void XMLCALL -overwrite_start_checker(void *userData, const XML_Char *name, - const XML_Char **atts) -{ - CharData *storage = (CharData *) userData; - CharData_AppendString(storage, "start "); - CharData_AppendXMLChars(storage, name, -1); - while (*atts != NULL) { - CharData_AppendString(storage, "\nattribute "); - CharData_AppendXMLChars(storage, *atts, -1); - atts += 2; - } - CharData_AppendString(storage, "\n"); -} - -static void XMLCALL -overwrite_end_checker(void *userData, const XML_Char *name) -{ - CharData *storage = (CharData *) userData; - CharData_AppendString(storage, "end "); - CharData_AppendXMLChars(storage, name, -1); - CharData_AppendString(storage, "\n"); -} - -static void -run_ns_tagname_overwrite_test(char *text, char *result) -{ - CharData storage; - CharData_Init(&storage); - XML_SetUserData(parser, &storage); - XML_SetElementHandler(parser, - overwrite_start_checker, overwrite_end_checker); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); - CharData_CheckString(&storage, result); -} - -/* Regression test for SF bug #566334. */ -START_TEST(test_ns_tagname_overwrite) -{ - char *text = - "\n" - " \n" - " \n" - ""; - char *result = - "start http://xml.libexpat.org/ e\n" - "start http://xml.libexpat.org/ f\n" - "attribute http://xml.libexpat.org/ attr\n" - "end http://xml.libexpat.org/ f\n" - "start http://xml.libexpat.org/ g\n" - "attribute http://xml.libexpat.org/ attr2\n" - "end http://xml.libexpat.org/ g\n" - "end http://xml.libexpat.org/ e\n"; - run_ns_tagname_overwrite_test(text, result); -} -END_TEST - -/* Regression test for SF bug #566334. */ -START_TEST(test_ns_tagname_overwrite_triplet) -{ - char *text = - "\n" - " \n" - " \n" - ""; - char *result = - "start http://xml.libexpat.org/ e n\n" - "start http://xml.libexpat.org/ f n\n" - "attribute http://xml.libexpat.org/ attr n\n" - "end http://xml.libexpat.org/ f n\n" - "start http://xml.libexpat.org/ g n\n" - "attribute http://xml.libexpat.org/ attr2 n\n" - "end http://xml.libexpat.org/ g n\n" - "end http://xml.libexpat.org/ e n\n"; - XML_SetReturnNSTriplet(parser, XML_TRUE); - run_ns_tagname_overwrite_test(text, result); -} -END_TEST - - -/* Regression test for SF bug #620343. */ -static void XMLCALL -start_element_fail(void *userData, - const XML_Char *name, const XML_Char **atts) -{ - /* We should never get here. */ - fail("should never reach start_element_fail()"); -} - -static void XMLCALL -start_ns_clearing_start_element(void *userData, - const XML_Char *prefix, - const XML_Char *uri) -{ - XML_SetStartElementHandler((XML_Parser) userData, NULL); -} - -START_TEST(test_start_ns_clears_start_element) -{ - /* This needs to use separate start/end tags; using the empty tag - syntax doesn't cause the problematic path through Expat to be - taken. - */ - char *text = ""; - - XML_SetStartElementHandler(parser, start_element_fail); - XML_SetStartNamespaceDeclHandler(parser, start_ns_clearing_start_element); - XML_UseParserAsHandlerArg(parser); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Regression test for SF bug #616863. */ -static int XMLCALL -external_entity_handler(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - long callno = 1 + (long)XML_GetUserData(parser); - char *text; - XML_Parser p2; - - if (callno == 1) - text = ("\n" - "\n" - "\n"); - else - text = ("" - ""); - - XML_SetUserData(parser, (void *) callno); - p2 = XML_ExternalEntityParserCreate(parser, context, NULL); - if (XML_Parse(p2, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) { - xml_failure(p2); - return 0; - } - XML_ParserFree(p2); - return 1; -} - -START_TEST(test_default_ns_from_ext_subset_and_ext_ge) -{ - char *text = - "\n" - "\n" - "]>\n" - "\n" - "&en;\n" - ""; - - XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); - XML_SetExternalEntityRefHandler(parser, external_entity_handler); - /* We actually need to set this handler to tickle this bug. */ - XML_SetStartElementHandler(parser, dummy_start_element); - XML_SetUserData(parser, NULL); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Regression test #1 for SF bug #673791. */ -START_TEST(test_ns_prefix_with_empty_uri_1) -{ - char *text = - "\n" - " \n" - ""; - - expect_failure(text, - XML_ERROR_UNDECLARING_PREFIX, - "Did not report re-setting namespace" - " URI with prefix to ''."); -} -END_TEST - -/* Regression test #2 for SF bug #673791. */ -START_TEST(test_ns_prefix_with_empty_uri_2) -{ - char *text = - "\n" - ""; - - expect_failure(text, - XML_ERROR_UNDECLARING_PREFIX, - "Did not report setting namespace URI with prefix to ''."); -} -END_TEST - -/* Regression test #3 for SF bug #673791. */ -START_TEST(test_ns_prefix_with_empty_uri_3) -{ - char *text = - "\n" - " \n" - "]>\n" - ""; - - expect_failure(text, - XML_ERROR_UNDECLARING_PREFIX, - "Didn't report attr default setting NS w/ prefix to ''."); -} -END_TEST - -/* Regression test #4 for SF bug #673791. */ -START_TEST(test_ns_prefix_with_empty_uri_4) -{ - char *text = - "\n" - " \n" - "]>\n" - ""; - /* Packaged info expected by the end element handler; - the weird structuring lets us re-use the triplet_end_checker() - function also used for another test. */ - char *elemstr[] = { - "http://xml.libexpat.org/ doc prefix" - }; - XML_SetReturnNSTriplet(parser, XML_TRUE); - XML_SetUserData(parser, elemstr); - XML_SetEndElementHandler(parser, triplet_end_checker); - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -START_TEST(test_ns_default_with_empty_uri) -{ - char *text = - "\n" - " \n" - ""; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) - xml_failure(parser); -} -END_TEST - -/* Regression test for SF bug #692964: two prefixes for one namespace. */ -START_TEST(test_ns_duplicate_attrs_diff_prefixes) -{ - char *text = - ""; - expect_failure(text, - XML_ERROR_DUPLICATE_ATTRIBUTE, - "did not report multiple attributes with same URI+name"); -} -END_TEST - -/* Regression test for SF bug #695401: unbound prefix. */ -START_TEST(test_ns_unbound_prefix_on_attribute) -{ - char *text = ""; - expect_failure(text, - XML_ERROR_UNBOUND_PREFIX, - "did not report unbound prefix on attribute"); -} -END_TEST - -/* Regression test for SF bug #695401: unbound prefix. */ -START_TEST(test_ns_unbound_prefix_on_element) -{ - char *text = ""; - expect_failure(text, - XML_ERROR_UNBOUND_PREFIX, - "did not report unbound prefix on element"); -} -END_TEST - -static Suite * -make_suite(void) -{ - Suite *s = suite_create("basic"); - TCase *tc_basic = tcase_create("basic tests"); - TCase *tc_namespace = tcase_create("XML namespaces"); - - suite_add_tcase(s, tc_basic); - tcase_add_checked_fixture(tc_basic, basic_setup, basic_teardown); - tcase_add_test(tc_basic, test_nul_byte); - tcase_add_test(tc_basic, test_u0000_char); - tcase_add_test(tc_basic, test_bom_utf8); - tcase_add_test(tc_basic, test_bom_utf16_be); - tcase_add_test(tc_basic, test_bom_utf16_le); - tcase_add_test(tc_basic, test_illegal_utf8); - tcase_add_test(tc_basic, test_utf16); - tcase_add_test(tc_basic, test_utf16_le_epilog_newline); - tcase_add_test(tc_basic, test_latin1_umlauts); - /* Regression test for SF bug #491986. */ - tcase_add_test(tc_basic, test_danish_latin1); - /* Regression test for SF bug #514281. */ - tcase_add_test(tc_basic, test_french_charref_hexidecimal); - tcase_add_test(tc_basic, test_french_charref_decimal); - tcase_add_test(tc_basic, test_french_latin1); - tcase_add_test(tc_basic, test_french_utf8); - tcase_add_test(tc_basic, test_utf8_false_rejection); - tcase_add_test(tc_basic, test_line_number_after_parse); - tcase_add_test(tc_basic, test_column_number_after_parse); - tcase_add_test(tc_basic, test_line_and_column_numbers_inside_handlers); - tcase_add_test(tc_basic, test_line_number_after_error); - tcase_add_test(tc_basic, test_column_number_after_error); - tcase_add_test(tc_basic, test_really_long_lines); - tcase_add_test(tc_basic, test_end_element_events); - tcase_add_test(tc_basic, test_attr_whitespace_normalization); - tcase_add_test(tc_basic, test_xmldecl_misplaced); - tcase_add_test(tc_basic, test_unknown_encoding_internal_entity); - tcase_add_test(tc_basic, - test_wfc_undeclared_entity_unread_external_subset); - tcase_add_test(tc_basic, test_wfc_undeclared_entity_no_external_subset); - tcase_add_test(tc_basic, test_wfc_undeclared_entity_standalone); - tcase_add_test(tc_basic, test_wfc_undeclared_entity_with_external_subset); - tcase_add_test(tc_basic, - test_wfc_undeclared_entity_with_external_subset_standalone); - tcase_add_test(tc_basic, test_wfc_no_recursive_entity_refs); - tcase_add_test(tc_basic, test_ext_entity_set_encoding); - tcase_add_test(tc_basic, test_dtd_default_handling); - tcase_add_test(tc_basic, test_empty_ns_without_namespaces); - tcase_add_test(tc_basic, test_ns_in_attribute_default_without_namespaces); - tcase_add_test(tc_basic, test_stop_parser_between_char_data_calls); - tcase_add_test(tc_basic, test_suspend_parser_between_char_data_calls); - - suite_add_tcase(s, tc_namespace); - tcase_add_checked_fixture(tc_namespace, - namespace_setup, namespace_teardown); - tcase_add_test(tc_namespace, test_return_ns_triplet); - tcase_add_test(tc_namespace, test_ns_tagname_overwrite); - tcase_add_test(tc_namespace, test_ns_tagname_overwrite_triplet); - tcase_add_test(tc_namespace, test_start_ns_clears_start_element); - tcase_add_test(tc_namespace, test_default_ns_from_ext_subset_and_ext_ge); - tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_1); - tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_2); - tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_3); - tcase_add_test(tc_namespace, test_ns_prefix_with_empty_uri_4); - tcase_add_test(tc_namespace, test_ns_default_with_empty_uri); - tcase_add_test(tc_namespace, test_ns_duplicate_attrs_diff_prefixes); - tcase_add_test(tc_namespace, test_ns_unbound_prefix_on_attribute); - tcase_add_test(tc_namespace, test_ns_unbound_prefix_on_element); - - return s; -} - - -int -main(int argc, char *argv[]) -{ - int i, nf; - int verbosity = CK_NORMAL; - Suite *s = make_suite(); - SRunner *sr = srunner_create(s); - - /* run the tests for internal helper functions */ - testhelper_is_whitespace_normalized(); - - for (i = 1; i < argc; ++i) { - char *opt = argv[i]; - if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0) - verbosity = CK_VERBOSE; - else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0) - verbosity = CK_SILENT; - else { - fprintf(stderr, "runtests: unknown option '%s'\n", opt); - return 2; - } - } - if (verbosity != CK_SILENT) - printf("Expat version: %s\n", XML_ExpatVersion()); - srunner_run_all(sr, verbosity); - nf = srunner_ntests_failed(sr); - srunner_free(sr); - - return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff --git a/3rdparty/expat-2.0.1/tests/runtestspp.cpp b/3rdparty/expat-2.0.1/tests/runtestspp.cpp deleted file mode 100644 index c35dc583d5..0000000000 --- a/3rdparty/expat-2.0.1/tests/runtestspp.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// C++ compilation harness for the test suite. -// -// This is used to ensure the Expat headers can be included from C++ -// and have everything work as expected. -// -#include "runtests.c" diff --git a/3rdparty/expat-2.0.1/tests/xmltest.sh b/3rdparty/expat-2.0.1/tests/xmltest.sh deleted file mode 100644 index 725441edb6..0000000000 --- a/3rdparty/expat-2.0.1/tests/xmltest.sh +++ /dev/null @@ -1,141 +0,0 @@ -#! /bin/sh - -# EXPAT TEST SCRIPT FOR W3C XML TEST SUITE - -# This script can be used to exercise Expat against the -# w3c.org xml test suite, available from -# http://www.w3.org/XML/Test/xmlts20020606.zip. - -# To run this script, first set XMLWF so that xmlwf can be -# found, then set the output directory with OUTPUT. - -# The script lists all test cases where Expat shows a discrepancy -# from the expected result. Test cases where only the canonical -# output differs are prefixed with "Output differs:", and a diff file -# is generated in the appropriate subdirectory under $OUTPUT. - -# If there are output files provided, the script will use -# output from xmlwf and compare the desired output against it. -# However, one has to take into account that the canonical output -# produced by xmlwf conforms to an older definition of canonical XML -# and does not generate notation declarations. - -MYDIR="`dirname \"$0\"`" -cd "$MYDIR" -MYDIR="`pwd`" -XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf" -# XMLWF=/usr/local/bin/xmlwf -TS="$MYDIR/XML-Test-Suite" -# OUTPUT must terminate with the directory separator. -OUTPUT="$TS/out/" -# OUTPUT=/home/tmp/xml-testsuite-out/ - - -# RunXmlwfNotWF file reldir -# reldir includes trailing slash -RunXmlwfNotWF() { - file="$1" - reldir="$2" - $XMLWF -p "$file" > outfile || return $? - read outdata < outfile - if test "$outdata" = "" ; then - echo "Expected well-formed: $reldir$file" - return 1 - else - return 0 - fi -} - -# RunXmlwfWF file reldir -# reldir includes trailing slash -RunXmlwfWF() { - file="$1" - reldir="$2" - $XMLWF -p -d "$OUTPUT$reldir" "$file" > outfile || return $? - read outdata < outfile - if test "$outdata" = "" ; then - if [ -f "out/$file" ] ; then - diff "$OUTPUT$reldir$file" "out/$file" > outfile - if [ -s outfile ] ; then - cp outfile "$OUTPUT$reldir$file.diff" - echo "Output differs: $reldir$file" - return 1 - fi - fi - return 0 - else - echo "In $reldir: $outdata" - return 1 - fi -} - -SUCCESS=0 -ERROR=0 - -UpdateStatus() { - if [ "$1" -eq 0 ] ; then - SUCCESS=`expr $SUCCESS + 1` - else - ERROR=`expr $ERROR + 1` - fi -} - -########################## -# well-formed test cases # -########################## - -cd "$TS/xmlconf" -for xmldir in ibm/valid/P* \ - ibm/invalid/P* \ - xmltest/valid/ext-sa \ - xmltest/valid/not-sa \ - xmltest/invalid \ - xmltest/invalid/not-sa \ - xmltest/valid/sa \ - sun/valid \ - sun/invalid ; do - cd "$TS/xmlconf/$xmldir" - mkdir -p "$OUTPUT$xmldir" - for xmlfile in *.xml ; do - RunXmlwfWF "$xmlfile" "$xmldir/" - UpdateStatus $? - done - rm outfile -done - -cd "$TS/xmlconf/oasis" -mkdir -p "$OUTPUT"oasis -for xmlfile in *pass*.xml ; do - RunXmlwfWF "$xmlfile" "oasis/" - UpdateStatus $? -done -rm outfile - -############################## -# not well-formed test cases # -############################## - -cd "$TS/xmlconf" -for xmldir in ibm/not-wf/P* \ - ibm/not-wf/misc \ - xmltest/not-wf/ext-sa \ - xmltest/not-wf/not-sa \ - xmltest/not-wf/sa \ - sun/not-wf ; do - cd "$TS/xmlconf/$xmldir" - for xmlfile in *.xml ; do - RunXmlwfNotWF "$xmlfile" "$xmldir/" - UpdateStatus $? - done - rm outfile -done - -cd "$TS/xmlconf/oasis" -for xmlfile in *fail*.xml ; do - RunXmlwfNotWF "$xmlfile" "oasis/" - UpdateStatus $? -done -rm outfile - -echo "Passed: $SUCCESS" -echo "Failed: $ERROR" diff --git a/3rdparty/expat-2.0.1/vms/README.vms b/3rdparty/expat-2.0.1/vms/README.vms deleted file mode 100644 index 63052402de..0000000000 --- a/3rdparty/expat-2.0.1/vms/README.vms +++ /dev/null @@ -1,23 +0,0 @@ -4-jun-2002 Craig A. Berry - Added rudimentary build procedures for - OpenVMS based on work by Martin Vorlaender. - - -You'll need MMS or its freeware equivalent MMK. Just go to the -top-level directory and type - -$ MMS/DESCRIPTION=[.vms] - - or - -$ MMK/DESCRIPTION=[.vms] - -You'll end up with the object library expat.olb. For now, installation -consists merely of copying the object library, include files, and -documentation to a suitable location. - -To-do list: - - -- create a shareable image - -- build and run the tests and build the xmlwf utility - -- create an install target diff --git a/3rdparty/expat-2.0.1/vms/descrip.mms b/3rdparty/expat-2.0.1/vms/descrip.mms deleted file mode 100644 index 93dfacf4cf..0000000000 --- a/3rdparty/expat-2.0.1/vms/descrip.mms +++ /dev/null @@ -1,70 +0,0 @@ -# Bare bones description file (Makefile) for OpenVMS - -PACKAGE = expat -VERSION = 1.95.8 -EXPAT_MAJOR_VERSION=1 -EXPAT_MINOR_VERSION=95 -EXPAT_EDIT=8 - -O = .obj -OLB = .olb - -LIBRARY = expat$(OLB) -LIBDIR = [.lib] -SOURCES = $(LIBDIR)xmlparse.c $(LIBDIR)xmltok.c $(LIBDIR)xmlrole.c -OBJECTS = xmlparse$(O) xmltok$(O) xmlrole$(O) - -TEMPLATES = xmltok_impl.c xmltok_ns.c -APIHEADER = $(LIBDIR)expat.h -HEADERS = $(LIBDIR)ascii.h $(LIBDIR)iasciitab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h \ - $(LIBDIR)asciitab.h $(LIBDIR)latin1tab.h \ - $(LIBDIR)nametab.h $(LIBDIR)xmldef.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok_impl.h - -CONFIG_HEADER = expat_config.h -INCLUDES = /INCLUDE=([],[.lib]) -DEFS = /DEFINE=(PACKAGE="""$(PACKAGE)""",VERSION="""$(PACKAGE)_$(VERSION)""",HAVE_EXPAT_CONFIG_H) -LIBREVISION = 0 -LIBCURRENT = 1 -LIBAGE = 0 -# -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -# -# DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEMPLATES) $(APIHEADER) $(HEADERS) -# -# TAR = gtar -# GZIP_ENV = --best -# -.FIRST : - IF F$SEARCH("$(LIBRARY)") .EQS. "" THEN $(LIBR) /CREATE /OBJECT $(LIBRARY) - -all : $(LIBRARY) - @ write sys$output "All made." - -.SUFFIXES : -.SUFFIXES : $(OLB) $(O) .C .H - -.c$(O) : - $(COMPILE) $(MMS$SOURCE) - -$(O)$(OLB) : - @ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" - - THEN LIBRARY/CREATE/LOG $(MMS$TARGET) - @ LIBRARY /REPLACE /LOG $(MMS$TARGET) $(MMS$SOURCE) - -clean : - DELETE $(LIBRARY);*,*$(O);* - -$(LIBRARY) : $(LIBRARY)( $(OBJECTS) ) - $(LIBR) /COMPRESS $(MMS$TARGET) - -$(CONFIG_HEADER) : [.vms]expat_config.h - COPY/LOG $(MMS$SOURCE) $(MMS$TARGET) - -xmlparse$(O) : $(LIBDIR)xmlparse.c $(LIBDIR)expat.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok.h $(CONFIG_HEADER) - -xmlrole$(O) : $(LIBDIR)xmlrole.c $(LIBDIR)ascii.h $(LIBDIR)xmlrole.h $(CONFIG_HEADER) - -xmltok$(O) : $(LIBDIR)xmltok.c $(LIBDIR)xmltok_impl.c $(LIBDIR)xmltok_ns.c \ - $(LIBDIR)ascii.h $(LIBDIR)asciitab.h $(LIBDIR)iasciitab.h $(LIBDIR)latin1tab.h \ - $(LIBDIR)nametab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h $(LIBDIR)xmltok_impl.h $(CONFIG_HEADER) - diff --git a/3rdparty/expat-2.0.1/vms/expat_config.h b/3rdparty/expat-2.0.1/vms/expat_config.h deleted file mode 100644 index d5db89e56c..0000000000 --- a/3rdparty/expat-2.0.1/vms/expat_config.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2000, Clark Cooper - All rights reserved. - - This is free software. You are permitted to copy, distribute, or modify - it under the terms of the MIT/X license (contained in the COPYING file - with this distribution.) -*/ - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* Define if you have the bcopy function. */ -#undef HAVE_BCOPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -#define XML_NS -#define XML_DTD - -#ifdef WORDS_BIGENDIAN -#define XML_BYTE_ORDER 21 -#else -#define XML_BYTE_ORDER 12 -#endif - -#define XML_CONTEXT_BYTES 1024 - -#ifndef HAVE_MEMMOVE -#ifdef HAVE_BCOPY -#define memmove(d,s,l) bcopy((s),(d),(l)) -#else -#define memmove(d,s,l) ;punting on memmove; -#endif - -#endif diff --git a/3rdparty/expat-2.0.1/win32/MANIFEST.txt b/3rdparty/expat-2.0.1/win32/MANIFEST.txt deleted file mode 100644 index c7d3260945..0000000000 --- a/3rdparty/expat-2.0.1/win32/MANIFEST.txt +++ /dev/null @@ -1,27 +0,0 @@ - Overview of the Expat distribution - -The Expat distribution creates several subdirectories on your system. -Some of these directories contain components of interest to all Expat -users, and some contain material of interest to developers who wish to -use Expat in their applications. In the list below, is the -directory you specified to the installer. - - Directory Contents - --------------------------------------------------------------------- - \ Some general information files. - - \Doc\ API documentation for developers. - - \Bin\ Pre-compiled dynamic libraries for developers. - Pre-compiled static libraries for developers (*MT.lib). - The XML well-formedness checker xmlwf. - - \Source\ Source code, which may interest some developers, - including a workspace for Microsft Visual C++. - The source code includes the parser, the well- - formedness checker, and a couple of small sample - applications. - - \Source\bcb5\ Project files for Borland C++ Builder 5 and BCC 5.5. - - diff --git a/3rdparty/expat-2.0.1/win32/README.txt b/3rdparty/expat-2.0.1/win32/README.txt deleted file mode 100644 index 23ddd5514e..0000000000 --- a/3rdparty/expat-2.0.1/win32/README.txt +++ /dev/null @@ -1,80 +0,0 @@ - -Expat can be built on Windows in three ways: - using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin. - -* Cygwin: - This follows the Unix build procedures. - -* C++ Builder 5: - Possible with make files in the BCB5 subdirectory. - Details can be found in the ReadMe file located there. - -* MS Visual C++ 6: - Based on the workspace file expat.dsw. The related project - files (.dsp) are located in the lib subdirectory. - -* MS Visual Studio .NET 2002, 2003, 2005: - The VC++ 6 workspace file (expat.dsw) and project files (.dsp) - can be opened and imported in VS.NET without problems. - -* All MS C/C++ compilers: - The output for all projects will be generated in the win32\bin - directory, intermediate files will be located in project-specific - subdirectories of win32\tmp. - -* Creating MinGW dynamic libraries from MS VC++ DLLs: - - On the command line, execute these steps: - pexports libexpat.dll > expat.def - pexports libexpatw.dll > expatw.def - dlltool -d expat.def -l libexpat.a - dlltool -d expatw.def -l libexpatw.a - - The *.a files are mingw libraries. - -* Special note about MS VC++ and runtime libraries: - - There are three possible configurations: using the - single threaded or multithreaded run-time library, - or using the multi-threaded run-time Dll. That is, - one can build three different Expat libraries depending - on the needs of the application. - - Dynamic Linking: - - By default the Expat Dlls are built to link statically - with the multi-threaded run-time library. - The libraries are named - - libexpat(w).dll - - libexpat(w).lib (import library) - The "w" indicates the UTF-16 version of the library. - - One rarely uses other versions of the Dll, but they can - be built easily by specifying a different RTL linkage in - the IDE on the C/C++ tab under the category Code Generation. - - Static Linking: - - The libraries should be named like this: - Single-theaded: libexpat(w)ML.lib - Multi-threaded: libexpat(w)MT.lib - Multi-threaded Dll: libexpat(w)MD.lib - The suffixes conform to the compiler switch settings - /ML, /MT and /MD for MS VC++. - - Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the - single-threaded runtime library is not supported anymore. - - By default, the expat-static and expatw-static projects are set up - to link statically against the multithreaded run-time library, - so they will build libexpatMT.lib or libexpatwMT.lib files. - - To build the other versions of the static library, - go to Project - Settings: - - specify a different RTL linkage on the C/C++ tab - under the category Code Generation. - - then, on the Library tab, change the output file name - accordingly, as described above - - An application linking to the static libraries must - have the global macro XML_STATIC defined. diff --git a/3rdparty/expat-2.0.1/win32/expat.iss b/3rdparty/expat-2.0.1/win32/expat.iss deleted file mode 100644 index f290e0070e..0000000000 --- a/3rdparty/expat-2.0.1/win32/expat.iss +++ /dev/null @@ -1,69 +0,0 @@ -; Basic setup script for the Inno Setup installer builder. For more -; information on the free installer builder, see www.jrsoftware.org. -; -; This script was contributed by Tim Peters. -; The current version is used with Inno Setup 2.0.19. - -[Setup] -AppName=Expat -AppId=expat -AppVersion=2.0.1 -AppVerName=Expat 2.0.1 -AppCopyright=Copyright © 1998-2006 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers -AppPublisher=The Expat Developers -AppPublisherURL=http://www.libexpat.org/ -AppSupportURL=http://www.libexpat.org/ -AppUpdatesURL=http://www.libexpat.org/ -UninstallDisplayName=Expat XML Parser 2.0.1 -VersionInfoVersion=2.0.1 - -DefaultDirName={pf}\Expat 2.0.1 -UninstallFilesDir={app}\Uninstall - -Compression=lzma -SolidCompression=yes -SourceDir=.. -OutputDir=win32 -DisableStartupPrompt=yes -AllowNoIcons=yes -DisableProgramGroupPage=yes -DisableReadyPage=yes - -[Files] -Flags: ignoreversion; Source: win32\bin\Release\xmlwf.exe; DestDir: "{app}\Bin" -Flags: ignoreversion; Source: win32\MANIFEST.txt; DestDir: "{app}" -Flags: ignoreversion; Source: Changes; DestDir: "{app}"; DestName: Changes.txt -Flags: ignoreversion; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt -Flags: ignoreversion; Source: README; DestDir: "{app}"; DestName: README.txt -Flags: ignoreversion; Source: doc\*.html; DestDir: "{app}\Doc" -Flags: ignoreversion; Source: doc\*.css; DestDir: "{app}\Doc" -Flags: ignoreversion; Source: doc\*.png; DestDir: "{app}\Doc" -Flags: ignoreversion; Source: win32\bin\Release\*.dll; DestDir: "{app}\Bin" -Flags: ignoreversion; Source: win32\bin\Release\*.lib; DestDir: "{app}\Bin" -Flags: ignoreversion; Source: expat.dsw; DestDir: "{app}\Source" -Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source" -Flags: ignoreversion; Source: bcb5\*.bp*; DestDir: "{app}\Source\bcb5" -Flags: ignoreversion; Source: bcb5\*.mak; DestDir: "{app}\Source\bcb5" -Flags: ignoreversion; Source: bcb5\*.def; DestDir: "{app}\Source\bcb5" -Flags: ignoreversion; Source: bcb5\*.txt; DestDir: "{app}\Source\bcb5" -Flags: ignoreversion; Source: bcb5\*.bat; DestDir: "{app}\Source\bcb5" -Flags: ignoreversion; Source: lib\*.c; DestDir: "{app}\Source\lib" -Flags: ignoreversion; Source: lib\*.h; DestDir: "{app}\Source\lib" -Flags: ignoreversion; Source: lib\*.def; DestDir: "{app}\Source\lib" -Flags: ignoreversion; Source: lib\*.dsp; DestDir: "{app}\Source\lib" -Flags: ignoreversion; Source: examples\*.c; DestDir: "{app}\Source\examples" -Flags: ignoreversion; Source: examples\*.dsp; DestDir: "{app}\Source\examples" -Flags: ignoreversion; Source: tests\*.c; DestDir: "{app}\Source\tests" -Flags: ignoreversion; Source: tests\*.cpp; DestDir: "{app}\Source\tests" -Flags: ignoreversion; Source: tests\*.h; DestDir: "{app}\Source\tests" -Flags: ignoreversion; Source: tests\README.txt; DestDir: "{app}\Source\tests" -Flags: ignoreversion; Source: tests\benchmark\*.c; DestDir: "{app}\Source\tests\benchmark" -Flags: ignoreversion; Source: tests\benchmark\*.ds*; DestDir: "{app}\Source\tests\benchmark" -Flags: ignoreversion; Source: tests\benchmark\README.txt; DestDir: "{app}\Source\tests\benchmark" -Flags: ignoreversion; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf" -Flags: ignoreversion; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf" -Flags: ignoreversion; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf" - -[Messages] -WelcomeLabel1=Welcome to the Expat XML Parser Setup Wizard -WelcomeLabel2=This will install [name/ver] on your computer.%n%nExpat is an XML parser with a C-language API, and is primarily made available to allow developers to build applications which use XML using a portable API and fast implementation.%n%nIt is strongly recommended that you close all other applications you have running before continuing. This will help prevent any conflicts during the installation process. diff --git a/3rdparty/expat-2.0.1/xmlwf/codepage.c b/3rdparty/expat-2.0.1/xmlwf/codepage.c deleted file mode 100644 index 57e48ff2d1..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/codepage.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include "codepage.h" - -#if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__))) -#define STRICT 1 -#define WIN32_LEAN_AND_MEAN 1 - -#include - -int -codepageMap(int cp, int *map) -{ - int i; - CPINFO info; - if (!GetCPInfo(cp, &info) || info.MaxCharSize > 2) - return 0; - for (i = 0; i < 256; i++) - map[i] = -1; - if (info.MaxCharSize > 1) { - for (i = 0; i < MAX_LEADBYTES; i+=2) { - int j, lim; - if (info.LeadByte[i] == 0 && info.LeadByte[i + 1] == 0) - break; - lim = info.LeadByte[i + 1]; - for (j = info.LeadByte[i]; j <= lim; j++) - map[j] = -2; - } - } - for (i = 0; i < 256; i++) { - if (map[i] == -1) { - char c = (char)i; - unsigned short n; - if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, - &c, 1, &n, 1) == 1) - map[i] = n; - } - } - return 1; -} - -int -codepageConvert(int cp, const char *p) -{ - unsigned short c; - if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, - p, 2, &c, 1) == 1) - return c; - return -1; -} - -#else /* not WIN32 */ - -int -codepageMap(int cp, int *map) -{ - return 0; -} - -int -codepageConvert(int cp, const char *p) -{ - return -1; -} - -#endif /* not WIN32 */ diff --git a/3rdparty/expat-2.0.1/xmlwf/codepage.h b/3rdparty/expat-2.0.1/xmlwf/codepage.h deleted file mode 100644 index 6a4df68883..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/codepage.h +++ /dev/null @@ -1,6 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -int codepageMap(int cp, int *map); -int codepageConvert(int cp, const char *p); diff --git a/3rdparty/expat-2.0.1/xmlwf/ct.c b/3rdparty/expat-2.0.1/xmlwf/ct.c deleted file mode 100644 index 95903a3450..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/ct.c +++ /dev/null @@ -1,147 +0,0 @@ -#define CHARSET_MAX 41 - -static const char * -getTok(const char **pp) -{ - enum { inAtom, inString, init, inComment }; - int state = init; - const char *tokStart = 0; - for (;;) { - switch (**pp) { - case '\0': - return 0; - case ' ': - case '\r': - case '\t': - case '\n': - if (state == inAtom) - return tokStart; - break; - case '(': - if (state == inAtom) - return tokStart; - if (state != inString) - state++; - break; - case ')': - if (state > init) - --state; - else if (state != inString) - return 0; - break; - case ';': - case '/': - case '=': - if (state == inAtom) - return tokStart; - if (state == init) - return (*pp)++; - break; - case '\\': - ++*pp; - if (**pp == '\0') - return 0; - break; - case '"': - switch (state) { - case inString: - ++*pp; - return tokStart; - case inAtom: - return tokStart; - case init: - tokStart = *pp; - state = inString; - break; - } - break; - default: - if (state == init) { - tokStart = *pp; - state = inAtom; - } - break; - } - ++*pp; - } - /* not reached */ -} - -/* key must be lowercase ASCII */ - -static int -matchkey(const char *start, const char *end, const char *key) -{ - if (!start) - return 0; - for (; start != end; start++, key++) - if (*start != *key && *start != 'A' + (*key - 'a')) - return 0; - return *key == '\0'; -} - -void -getXMLCharset(const char *buf, char *charset) -{ - const char *next, *p; - - charset[0] = '\0'; - next = buf; - p = getTok(&next); - if (matchkey(p, next, "text")) - strcpy(charset, "us-ascii"); - else if (!matchkey(p, next, "application")) - return; - p = getTok(&next); - if (!p || *p != '/') - return; - p = getTok(&next); - if (matchkey(p, next, "xml")) - isXml = 1; - p = getTok(&next); - while (p) { - if (*p == ';') { - p = getTok(&next); - if (matchkey(p, next, "charset")) { - p = getTok(&next); - if (p && *p == '=') { - p = getTok(&next); - if (p) { - char *s = charset; - if (*p == '"') { - while (++p != next - 1) { - if (*p == '\\') - ++p; - if (s == charset + CHARSET_MAX - 1) { - charset[0] = '\0'; - break; - } - *s++ = *p; - } - *s++ = '\0'; - } - else { - if (next - p > CHARSET_MAX - 1) - break; - while (p != next) - *s++ = *p++; - *s = 0; - break; - } - } - } - } - } - else - p = getTok(&next); - } -} - -int -main(int argc, char **argv) -{ - char buf[CHARSET_MAX]; - getXMLCharset(argv[1], buf); - printf("charset = \"%s\"\n", buf); - return 0; -} diff --git a/3rdparty/expat-2.0.1/xmlwf/filemap.h b/3rdparty/expat-2.0.1/xmlwf/filemap.h deleted file mode 100644 index 814edec252..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/filemap.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include - -#ifdef XML_UNICODE -int filemap(const wchar_t *name, - void (*processor)(const void *, size_t, - const wchar_t *, void *arg), - void *arg); -#else -int filemap(const char *name, - void (*processor)(const void *, size_t, - const char *, void *arg), - void *arg); -#endif diff --git a/3rdparty/expat-2.0.1/xmlwf/readfilemap.c b/3rdparty/expat-2.0.1/xmlwf/readfilemap.c deleted file mode 100644 index 088dda5c23..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/readfilemap.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include -#include -#include -#include -#include - -#ifdef __WATCOMC__ -#ifndef __LINUX__ -#include -#else -#include -#endif -#endif - -#ifdef __BEOS__ -#include -#endif - -#ifndef S_ISREG -#ifndef S_IFREG -#define S_IFREG _S_IFREG -#endif -#ifndef S_IFMT -#define S_IFMT _S_IFMT -#endif -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif /* not S_ISREG */ - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 -#endif -#endif - -#include "filemap.h" - -int -filemap(const char *name, - void (*processor)(const void *, size_t, const char *, void *arg), - void *arg) -{ - size_t nbytes; - int fd; - int n; - struct stat sb; - void *p; - - fd = open(name, O_RDONLY|O_BINARY); - if (fd < 0) { - perror(name); - return 0; - } - if (fstat(fd, &sb) < 0) { - perror(name); - return 0; - } - if (!S_ISREG(sb.st_mode)) { - fprintf(stderr, "%s: not a regular file\n", name); - return 0; - } - nbytes = sb.st_size; - /* malloc will return NULL with nbytes == 0, handle files with size 0 */ - if (nbytes == 0) { - static const char c = '\0'; - processor(&c, 0, name, arg); - close(fd); - return 1; - } - p = malloc(nbytes); - if (!p) { - fprintf(stderr, "%s: out of memory\n", name); - close(fd); - return 0; - } - n = read(fd, p, nbytes); - if (n < 0) { - perror(name); - free(p); - close(fd); - return 0; - } - if (n != nbytes) { - fprintf(stderr, "%s: read unexpected number of bytes\n", name); - free(p); - close(fd); - return 0; - } - processor(p, nbytes, name, arg); - free(p); - close(fd); - return 1; -} diff --git a/3rdparty/expat-2.0.1/xmlwf/unixfilemap.c b/3rdparty/expat-2.0.1/xmlwf/unixfilemap.c deleted file mode 100644 index 93adce32e8..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/unixfilemap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 -#endif - -#include "filemap.h" - -int -filemap(const char *name, - void (*processor)(const void *, size_t, const char *, void *arg), - void *arg) -{ - int fd; - size_t nbytes; - struct stat sb; - void *p; - - fd = open(name, O_RDONLY); - if (fd < 0) { - perror(name); - return 0; - } - if (fstat(fd, &sb) < 0) { - perror(name); - close(fd); - return 0; - } - if (!S_ISREG(sb.st_mode)) { - close(fd); - fprintf(stderr, "%s: not a regular file\n", name); - return 0; - } - - nbytes = sb.st_size; - /* mmap fails for zero length files */ - if (nbytes == 0) { - static const char c = '\0'; - processor(&c, 0, name, arg); - close(fd); - return 1; - } - p = (void *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ, - MAP_FILE|MAP_PRIVATE, fd, (off_t)0); - if (p == (void *)-1) { - perror(name); - close(fd); - return 0; - } - processor(p, nbytes, name, arg); - munmap((caddr_t)p, nbytes); - close(fd); - return 1; -} diff --git a/3rdparty/expat-2.0.1/xmlwf/win32filemap.c b/3rdparty/expat-2.0.1/xmlwf/win32filemap.c deleted file mode 100644 index 41dc35b614..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/win32filemap.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#define STRICT 1 -#define WIN32_LEAN_AND_MEAN 1 - -#ifdef XML_UNICODE_WCHAR_T -#ifndef XML_UNICODE -#define XML_UNICODE -#endif -#endif - -#ifdef XML_UNICODE -#define UNICODE -#define _UNICODE -#endif /* XML_UNICODE */ -#include -#include -#include -#include "filemap.h" - -static void win32perror(const TCHAR *); - -int -filemap(const TCHAR *name, - void (*processor)(const void *, size_t, const TCHAR *, void *arg), - void *arg) -{ - HANDLE f; - HANDLE m; - DWORD size; - DWORD sizeHi; - void *p; - - f = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_FLAG_SEQUENTIAL_SCAN, NULL); - if (f == INVALID_HANDLE_VALUE) { - win32perror(name); - return 0; - } - size = GetFileSize(f, &sizeHi); - if (size == (DWORD)-1) { - win32perror(name); - return 0; - } - if (sizeHi) { - _ftprintf(stderr, _T("%s: bigger than 2Gb\n"), name); - return 0; - } - /* CreateFileMapping barfs on zero length files */ - if (size == 0) { - static const char c = '\0'; - processor(&c, 0, name, arg); - CloseHandle(f); - return 1; - } - m = CreateFileMapping(f, NULL, PAGE_READONLY, 0, 0, NULL); - if (m == NULL) { - win32perror(name); - CloseHandle(f); - return 0; - } - p = MapViewOfFile(m, FILE_MAP_READ, 0, 0, 0); - if (p == NULL) { - win32perror(name); - CloseHandle(m); - CloseHandle(f); - return 0; - } - processor(p, size, name, arg); - UnmapViewOfFile(p); - CloseHandle(m); - CloseHandle(f); - return 1; -} - -static void -win32perror(const TCHAR *s) -{ - LPVOID buf; - if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &buf, - 0, - NULL)) { - _ftprintf(stderr, _T("%s: %s"), s, buf); - fflush(stderr); - LocalFree(buf); - } - else - _ftprintf(stderr, _T("%s: unknown Windows error\n"), s); -} diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlfile.c b/3rdparty/expat-2.0.1/xmlwf/xmlfile.c deleted file mode 100644 index 99eeeaaef2..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlfile.c +++ /dev/null @@ -1,244 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include -#include -#include -#include -#include - -#ifdef COMPILED_FROM_DSP -#include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" -#elif defined(HAVE_EXPAT_CONFIG_H) -#include -#endif /* ndef COMPILED_FROM_DSP */ - -#include "expat.h" -#include "xmlfile.h" -#include "xmltchar.h" -#include "filemap.h" - -#if (defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__LINUX__))) -#include -#endif - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 -#endif -#endif - -#ifdef _DEBUG -#define READ_SIZE 16 -#else -#define READ_SIZE (1024*8) -#endif - - -typedef struct { - XML_Parser parser; - int *retPtr; -} PROCESS_ARGS; - -static void -reportError(XML_Parser parser, const XML_Char *filename) -{ - enum XML_Error code = XML_GetErrorCode(parser); - const XML_Char *message = XML_ErrorString(code); - if (message) - ftprintf(stdout, T("%s:%" XML_FMT_INT_MOD "u:%" XML_FMT_INT_MOD "u: %s\n"), - filename, - XML_GetErrorLineNumber(parser), - XML_GetErrorColumnNumber(parser), - message); - else - ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code); -} - -/* This implementation will give problems on files larger than INT_MAX. */ -static void -processFile(const void *data, size_t size, - const XML_Char *filename, void *args) -{ - XML_Parser parser = ((PROCESS_ARGS *)args)->parser; - int *retPtr = ((PROCESS_ARGS *)args)->retPtr; - if (XML_Parse(parser, (const char *)data, (int)size, 1) == XML_STATUS_ERROR) { - reportError(parser, filename); - *retPtr = 0; - } - else - *retPtr = 1; -} - -#if (defined(WIN32) || defined(__WATCOMC__)) - -static int -isAsciiLetter(XML_Char c) -{ - return (T('a') <= c && c <= T('z')) || (T('A') <= c && c <= T('Z')); -} - -#endif /* WIN32 */ - -static const XML_Char * -resolveSystemId(const XML_Char *base, const XML_Char *systemId, - XML_Char **toFree) -{ - XML_Char *s; - *toFree = 0; - if (!base - || *systemId == T('/') -#if (defined(WIN32) || defined(__WATCOMC__)) - || *systemId == T('\\') - || (isAsciiLetter(systemId[0]) && systemId[1] == T(':')) -#endif - ) - return systemId; - *toFree = (XML_Char *)malloc((tcslen(base) + tcslen(systemId) + 2) - * sizeof(XML_Char)); - if (!*toFree) - return systemId; - tcscpy(*toFree, base); - s = *toFree; - if (tcsrchr(s, T('/'))) - s = tcsrchr(s, T('/')) + 1; -#if (defined(WIN32) || defined(__WATCOMC__)) - if (tcsrchr(s, T('\\'))) - s = tcsrchr(s, T('\\')) + 1; -#endif - tcscpy(s, systemId); - return *toFree; -} - -static int -externalEntityRefFilemap(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - int result; - XML_Char *s; - const XML_Char *filename; - XML_Parser entParser = XML_ExternalEntityParserCreate(parser, context, 0); - PROCESS_ARGS args; - args.retPtr = &result; - args.parser = entParser; - filename = resolveSystemId(base, systemId, &s); - XML_SetBase(entParser, filename); - if (!filemap(filename, processFile, &args)) - result = 0; - free(s); - XML_ParserFree(entParser); - return result; -} - -static int -processStream(const XML_Char *filename, XML_Parser parser) -{ - /* passing NULL for filename means read intput from stdin */ - int fd = 0; /* 0 is the fileno for stdin */ - - if (filename != NULL) { - fd = topen(filename, O_BINARY|O_RDONLY); - if (fd < 0) { - tperror(filename); - return 0; - } - } - for (;;) { - int nread; - char *buf = (char *)XML_GetBuffer(parser, READ_SIZE); - if (!buf) { - if (filename != NULL) - close(fd); - ftprintf(stderr, T("%s: out of memory\n"), - filename != NULL ? filename : "xmlwf"); - return 0; - } - nread = read(fd, buf, READ_SIZE); - if (nread < 0) { - tperror(filename != NULL ? filename : "STDIN"); - if (filename != NULL) - close(fd); - return 0; - } - if (XML_ParseBuffer(parser, nread, nread == 0) == XML_STATUS_ERROR) { - reportError(parser, filename != NULL ? filename : "STDIN"); - if (filename != NULL) - close(fd); - return 0; - } - if (nread == 0) { - if (filename != NULL) - close(fd); - break;; - } - } - return 1; -} - -static int -externalEntityRefStream(XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - XML_Char *s; - const XML_Char *filename; - int ret; - XML_Parser entParser = XML_ExternalEntityParserCreate(parser, context, 0); - filename = resolveSystemId(base, systemId, &s); - XML_SetBase(entParser, filename); - ret = processStream(filename, entParser); - free(s); - XML_ParserFree(entParser); - return ret; -} - -int -XML_ProcessFile(XML_Parser parser, - const XML_Char *filename, - unsigned flags) -{ - int result; - - if (!XML_SetBase(parser, filename)) { - ftprintf(stderr, T("%s: out of memory"), filename); - exit(1); - } - - if (flags & XML_EXTERNAL_ENTITIES) - XML_SetExternalEntityRefHandler(parser, - (flags & XML_MAP_FILE) - ? externalEntityRefFilemap - : externalEntityRefStream); - if (flags & XML_MAP_FILE) { - PROCESS_ARGS args; - args.retPtr = &result; - args.parser = parser; - if (!filemap(filename, processFile, &args)) - result = 0; - } - else - result = processStream(filename, parser); - return result; -} diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlfile.h b/3rdparty/expat-2.0.1/xmlwf/xmlfile.h deleted file mode 100644 index d093ecc06f..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlfile.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#define XML_MAP_FILE 01 -#define XML_EXTERNAL_ENTITIES 02 - -#ifdef XML_LARGE_SIZE -#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 -#define XML_FMT_INT_MOD "I64" -#else -#define XML_FMT_INT_MOD "ll" -#endif -#else -#define XML_FMT_INT_MOD "l" -#endif - -extern int XML_ProcessFile(XML_Parser parser, - const XML_Char *filename, - unsigned flags); diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlmime.c b/3rdparty/expat-2.0.1/xmlwf/xmlmime.c deleted file mode 100644 index 56a0e7f40e..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlmime.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include "xmlmime.h" - -static const char * -getTok(const char **pp) -{ - /* inComment means one level of nesting; inComment+1 means two levels etc */ - enum { inAtom, inString, init, inComment }; - int state = init; - const char *tokStart = 0; - for (;;) { - switch (**pp) { - case '\0': - if (state == inAtom) - return tokStart; - return 0; - case ' ': - case '\r': - case '\t': - case '\n': - if (state == inAtom) - return tokStart; - break; - case '(': - if (state == inAtom) - return tokStart; - if (state != inString) - state++; - break; - case ')': - if (state > init) - --state; - else if (state != inString) - return 0; - break; - case ';': - case '/': - case '=': - if (state == inAtom) - return tokStart; - if (state == init) - return (*pp)++; - break; - case '\\': - ++*pp; - if (**pp == '\0') - return 0; - break; - case '"': - switch (state) { - case inString: - ++*pp; - return tokStart; - case inAtom: - return tokStart; - case init: - tokStart = *pp; - state = inString; - break; - } - break; - default: - if (state == init) { - tokStart = *pp; - state = inAtom; - } - break; - } - ++*pp; - } - /* not reached */ -} - -/* key must be lowercase ASCII */ - -static int -matchkey(const char *start, const char *end, const char *key) -{ - if (!start) - return 0; - for (; start != end; start++, key++) - if (*start != *key && *start != 'A' + (*key - 'a')) - return 0; - return *key == '\0'; -} - -void -getXMLCharset(const char *buf, char *charset) -{ - const char *next, *p; - - charset[0] = '\0'; - next = buf; - p = getTok(&next); - if (matchkey(p, next, "text")) - strcpy(charset, "us-ascii"); - else if (!matchkey(p, next, "application")) - return; - p = getTok(&next); - if (!p || *p != '/') - return; - p = getTok(&next); -#if 0 - if (!matchkey(p, next, "xml") && charset[0] == '\0') - return; -#endif - p = getTok(&next); - while (p) { - if (*p == ';') { - p = getTok(&next); - if (matchkey(p, next, "charset")) { - p = getTok(&next); - if (p && *p == '=') { - p = getTok(&next); - if (p) { - char *s = charset; - if (*p == '"') { - while (++p != next - 1) { - if (*p == '\\') - ++p; - if (s == charset + CHARSET_MAX - 1) { - charset[0] = '\0'; - break; - } - *s++ = *p; - } - *s++ = '\0'; - } - else { - if (next - p > CHARSET_MAX - 1) - break; - while (p != next) - *s++ = *p++; - *s = 0; - break; - } - } - } - break; - } - } - else - p = getTok(&next); - } -} - -#ifdef TEST - -#include - -int -main(int argc, char *argv[]) -{ - char buf[CHARSET_MAX]; - if (argc <= 1) - return 1; - printf("%s\n", argv[1]); - getXMLCharset(argv[1], buf); - printf("charset=\"%s\"\n", buf); - return 0; -} - -#endif /* TEST */ diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlmime.h b/3rdparty/expat-2.0.1/xmlwf/xmlmime.h deleted file mode 100644 index bf0356df0d..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlmime.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif - -/* Registered charset names are at most 40 characters long. */ - -#define CHARSET_MAX 41 - -/* Figure out the charset to use from the ContentType. - buf contains the body of the header field (the part after "Content-Type:"). - charset gets the charset to use. It must be at least CHARSET_MAX chars - long. charset will be empty if the default charset should be used. -*/ - -void getXMLCharset(const char *buf, char *charset); - -#ifdef __cplusplus -} -#endif diff --git a/3rdparty/expat-2.0.1/xmlwf/xmltchar.h b/3rdparty/expat-2.0.1/xmlwf/xmltchar.h deleted file mode 100644 index 1088575512..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmltchar.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef XML_UNICODE -#ifndef XML_UNICODE_WCHAR_T -#error xmlwf requires a 16-bit Unicode-compatible wchar_t -#endif -#define T(x) L ## x -#define ftprintf fwprintf -#define tfopen _wfopen -#define fputts fputws -#define puttc putwc -#define tcscmp wcscmp -#define tcscpy wcscpy -#define tcscat wcscat -#define tcschr wcschr -#define tcsrchr wcsrchr -#define tcslen wcslen -#define tperror _wperror -#define topen _wopen -#define tmain wmain -#define tremove _wremove -#else /* not XML_UNICODE */ -#define T(x) x -#define ftprintf fprintf -#define tfopen fopen -#define fputts fputs -#define puttc putc -#define tcscmp strcmp -#define tcscpy strcpy -#define tcscat strcat -#define tcschr strchr -#define tcsrchr strrchr -#define tcslen strlen -#define tperror perror -#define topen open -#define tmain main -#define tremove remove -#endif /* not XML_UNICODE */ diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlurl.h b/3rdparty/expat-2.0.1/xmlwf/xmlurl.h deleted file mode 100644 index d329913ac8..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlurl.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif - -int XML_URLInit(); -void XML_URLUninit(); -int XML_ProcessURL(XML_Parser parser, - const XML_Char *url, - unsigned flags); - -#ifdef __cplusplus -} -#endif diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlwf.c b/3rdparty/expat-2.0.1/xmlwf/xmlwf.c deleted file mode 100644 index 41a433d3ce..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlwf.c +++ /dev/null @@ -1,859 +0,0 @@ -/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd - See the file COPYING for copying permission. -*/ - -#include -#include -#include -#include - -#include "expat.h" -#include "codepage.h" -#include "xmlfile.h" -#include "xmltchar.h" - -#ifdef _MSC_VER -#include -#endif - -#if defined(__amigaos__) && defined(__USE_INLINE__) -#include -#endif - -/* This ensures proper sorting. */ - -#define NSSEP T('\001') - -static void XMLCALL -characterData(void *userData, const XML_Char *s, int len) -{ - FILE *fp = (FILE *)userData; - for (; len > 0; --len, ++s) { - switch (*s) { - case T('&'): - fputts(T("&"), fp); - break; - case T('<'): - fputts(T("<"), fp); - break; - case T('>'): - fputts(T(">"), fp); - break; -#ifdef W3C14N - case 13: - fputts(T(" "), fp); - break; -#else - case T('"'): - fputts(T("""), fp); - break; - case 9: - case 10: - case 13: - ftprintf(fp, T("&#%d;"), *s); - break; -#endif - default: - puttc(*s, fp); - break; - } - } -} - -static void -attributeValue(FILE *fp, const XML_Char *s) -{ - puttc(T('='), fp); - puttc(T('"'), fp); - for (;;) { - switch (*s) { - case 0: - case NSSEP: - puttc(T('"'), fp); - return; - case T('&'): - fputts(T("&"), fp); - break; - case T('<'): - fputts(T("<"), fp); - break; - case T('"'): - fputts(T("""), fp); - break; -#ifdef W3C14N - case 9: - fputts(T(" "), fp); - break; - case 10: - fputts(T(" "), fp); - break; - case 13: - fputts(T(" "), fp); - break; -#else - case T('>'): - fputts(T(">"), fp); - break; - case 9: - case 10: - case 13: - ftprintf(fp, T("&#%d;"), *s); - break; -#endif - default: - puttc(*s, fp); - break; - } - s++; - } -} - -/* Lexicographically comparing UTF-8 encoded attribute values, -is equivalent to lexicographically comparing based on the character number. */ - -static int -attcmp(const void *att1, const void *att2) -{ - return tcscmp(*(const XML_Char **)att1, *(const XML_Char **)att2); -} - -static void XMLCALL -startElement(void *userData, const XML_Char *name, const XML_Char **atts) -{ - int nAtts; - const XML_Char **p; - FILE *fp = (FILE *)userData; - puttc(T('<'), fp); - fputts(name, fp); - - p = atts; - while (*p) - ++p; - nAtts = (int)((p - atts) >> 1); - if (nAtts > 1) - qsort((void *)atts, nAtts, sizeof(XML_Char *) * 2, attcmp); - while (*atts) { - puttc(T(' '), fp); - fputts(*atts++, fp); - attributeValue(fp, *atts); - atts++; - } - puttc(T('>'), fp); -} - -static void XMLCALL -endElement(void *userData, const XML_Char *name) -{ - FILE *fp = (FILE *)userData; - puttc(T('<'), fp); - puttc(T('/'), fp); - fputts(name, fp); - puttc(T('>'), fp); -} - -static int -nsattcmp(const void *p1, const void *p2) -{ - const XML_Char *att1 = *(const XML_Char **)p1; - const XML_Char *att2 = *(const XML_Char **)p2; - int sep1 = (tcsrchr(att1, NSSEP) != 0); - int sep2 = (tcsrchr(att1, NSSEP) != 0); - if (sep1 != sep2) - return sep1 - sep2; - return tcscmp(att1, att2); -} - -static void XMLCALL -startElementNS(void *userData, const XML_Char *name, const XML_Char **atts) -{ - int nAtts; - int nsi; - const XML_Char **p; - FILE *fp = (FILE *)userData; - const XML_Char *sep; - puttc(T('<'), fp); - - sep = tcsrchr(name, NSSEP); - if (sep) { - fputts(T("n1:"), fp); - fputts(sep + 1, fp); - fputts(T(" xmlns:n1"), fp); - attributeValue(fp, name); - nsi = 2; - } - else { - fputts(name, fp); - nsi = 1; - } - - p = atts; - while (*p) - ++p; - nAtts = (int)((p - atts) >> 1); - if (nAtts > 1) - qsort((void *)atts, nAtts, sizeof(XML_Char *) * 2, nsattcmp); - while (*atts) { - name = *atts++; - sep = tcsrchr(name, NSSEP); - puttc(T(' '), fp); - if (sep) { - ftprintf(fp, T("n%d:"), nsi); - fputts(sep + 1, fp); - } - else - fputts(name, fp); - attributeValue(fp, *atts); - if (sep) { - ftprintf(fp, T(" xmlns:n%d"), nsi++); - attributeValue(fp, name); - } - atts++; - } - puttc(T('>'), fp); -} - -static void XMLCALL -endElementNS(void *userData, const XML_Char *name) -{ - FILE *fp = (FILE *)userData; - const XML_Char *sep; - puttc(T('<'), fp); - puttc(T('/'), fp); - sep = tcsrchr(name, NSSEP); - if (sep) { - fputts(T("n1:"), fp); - fputts(sep + 1, fp); - } - else - fputts(name, fp); - puttc(T('>'), fp); -} - -#ifndef W3C14N - -static void XMLCALL -processingInstruction(void *userData, const XML_Char *target, - const XML_Char *data) -{ - FILE *fp = (FILE *)userData; - puttc(T('<'), fp); - puttc(T('?'), fp); - fputts(target, fp); - puttc(T(' '), fp); - fputts(data, fp); - puttc(T('?'), fp); - puttc(T('>'), fp); -} - -#endif /* not W3C14N */ - -static void XMLCALL -defaultCharacterData(void *userData, const XML_Char *s, int len) -{ - XML_DefaultCurrent((XML_Parser) userData); -} - -static void XMLCALL -defaultStartElement(void *userData, const XML_Char *name, - const XML_Char **atts) -{ - XML_DefaultCurrent((XML_Parser) userData); -} - -static void XMLCALL -defaultEndElement(void *userData, const XML_Char *name) -{ - XML_DefaultCurrent((XML_Parser) userData); -} - -static void XMLCALL -defaultProcessingInstruction(void *userData, const XML_Char *target, - const XML_Char *data) -{ - XML_DefaultCurrent((XML_Parser) userData); -} - -static void XMLCALL -nopCharacterData(void *userData, const XML_Char *s, int len) -{ -} - -static void XMLCALL -nopStartElement(void *userData, const XML_Char *name, const XML_Char **atts) -{ -} - -static void XMLCALL -nopEndElement(void *userData, const XML_Char *name) -{ -} - -static void XMLCALL -nopProcessingInstruction(void *userData, const XML_Char *target, - const XML_Char *data) -{ -} - -static void XMLCALL -markup(void *userData, const XML_Char *s, int len) -{ - FILE *fp = (FILE *)XML_GetUserData((XML_Parser) userData); - for (; len > 0; --len, ++s) - puttc(*s, fp); -} - -static void -metaLocation(XML_Parser parser) -{ - const XML_Char *uri = XML_GetBase(parser); - if (uri) - ftprintf((FILE *)XML_GetUserData(parser), T(" uri=\"%s\""), uri); - ftprintf((FILE *)XML_GetUserData(parser), - T(" byte=\"%" XML_FMT_INT_MOD "d\" nbytes=\"%d\" \ - line=\"%" XML_FMT_INT_MOD "u\" col=\"%" XML_FMT_INT_MOD "u\""), - XML_GetCurrentByteIndex(parser), - XML_GetCurrentByteCount(parser), - XML_GetCurrentLineNumber(parser), - XML_GetCurrentColumnNumber(parser)); -} - -static void -metaStartDocument(void *userData) -{ - fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData)); -} - -static void -metaEndDocument(void *userData) -{ - fputts(T("\n"), (FILE *)XML_GetUserData((XML_Parser) userData)); -} - -static void XMLCALL -metaStartElement(void *userData, const XML_Char *name, - const XML_Char **atts) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - const XML_Char **specifiedAttsEnd - = atts + XML_GetSpecifiedAttributeCount(parser); - const XML_Char **idAttPtr; - int idAttIndex = XML_GetIdAttributeIndex(parser); - if (idAttIndex < 0) - idAttPtr = 0; - else - idAttPtr = atts + idAttIndex; - - ftprintf(fp, T("\n"), fp); - do { - ftprintf(fp, T("= specifiedAttsEnd) - fputts(T("\" defaulted=\"yes\"/>\n"), fp); - else if (atts == idAttPtr) - fputts(T("\" id=\"yes\"/>\n"), fp); - else - fputts(T("\"/>\n"), fp); - } while (*(atts += 2)); - fputts(T("\n"), fp); - } - else - fputts(T("/>\n"), fp); -} - -static void XMLCALL -metaEndElement(void *userData, const XML_Char *name) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - ftprintf(fp, T("\n"), fp); -} - -static void XMLCALL -metaProcessingInstruction(void *userData, const XML_Char *target, - const XML_Char *data) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - ftprintf(fp, T("\n"), fp); -} - -static void XMLCALL -metaComment(void *userData, const XML_Char *data) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); -} - -static void XMLCALL -metaStartCdataSection(void *userData) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); -} - -static void XMLCALL -metaEndCdataSection(void *userData) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); -} - -static void XMLCALL -metaCharacterData(void *userData, const XML_Char *s, int len) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); -} - -static void XMLCALL -metaStartDoctypeDecl(void *userData, - const XML_Char *doctypeName, - const XML_Char *sysid, - const XML_Char *pubid, - int has_internal_subset) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - ftprintf(fp, T("\n"), fp); -} - -static void XMLCALL -metaEndDoctypeDecl(void *userData) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); -} - -static void XMLCALL -metaNotationDecl(void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - ftprintf(fp, T("\n"), fp); -} - - -static void XMLCALL -metaEntityDecl(void *userData, - const XML_Char *entityName, - int is_param, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - - if (value) { - ftprintf(fp, T("'), fp); - characterData(fp, value, value_length); - fputts(T("\n"), fp); - } - else if (notationName) { - ftprintf(fp, T("\n"), fp); - } - else { - ftprintf(fp, T("\n"), fp); - } -} - -static void XMLCALL -metaStartNamespaceDecl(void *userData, - const XML_Char *prefix, - const XML_Char *uri) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - fputts(T("\n"), fp); - } - else - fputts(T("/>\n"), fp); -} - -static void XMLCALL -metaEndNamespaceDecl(void *userData, const XML_Char *prefix) -{ - XML_Parser parser = (XML_Parser) userData; - FILE *fp = (FILE *)XML_GetUserData(parser); - if (!prefix) - fputts(T("\n"), fp); - else - ftprintf(fp, T("\n"), prefix); -} - -static int XMLCALL -unknownEncodingConvert(void *data, const char *p) -{ - return codepageConvert(*(int *)data, p); -} - -static int XMLCALL -unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info) -{ - int cp; - static const XML_Char prefixL[] = T("windows-"); - static const XML_Char prefixU[] = T("WINDOWS-"); - int i; - - for (i = 0; prefixU[i]; i++) - if (name[i] != prefixU[i] && name[i] != prefixL[i]) - return 0; - - cp = 0; - for (; name[i]; i++) { - static const XML_Char digits[] = T("0123456789"); - const XML_Char *s = tcschr(digits, name[i]); - if (!s) - return 0; - cp *= 10; - cp += (int)(s - digits); - if (cp >= 0x10000) - return 0; - } - if (!codepageMap(cp, info->map)) - return 0; - info->convert = unknownEncodingConvert; - /* We could just cast the code page integer to a void *, - and avoid the use of release. */ - info->release = free; - info->data = malloc(sizeof(int)); - if (!info->data) - return 0; - *(int *)info->data = cp; - return 1; -} - -static int XMLCALL -notStandalone(void *userData) -{ - return 0; -} - -static void -showVersion(XML_Char *prog) -{ - XML_Char *s = prog; - XML_Char ch; - const XML_Feature *features = XML_GetFeatureList(); - while ((ch = *s) != 0) { - if (ch == '/' -#if (defined(WIN32) || defined(__WATCOMC__)) - || ch == '\\' -#endif - ) - prog = s + 1; - ++s; - } - ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion()); - if (features != NULL && features[0].feature != XML_FEATURE_END) { - int i = 1; - ftprintf(stdout, T("%s"), features[0].name); - if (features[0].value) - ftprintf(stdout, T("=%ld"), features[0].value); - while (features[i].feature != XML_FEATURE_END) { - ftprintf(stdout, T(", %s"), features[i].name); - if (features[i].value) - ftprintf(stdout, T("=%ld"), features[i].value); - ++i; - } - ftprintf(stdout, T("\n")); - } -} - -static void -usage(const XML_Char *prog, int rc) -{ - ftprintf(stderr, - T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] " - "[-e encoding] file ...\n"), prog); - exit(rc); -} - -int -tmain(int argc, XML_Char **argv) -{ - int i, j; - const XML_Char *outputDir = NULL; - const XML_Char *encoding = NULL; - unsigned processFlags = XML_MAP_FILE; - int windowsCodePages = 0; - int outputType = 0; - int useNamespaces = 0; - int requireStandalone = 0; - enum XML_ParamEntityParsing paramEntityParsing = - XML_PARAM_ENTITY_PARSING_NEVER; - int useStdin = 0; - -#ifdef _MSC_VER - _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); -#endif - - i = 1; - j = 0; - while (i < argc) { - if (j == 0) { - if (argv[i][0] != T('-')) - break; - if (argv[i][1] == T('-') && argv[i][2] == T('\0')) { - i++; - break; - } - j++; - } - switch (argv[i][j]) { - case T('r'): - processFlags &= ~XML_MAP_FILE; - j++; - break; - case T('s'): - requireStandalone = 1; - j++; - break; - case T('n'): - useNamespaces = 1; - j++; - break; - case T('p'): - paramEntityParsing = XML_PARAM_ENTITY_PARSING_ALWAYS; - /* fall through */ - case T('x'): - processFlags |= XML_EXTERNAL_ENTITIES; - j++; - break; - case T('w'): - windowsCodePages = 1; - j++; - break; - case T('m'): - outputType = 'm'; - j++; - break; - case T('c'): - outputType = 'c'; - useNamespaces = 0; - j++; - break; - case T('t'): - outputType = 't'; - j++; - break; - case T('d'): - if (argv[i][j + 1] == T('\0')) { - if (++i == argc) - usage(argv[0], 2); - outputDir = argv[i]; - } - else - outputDir = argv[i] + j + 1; - i++; - j = 0; - break; - case T('e'): - if (argv[i][j + 1] == T('\0')) { - if (++i == argc) - usage(argv[0], 2); - encoding = argv[i]; - } - else - encoding = argv[i] + j + 1; - i++; - j = 0; - break; - case T('h'): - usage(argv[0], 0); - return 0; - case T('v'): - showVersion(argv[0]); - return 0; - case T('\0'): - if (j > 1) { - i++; - j = 0; - break; - } - /* fall through */ - default: - usage(argv[0], 2); - } - } - if (i == argc) { - useStdin = 1; - processFlags &= ~XML_MAP_FILE; - i--; - } - for (; i < argc; i++) { - FILE *fp = 0; - XML_Char *outName = 0; - int result; - XML_Parser parser; - if (useNamespaces) - parser = XML_ParserCreateNS(encoding, NSSEP); - else - parser = XML_ParserCreate(encoding); - if (requireStandalone) - XML_SetNotStandaloneHandler(parser, notStandalone); - XML_SetParamEntityParsing(parser, paramEntityParsing); - if (outputType == 't') { - /* This is for doing timings; this gives a more realistic estimate of - the parsing time. */ - outputDir = 0; - XML_SetElementHandler(parser, nopStartElement, nopEndElement); - XML_SetCharacterDataHandler(parser, nopCharacterData); - XML_SetProcessingInstructionHandler(parser, nopProcessingInstruction); - } - else if (outputDir) { - const XML_Char * delim = T("/"); - const XML_Char *file = useStdin ? T("STDIN") : argv[i]; - if (!useStdin) { - /* Jump after last (back)slash */ - const XML_Char * lastDelim = tcsrchr(file, delim[0]); - if (lastDelim) - file = lastDelim + 1; -#if (defined(WIN32) || defined(__WATCOMC__)) - else { - const XML_Char * winDelim = T("\\"); - lastDelim = tcsrchr(file, winDelim[0]); - if (lastDelim) { - file = lastDelim + 1; - delim = winDelim; - } - } -#endif - } - outName = (XML_Char *)malloc((tcslen(outputDir) + tcslen(file) + 2) - * sizeof(XML_Char)); - tcscpy(outName, outputDir); - tcscat(outName, delim); - tcscat(outName, file); - fp = tfopen(outName, T("wb")); - if (!fp) { - tperror(outName); - exit(1); - } - setvbuf(fp, NULL, _IOFBF, 16384); -#ifdef XML_UNICODE - puttc(0xFEFF, fp); -#endif - XML_SetUserData(parser, fp); - switch (outputType) { - case 'm': - XML_UseParserAsHandlerArg(parser); - XML_SetElementHandler(parser, metaStartElement, metaEndElement); - XML_SetProcessingInstructionHandler(parser, metaProcessingInstruction); - XML_SetCommentHandler(parser, metaComment); - XML_SetCdataSectionHandler(parser, metaStartCdataSection, - metaEndCdataSection); - XML_SetCharacterDataHandler(parser, metaCharacterData); - XML_SetDoctypeDeclHandler(parser, metaStartDoctypeDecl, - metaEndDoctypeDecl); - XML_SetEntityDeclHandler(parser, metaEntityDecl); - XML_SetNotationDeclHandler(parser, metaNotationDecl); - XML_SetNamespaceDeclHandler(parser, metaStartNamespaceDecl, - metaEndNamespaceDecl); - metaStartDocument(parser); - break; - case 'c': - XML_UseParserAsHandlerArg(parser); - XML_SetDefaultHandler(parser, markup); - XML_SetElementHandler(parser, defaultStartElement, defaultEndElement); - XML_SetCharacterDataHandler(parser, defaultCharacterData); - XML_SetProcessingInstructionHandler(parser, - defaultProcessingInstruction); - break; - default: - if (useNamespaces) - XML_SetElementHandler(parser, startElementNS, endElementNS); - else - XML_SetElementHandler(parser, startElement, endElement); - XML_SetCharacterDataHandler(parser, characterData); -#ifndef W3C14N - XML_SetProcessingInstructionHandler(parser, processingInstruction); -#endif /* not W3C14N */ - break; - } - } - if (windowsCodePages) - XML_SetUnknownEncodingHandler(parser, unknownEncoding, 0); - result = XML_ProcessFile(parser, useStdin ? NULL : argv[i], processFlags); - if (outputDir) { - if (outputType == 'm') - metaEndDocument(parser); - fclose(fp); - if (!result) - tremove(outName); - free(outName); - } - XML_ParserFree(parser); - } - return 0; -} diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlwf.dsp b/3rdparty/expat-2.0.1/xmlwf/xmlwf.dsp deleted file mode 100644 index cbcff43b17..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlwf.dsp +++ /dev/null @@ -1,139 +0,0 @@ -# Microsoft Developer Studio Project File - Name="xmlwf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=xmlwf - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "xmlwf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "xmlwf.mak" CFG="xmlwf - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "xmlwf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "xmlwf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "xmlwf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\Release" -# PROP BASE Intermediate_Dir ".\Release" -# PROP BASE Target_Dir "." -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\win32\bin\Release" -# PROP Intermediate_Dir "..\win32\tmp\Release-xmlwf" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "." -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386 -# SUBTRACT LINK32 /nodefaultlib - -!ELSEIF "$(CFG)" == "xmlwf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir ".\Debug" -# PROP BASE Intermediate_Dir ".\Debug" -# PROP BASE Target_Dir "." -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\win32\bin\Debug" -# PROP Intermediate_Dir "..\win32\tmp\Debug-xmlwf" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "." -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "COMPILED_FROM_DSP" /FD /c -# SUBTRACT CPP /Fr /YX -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 - -!ENDIF - -# Begin Target - -# Name "xmlwf - Win32 Release" -# Name "xmlwf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\codepage.c -# End Source File -# Begin Source File - -SOURCE=.\readfilemap.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=.\unixfilemap.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=.\win32filemap.c -# End Source File -# Begin Source File - -SOURCE=.\xmlfile.c -# End Source File -# Begin Source File - -SOURCE=.\xmlwf.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\codepage.h -# End Source File -# Begin Source File - -SOURCE=.\xmlfile.h -# End Source File -# Begin Source File - -SOURCE=.\xmltchar.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/expat-2.0.1/xmlwf/xmlwin32url.cxx b/3rdparty/expat-2.0.1/xmlwf/xmlwin32url.cxx deleted file mode 100644 index b8e56517ad..0000000000 --- a/3rdparty/expat-2.0.1/xmlwf/xmlwin32url.cxx +++ /dev/null @@ -1,395 +0,0 @@ -#include "expat.h" -#ifdef XML_UNICODE -#define UNICODE -#endif -#include -#include -#include -#include -#include -#include "xmlurl.h" -#include "xmlmime.h" - -static int -processURL(XML_Parser parser, IMoniker *baseMoniker, const XML_Char *url); - -typedef void (*StopHandler)(void *, HRESULT); - -class Callback : public IBindStatusCallback { -public: - // IUnknown methods - STDMETHODIMP QueryInterface(REFIID,void **); - STDMETHODIMP_(ULONG) AddRef(); - STDMETHODIMP_(ULONG) Release(); - // IBindStatusCallback methods - STDMETHODIMP OnStartBinding(DWORD, IBinding *); - STDMETHODIMP GetPriority(LONG *); - STDMETHODIMP OnLowResource(DWORD); - STDMETHODIMP OnProgress(ULONG, ULONG, ULONG, LPCWSTR); - STDMETHODIMP OnStopBinding(HRESULT, LPCWSTR); - STDMETHODIMP GetBindInfo(DWORD *, BINDINFO *); - STDMETHODIMP OnDataAvailable(DWORD, DWORD, FORMATETC *, STGMEDIUM *); - STDMETHODIMP OnObjectAvailable(REFIID, IUnknown *); - Callback(XML_Parser, IMoniker *, StopHandler, void *); - ~Callback(); - int externalEntityRef(const XML_Char *context, - const XML_Char *systemId, const XML_Char *publicId); -private: - XML_Parser parser_; - IMoniker *baseMoniker_; - DWORD totalRead_; - ULONG ref_; - IBinding *pBinding_; - StopHandler stopHandler_; - void *stopArg_; -}; - -STDMETHODIMP_(ULONG) -Callback::AddRef() -{ - return ref_++; -} - -STDMETHODIMP_(ULONG) -Callback::Release() -{ - if (--ref_ == 0) { - delete this; - return 0; - } - return ref_; -} - -STDMETHODIMP -Callback::QueryInterface(REFIID riid, void** ppv) -{ - if (IsEqualGUID(riid, IID_IUnknown)) - *ppv = (IUnknown *)this; - else if (IsEqualGUID(riid, IID_IBindStatusCallback)) - *ppv = (IBindStatusCallback *)this; - else - return E_NOINTERFACE; - ((LPUNKNOWN)*ppv)->AddRef(); - return S_OK; -} - -STDMETHODIMP -Callback::OnStartBinding(DWORD, IBinding* pBinding) -{ - pBinding_ = pBinding; - pBinding->AddRef(); - return S_OK; -} - -STDMETHODIMP -Callback::GetPriority(LONG *) -{ - return E_NOTIMPL; -} - -STDMETHODIMP -Callback::OnLowResource(DWORD) -{ - return E_NOTIMPL; -} - -STDMETHODIMP -Callback::OnProgress(ULONG, ULONG, ULONG, LPCWSTR) -{ - return S_OK; -} - -STDMETHODIMP -Callback::OnStopBinding(HRESULT hr, LPCWSTR szError) -{ - if (pBinding_) { - pBinding_->Release(); - pBinding_ = 0; - } - if (baseMoniker_) { - baseMoniker_->Release(); - baseMoniker_ = 0; - } - stopHandler_(stopArg_, hr); - return S_OK; -} - -STDMETHODIMP -Callback::GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindinfo) -{ - *pgrfBINDF = BINDF_ASYNCHRONOUS; - return S_OK; -} - -static void -reportError(XML_Parser parser) -{ - int code = XML_GetErrorCode(parser); - const XML_Char *message = XML_ErrorString(code); - if (message) - _ftprintf(stderr, _T("%s:%d:%ld: %s\n"), - XML_GetBase(parser), - XML_GetErrorLineNumber(parser), - XML_GetErrorColumnNumber(parser), - message); - else - _ftprintf(stderr, _T("%s: (unknown message %d)\n"), - XML_GetBase(parser), code); -} - -STDMETHODIMP -Callback::OnDataAvailable(DWORD grfBSCF, - DWORD dwSize, - FORMATETC *pfmtetc, - STGMEDIUM* pstgmed) -{ - if (grfBSCF & BSCF_FIRSTDATANOTIFICATION) { - IWinInetHttpInfo *hp; - HRESULT hr = pBinding_->QueryInterface(IID_IWinInetHttpInfo, - (void **)&hp); - if (SUCCEEDED(hr)) { - char contentType[1024]; - DWORD bufSize = sizeof(contentType); - DWORD flags = 0; - contentType[0] = 0; - hr = hp->QueryInfo(HTTP_QUERY_CONTENT_TYPE, contentType, - &bufSize, 0, NULL); - if (SUCCEEDED(hr)) { - char charset[CHARSET_MAX]; - getXMLCharset(contentType, charset); - if (charset[0]) { -#ifdef XML_UNICODE - XML_Char wcharset[CHARSET_MAX]; - XML_Char *p1 = wcharset; - const char *p2 = charset; - while ((*p1++ = (unsigned char)*p2++) != 0) - ; - XML_SetEncoding(parser_, wcharset); -#else - XML_SetEncoding(parser_, charset); -#endif - } - } - hp->Release(); - } - } - if (!parser_) - return E_ABORT; - if (pstgmed->tymed == TYMED_ISTREAM) { - while (totalRead_ < dwSize) { -#define READ_MAX (64*1024) - DWORD nToRead = dwSize - totalRead_; - if (nToRead > READ_MAX) - nToRead = READ_MAX; - void *buf = XML_GetBuffer(parser_, nToRead); - if (!buf) { - _ftprintf(stderr, _T("out of memory\n")); - return E_ABORT; - } - DWORD nRead; - HRESULT hr = pstgmed->pstm->Read(buf, nToRead, &nRead); - if (SUCCEEDED(hr)) { - totalRead_ += nRead; - if (!XML_ParseBuffer(parser_, - nRead, - (grfBSCF & BSCF_LASTDATANOTIFICATION) != 0 - && totalRead_ == dwSize)) { - reportError(parser_); - return E_ABORT; - } - } - } - } - return S_OK; -} - -STDMETHODIMP -Callback::OnObjectAvailable(REFIID, IUnknown *) -{ - return S_OK; -} - -int -Callback::externalEntityRef(const XML_Char *context, - const XML_Char *systemId, - const XML_Char *publicId) -{ - XML_Parser entParser = XML_ExternalEntityParserCreate(parser_, context, 0); - XML_SetBase(entParser, systemId); - int ret = processURL(entParser, baseMoniker_, systemId); - XML_ParserFree(entParser); - return ret; -} - -Callback::Callback(XML_Parser parser, IMoniker *baseMoniker, - StopHandler stopHandler, void *stopArg) -: parser_(parser), - baseMoniker_(baseMoniker), - ref_(0), - pBinding_(0), - totalRead_(0), - stopHandler_(stopHandler), - stopArg_(stopArg) -{ - if (baseMoniker_) - baseMoniker_->AddRef(); -} - -Callback::~Callback() -{ - if (pBinding_) - pBinding_->Release(); - if (baseMoniker_) - baseMoniker_->Release(); -} - -static int -externalEntityRef(void *arg, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId) -{ - return ((Callback *)arg)->externalEntityRef(context, systemId, publicId); -} - - -static HRESULT -openStream(XML_Parser parser, - IMoniker *baseMoniker, - const XML_Char *uri, - StopHandler stopHandler, void *stopArg) -{ - if (!XML_SetBase(parser, uri)) - return E_OUTOFMEMORY; - HRESULT hr; - IMoniker *m; -#ifdef XML_UNICODE - hr = CreateURLMoniker(0, uri, &m); -#else - LPWSTR uriw = new wchar_t[strlen(uri) + 1]; - for (int i = 0;; i++) { - uriw[i] = uri[i]; - if (uriw[i] == 0) - break; - } - hr = CreateURLMoniker(baseMoniker, uriw, &m); - delete [] uriw; -#endif - if (FAILED(hr)) - return hr; - IBindStatusCallback *cb = new Callback(parser, m, stopHandler, stopArg); - XML_SetExternalEntityRefHandler(parser, externalEntityRef); - XML_SetExternalEntityRefHandlerArg(parser, cb); - cb->AddRef(); - IBindCtx *b; - if (FAILED(hr = CreateAsyncBindCtx(0, cb, 0, &b))) { - cb->Release(); - m->Release(); - return hr; - } - cb->Release(); - IStream *pStream; - hr = m->BindToStorage(b, 0, IID_IStream, (void **)&pStream); - if (SUCCEEDED(hr)) { - if (pStream) - pStream->Release(); - } - if (hr == MK_S_ASYNCHRONOUS) - hr = S_OK; - m->Release(); - b->Release(); - return hr; -} - -struct QuitInfo { - const XML_Char *url; - HRESULT hr; - int stop; -}; - -static void -winPerror(const XML_Char *url, HRESULT hr) -{ - LPVOID buf; - if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_HMODULE, - GetModuleHandleA("urlmon.dll"), - hr, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &buf, - 0, - NULL) - || FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM, - 0, - hr, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &buf, - 0, - NULL)) { - /* The system error messages seem to end with a newline. */ - _ftprintf(stderr, _T("%s: %s"), url, buf); - fflush(stderr); - LocalFree(buf); - } - else - _ftprintf(stderr, _T("%s: error %x\n"), url, hr); -} - -static void -threadQuit(void *p, HRESULT hr) -{ - QuitInfo *qi = (QuitInfo *)p; - qi->hr = hr; - qi->stop = 1; -} - -extern "C" -int -XML_URLInit(void) -{ - return SUCCEEDED(CoInitialize(0)); -} - -extern "C" -void -XML_URLUninit(void) -{ - CoUninitialize(); -} - -static int -processURL(XML_Parser parser, IMoniker *baseMoniker, - const XML_Char *url) -{ - QuitInfo qi; - qi.stop = 0; - qi.url = url; - - XML_SetBase(parser, url); - HRESULT hr = openStream(parser, baseMoniker, url, threadQuit, &qi); - if (FAILED(hr)) { - winPerror(url, hr); - return 0; - } - else if (FAILED(qi.hr)) { - winPerror(url, qi.hr); - return 0; - } - MSG msg; - while (!qi.stop && GetMessage (&msg, NULL, 0, 0)) { - TranslateMessage (&msg); - DispatchMessage (&msg); - } - return 1; -} - -extern "C" -int -XML_ProcessURL(XML_Parser parser, - const XML_Char *url, - unsigned flags) -{ - return processURL(parser, 0, url); -} diff --git a/3rdparty/luacrypto-0.2.0/Makefile b/3rdparty/luacrypto-0.2.0/Makefile deleted file mode 100644 index 95622f908e..0000000000 --- a/3rdparty/luacrypto-0.2.0/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -T= lcrypto -V= 0.2.0 -CONFIG= ./config - -include $(CONFIG) - -ifeq "$(LUA_VERSION_NUM)" "500" -COMPAT_O= $(COMPAT_DIR)/compat-5.1.o -endif -OBJS= src/$T.o $(COMPAT_O) -SRCS= src/$T.h src/$T.c - -lib: src/$(LIBNAME) - -src/$(LIBNAME): $(OBJS) - export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) $(OPENSSL_LIBS) - -$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c - -install: src/$(LIBNAME) - mkdir -p $(LUA_LIBDIR) - cp src/$(LIBNAME) $(LUA_LIBDIR) - cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so - -clean: - rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O) diff --git a/3rdparty/luacrypto-0.2.0/README b/3rdparty/luacrypto-0.2.0/README deleted file mode 100644 index 152dce9a70..0000000000 --- a/3rdparty/luacrypto-0.2.0/README +++ /dev/null @@ -1,4 +0,0 @@ -LuaCrypto provides a Lua frontend to the OpenSSL cryptographic library. -The OpenSSL features that are currently exposed are digests (MD5, SHA-1, -HMAC, and more) and crypto-grade random number generators. Please see docs -at doc/us/index.html or http://luacrypto.luaforge.net/. diff --git a/3rdparty/luacrypto-0.2.0/config b/3rdparty/luacrypto-0.2.0/config deleted file mode 100644 index 1f7924363d..0000000000 --- a/3rdparty/luacrypto-0.2.0/config +++ /dev/null @@ -1,23 +0,0 @@ -# Installation directories -# System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= /usr/local/lib/lua/5.0 -# Lua includes directory -LUA_INC= /usr/local/include - -# OS dependent -LIB_OPTION= -shared #for Linux -#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X - -# Lua version number (first and second digits of target version) -LUA_VERSION_NUM= 500 -LIBNAME= $T.so.$V -COMPAT_DIR= ../compat/src - -OPENSSL_LIBS= -L/usr/local/openssl/lib -lcrypto -lssl -OPENSSL_INCS= -I/usr/local/openssl/include - -# Compilation directives -WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -INCS= -I$(LUA_INC) -I$(COMPAT_DIR) -CFLAGS= $(WARN) $(OPENSSL_INCS) $(INCS) -CC= gcc diff --git a/3rdparty/luacrypto-0.2.0/doc/us/examples.html b/3rdparty/luacrypto-0.2.0/doc/us/examples.html deleted file mode 100644 index 0f28718bc8..0000000000 --- a/3rdparty/luacrypto-0.2.0/doc/us/examples.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - LuaCrypto: A Lua frontend to OpenSSL - - - - - -
- -
- -
LuaCrypto
-
A Lua frontend to OpenSSL
-
- -
- - - -
- - -

Example

- -Below is a sample displaying the basic use of the library. - -
-local crypto = require("crypto")
-local evp = require("crypto.evp")
-local hmac = require("crypto.hmac")
-
-assert(io.input(some_file))
-local md5_of_some_file = evp.digest("md5", io.read("*all"))
-   
-assert(io.input(some_file))
-local hmac_of_some_file = hmac.digest("sha1", io.read("*all"), "hmackey")
-
- -And here is a sample of the object interface to the code. - -
-require("crypto")
-
-local evp = crypto.evp.new("md5")
-for line in io.lines(some_file) do 
-    evp:update(line)
-end
-local md5_of_some_file = evp:digest()
-
- -
- -
- -
-

Valid XHTML 1.0!

-

- $Id: examples.html,v 1.1 2006/08/25 03:24:17 nezroy Exp $ -

-
- -
- - - diff --git a/3rdparty/luacrypto-0.2.0/doc/us/index.html b/3rdparty/luacrypto-0.2.0/doc/us/index.html deleted file mode 100644 index 4788e15018..0000000000 --- a/3rdparty/luacrypto-0.2.0/doc/us/index.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - LuaCrypto: A Lua frontend to OpenSSL - - - - - -
- -
- -
LuaCrypto
-
A Lua frontend to OpenSSL
-
- -
- - - -
-

Overview

- -

LuaCrypto provides a Lua frontend to the OpenSSL cryptographic library. The OpenSSL features that are currently exposed are digests (MD5, SHA-1, HMAC, and more) and crypto-grade random number generators.

- -

-LuaCrypto is free software and uses the same license as Lua 5.0. It is currently a stand-alone component with the goal of eventually becoming part of the Kepler Project.

- -

Status

- -

Current version is 0.2.0. It was developed for Lua 5.1 but it is compatible with Lua 5.0 through the use of Compat-5.1.

- -

Download

- -

LuaCrypto can be downloaded from its Lua Forge page.

- -

Dependencies

- - - -

History

- -
-
0.2.0 [24/Aug/2006]
-
Added random support.
-
Removed Lua stub files and collapsed modules.
-
Changed all supporting materials (documentation, build, etc.) to Kepler standards.
- -
0.1.1 [22/Jan/2006]
-
Added Lua 5.0/Compat-5.1 support.
- -
0.1.0 [13/Jan/2006]
-
Initial release.
-
- -

Credits

- -

Much of the original release was based on the lmd5 project, written by Luiz Henrique de Figueiredo. More recent versions were based on existing Kepler components and also incorporate changes contributed by Mark Edgar.

- -

Contact

- -

For more information please contact me. Comments are welcome!

- -
- -
- -
-

- Valid XHTML 1.0!

-

$Id: index.html,v 1.2 2006/08/25 03:37:51 nezroy Exp $

-
- -
- - - diff --git a/3rdparty/luacrypto-0.2.0/doc/us/license.html b/3rdparty/luacrypto-0.2.0/doc/us/license.html deleted file mode 100644 index e78568d06d..0000000000 --- a/3rdparty/luacrypto-0.2.0/doc/us/license.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - LuaCrypto: A Lua frontend to OpenSSL - - - - - -
- -
- -
LuaCrypto
-
A Lua frontend to OpenSSL
-
- -
- - - -
- -

License

- -

LuaCrypto is free software: it can be used for both academic and -commercial purposes at absolutely no cost. There are no royalties -or GNU-like "copyleft" restrictions. LuaCrypto qualifies as Open -Source software. Its licenses are compatible with GPL. LuaCrypto is not -in the public domain and Keith Howe keeps its copyright. The -legal details are below.

- -

The spirit of the license is that you are free to use LuaCrypto -for any purpose at no cost without having to ask us. The only -requirement is that if you do use LuaCrypto, then you should give -us credit by including the appropriate copyright notice somewhere -in your product or its documentation.

- -

The LuaCrypto library is designed and implemented by Keith Howe. The implementation is not derived from licensed software.

- -
-

Copyright © 2006 Keith Howe.

- -

Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

- -

The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

- -

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.

- -

 

-

 

- -
- -
- -
-

- Valid XHTML 1.0!

-

$Id: license.html,v 1.1 2006/08/25 03:24:17 nezroy Exp $

-
- -
- - - diff --git a/3rdparty/luacrypto-0.2.0/doc/us/luacrypto-128.png b/3rdparty/luacrypto-0.2.0/doc/us/luacrypto-128.png deleted file mode 100644 index ce902da358..0000000000 Binary files a/3rdparty/luacrypto-0.2.0/doc/us/luacrypto-128.png and /dev/null differ diff --git a/3rdparty/luacrypto-0.2.0/doc/us/manual.html b/3rdparty/luacrypto-0.2.0/doc/us/manual.html deleted file mode 100644 index af357ceb54..0000000000 --- a/3rdparty/luacrypto-0.2.0/doc/us/manual.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - LuaCrypto: A Lua frontend to OpenSSL - - - - - -
- -
- -
LuaCrypto
-
A Lua frontend to OpenSSL
-
- -
- - - -
-

Introduction

- -

LuaCrypto is a Lua frontend to the OpenSSL cryptographic library. The OpenSSL features that are currently exposed are digests (MD5, SHA-1, HMAC, and more) and crypto-grade random number generators.

- -

The API tries to hide the OpenSSL setup and teardown, so in most cases it is not simply a pass-through to the existing OpenSSL API. Since this is still a very early version of the software, the API may undergo significant future changes! You have been warned.

- -

Building

- -

LuaCrypto could be built to Lua 5.0 or to Lua 5.1. In both cases, the language library and headers files for the target version must be installed properly.

- -

LuaCrypto offers a Makefile and a separate configuration file, -config, which should be edited to suit your installation before runnig make. The file has some definitions like paths to the external libraries, compiler options and the like. In particular, you must set the correct path to your installed OpenSSL libraries. Another important setting is the version of Lua language, which is not obtained from the installed software.

- -

Installation

- -

The LuaCrypto compiled binary should be copied to a directory in your C path. Lua 5.0 users should install Compat-5.1 also.

- -

Reference

- -

Parameters

-
-
dtype
-
This parameter is always a string naming the hashing algorithm to use for a digest operation. The list of supported algorithms may change with each version of the OpenSSL library. Refer to the OpenSSL documentation for a complete and up to date list. As of 0.9.7, the supported types are: -
    -
  • md5
  • -
  • md4
  • -
  • md2
  • -
  • sha1
  • -
  • sha
  • -
  • mdc2
  • -
  • ripemd160
  • -
-
- -

Message Digest (EVP) - crypto.evp

-
-
crypto.evp.digest(dtype, string [, raw])
-
This function generates the message digest of the input string and returns it. The hashing algorithm to use is specified by dtype. The optional raw flag, defaulted to false, is a boolean indicating whether the output should be a direct binary equivalent of the message digest, or formatted as a hexadecimal string (the default).
- -
crypto.evp.new(dtype)
-
Creates a new EVP message digest object using the algorithm specified by dtype.
- -
evp:reset()
-
Resets the EVP message digest object to a clean slate.
- -
evp:clone()
-
Returns a new message digest object which is a clone of the object and its current state, including any data loaded to this point.
- -
evp:update(string)
-
Appends the data in string to the current internal data set to be hashed. Returns the object so that it can be reused in nested calls.
- -
evp:digest([string] [, raw])
-
Generates the message digest for the loaded data, optionally appending on new data provided by string prior to hashing. The optional raw flag, defaulted to false, is a boolean indicating whether the output should be a direct binary equivalent of the message digest, or formatted as a hexadecimal string (the default).
-
- -

HMAC - crypto.hmac

-
-
crypto.hmac.digest(dtype, string, key [, raw])
-
This function returns the HMAC of the string. The hashing algorithm to use is specified by dtype. The value provided in key will be used as the seed for the HMAC generation. The optional raw flag, defaulted to false, is a boolean indicating whether the output should be a direct binary equivalent of the HMAC or formatted as a hexadecimal string (the default).
- -
crypto.hmac.new(dtype, key)
-
Creates a new HMAC object using the algorithm specified by type. The HMAC seed key to use is provided by key.
- -
hmac:reset()
-
Resets the HMAC object to a clean slate.
- -
hmac:clone()
-
Returns a new HMAC object which is a clone of the object and its current state, including data loaded to this point. DOES NOT WORK YET. Just returns a new pointer to the same object.
- -
hmac:update(string)
-
Appends the data in string to the current internal data set to be hashed.
- -
hmac:digest([string] [, raw])
-
Generates the HMAC for the loaded data, optionally appending on new data provided by string prior to hashing. The optional raw flag, defaulted to false, is a boolean indicating whether the output should be a direct binary equivalent of the message digest or formatted as a hexadecimal string (the default). Note that you can only run this method once on an object; running it a second time will product a bogus HMAC because the internal state is irrecovably destroyed after the first call.
-
- -
- -
- -
-

Valid XHTML 1.0!

-

- $Id: manual.html,v 1.1 2006/08/25 03:24:17 nezroy Exp $ -

-
- -
- - - diff --git a/3rdparty/luacrypto-0.2.0/src/lcrypto.c b/3rdparty/luacrypto-0.2.0/src/lcrypto.c deleted file mode 100644 index efdbfa9c8d..0000000000 --- a/3rdparty/luacrypto-0.2.0/src/lcrypto.c +++ /dev/null @@ -1,511 +0,0 @@ -/* -** $Id: lcrypto.c,v 1.2 2006/08/25 03:24:17 nezroy Exp $ -** See Copyright Notice in license.html -*/ - -#include -#include -#include -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - -#include "lcrypto.h" - -LUACRYPTO_API int luaopen_crypto(lua_State *L); - -static int crypto_error(lua_State *L) -{ - char buf[120]; - unsigned long e = ERR_get_error(); - ERR_load_crypto_strings(); - lua_pushnil(L); - lua_pushstring(L, ERR_error_string(e, buf)); - return 2; -} - -static EVP_MD_CTX *evp_pget(lua_State *L, int i) -{ - if (luaL_checkudata(L, i, LUACRYPTO_EVPNAME) == NULL) luaL_typerror(L, i, LUACRYPTO_EVPNAME); - return lua_touserdata(L, i); -} - -static EVP_MD_CTX *evp_pnew(lua_State *L) -{ - EVP_MD_CTX *c = lua_newuserdata(L, sizeof(EVP_MD_CTX)); - luaL_getmetatable(L, LUACRYPTO_EVPNAME); - lua_setmetatable(L, -2); - return c; -} - -static int evp_fnew(lua_State *L) -{ - EVP_MD_CTX *c = NULL; - const char *s = luaL_checkstring(L, 1); - const EVP_MD *type = EVP_get_digestbyname(s); - - if (type == NULL) { - luaL_argerror(L, 1, "invalid digest type"); - return 0; - } - - c = evp_pnew(L); - EVP_MD_CTX_init(c); - EVP_DigestInit_ex(c, type, NULL); - - return 1; -} - -static int evp_clone(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - EVP_MD_CTX *d = evp_pnew(L); - EVP_MD_CTX_init(d); - EVP_MD_CTX_copy_ex(d, c); - return 1; -} - -static int evp_reset(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - const EVP_MD *t = EVP_MD_CTX_md(c); - EVP_MD_CTX_cleanup(c); - EVP_MD_CTX_init(c); - EVP_DigestInit_ex(c, t, NULL); - return 0; -} - -static int evp_update(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - const char *s = luaL_checkstring(L, 2); - - EVP_DigestUpdate(c, s, lua_strlen(L, 2)); - - lua_settop(L, 1); - return 1; -} - -static int evp_digest(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - EVP_MD_CTX *d = NULL; - unsigned char digest[EVP_MAX_MD_SIZE]; - size_t written = 0; - unsigned int i; - char *hex; - - if (lua_isstring(L, 2)) - { - const char *s = luaL_checkstring(L, 2); - EVP_DigestUpdate(c, s, lua_strlen(L, 2)); - } - - d = EVP_MD_CTX_create(); - EVP_MD_CTX_copy_ex(d, c); - EVP_DigestFinal_ex(d, digest, &written); - EVP_MD_CTX_destroy(d); - - if (lua_toboolean(L, 3)) - lua_pushlstring(L, (char *)digest, written); - else - { - hex = calloc(sizeof(char), written*2 + 1); - for (i = 0; i < written; i++) - sprintf(hex + 2*i, "%02x", digest[i]); - lua_pushlstring(L, hex, written*2); - free(hex); - } - - return 1; -} - -static int evp_tostring(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - char s[64]; - sprintf(s, "%s %p", LUACRYPTO_EVPNAME, (void *)c); - lua_pushstring(L, s); - return 1; -} - -static int evp_gc(lua_State *L) -{ - EVP_MD_CTX *c = evp_pget(L, 1); - EVP_MD_CTX_cleanup(c); - return 1; -} - -static int evp_fdigest(lua_State *L) -{ - EVP_MD_CTX *c = NULL; - const char *type_name = luaL_checkstring(L, 1); - const char *s = luaL_checkstring(L, 2); - const EVP_MD *type = EVP_get_digestbyname(type_name); - unsigned char digest[EVP_MAX_MD_SIZE]; - size_t written = 0; - unsigned int i; - char *hex; - - if (type == NULL) { - luaL_argerror(L, 1, "invalid digest type"); - return 0; - } - - c = EVP_MD_CTX_create(); - EVP_DigestInit_ex(c, type, NULL); - EVP_DigestUpdate(c, s, lua_strlen(L, 2)); - EVP_DigestFinal_ex(c, digest, &written); - - if (lua_toboolean(L, 3)) - lua_pushlstring(L, (char *)digest, written); - else - { - hex = calloc(sizeof(char), written*2 + 1); - for (i = 0; i < written; i++) - sprintf(hex + 2*i, "%02x", digest[i]); - lua_pushlstring(L, hex, written*2); - free(hex); - } - - return 1; -} - -static HMAC_CTX *hmac_pget(lua_State *L, int i) -{ - if (luaL_checkudata(L, i, LUACRYPTO_HMACNAME) == NULL) luaL_typerror(L, i, LUACRYPTO_HMACNAME); - return lua_touserdata(L, i); -} - -static HMAC_CTX *hmac_pnew(lua_State *L) -{ - HMAC_CTX *c = lua_newuserdata(L, sizeof(HMAC_CTX)); - luaL_getmetatable(L, LUACRYPTO_HMACNAME); - lua_setmetatable(L, -2); - return c; -} - -static int hmac_fnew(lua_State *L) -{ - HMAC_CTX *c = hmac_pnew(L); - const char *s = luaL_checkstring(L, 1); - const char *k = luaL_checkstring(L, 2); - const EVP_MD *type = EVP_get_digestbyname(s); - - if (type == NULL) { - luaL_argerror(L, 1, "invalid digest type"); - return 0; - } - - HMAC_CTX_init(c); - HMAC_Init_ex(c, k, lua_strlen(L, 2), type, NULL); - - return 1; -} - -static int hmac_clone(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - HMAC_CTX *d = hmac_pnew(L); - *d = *c; - return 1; -} - -static int hmac_reset(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - HMAC_Init_ex(c, NULL, 0, NULL, NULL); - return 0; -} - -static int hmac_update(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - const char *s = luaL_checkstring(L, 2); - - HMAC_Update(c, (unsigned char *)s, lua_strlen(L, 2)); - - lua_settop(L, 1); - return 1; -} - -static int hmac_digest(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - unsigned char digest[EVP_MAX_MD_SIZE]; - size_t written = 0; - unsigned int i; - char *hex; - - if (lua_isstring(L, 2)) - { - const char *s = luaL_checkstring(L, 2); - HMAC_Update(c, (unsigned char *)s, lua_strlen(L, 2)); - } - - HMAC_Final(c, digest, &written); - - if (lua_toboolean(L, 3)) - lua_pushlstring(L, (char *)digest, written); - else - { - hex = calloc(sizeof(char), written*2 + 1); - for (i = 0; i < written; i++) - sprintf(hex + 2*i, "%02x", digest[i]); - lua_pushlstring(L, hex, written*2); - free(hex); - } - - return 1; -} - -static int hmac_tostring(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - char s[64]; - sprintf(s, "%s %p", LUACRYPTO_HMACNAME, (void *)c); - lua_pushstring(L, s); - return 1; -} - -static int hmac_gc(lua_State *L) -{ - HMAC_CTX *c = hmac_pget(L, 1); - HMAC_CTX_cleanup(c); - return 1; -} - -static int hmac_fdigest(lua_State *L) -{ - HMAC_CTX c; - unsigned char digest[EVP_MAX_MD_SIZE]; - size_t written = 0; - unsigned int i; - char *hex; - const char *t = luaL_checkstring(L, 1); - const char *s = luaL_checkstring(L, 2); - const char *k = luaL_checkstring(L, 3); - const EVP_MD *type = EVP_get_digestbyname(t); - - if (type == NULL) { - luaL_argerror(L, 1, "invalid digest type"); - return 0; - } - - HMAC_CTX_init(&c); - HMAC_Init_ex(&c, k, lua_strlen(L, 3), type, NULL); - HMAC_Update(&c, (unsigned char *)s, lua_strlen(L, 2)); - HMAC_Final(&c, digest, &written); - - if (lua_toboolean(L, 4)) - lua_pushlstring(L, (char *)digest, written); - else - { - hex = calloc(sizeof(char), written*2 + 1); - for (i = 0; i < written; i++) - sprintf(hex + 2*i, "%02x", digest[i]); - lua_pushlstring(L, hex, written*2); - free(hex); - } - - return 1; -} - -static int rand_do_bytes(lua_State *L, int (*bytes)(unsigned char *, int)) -{ - size_t count = luaL_checkint(L, 1); - unsigned char tmp[256], *buf = tmp; - if (count > sizeof tmp) - buf = malloc(count); - if (!buf) - return luaL_error(L, "out of memory"); - else if (!bytes(buf, count)) - return crypto_error(L); - lua_pushlstring(L, (char *)buf, count); - if (buf != tmp) - free(buf); - return 1; -} - -static int rand_bytes(lua_State *L) -{ - return rand_do_bytes(L, RAND_bytes); -} - -static int rand_pseudo_bytes(lua_State *L) -{ - return rand_do_bytes(L, RAND_pseudo_bytes); -} - -static int rand_add(lua_State *L) -{ - size_t num; - const void *buf = luaL_checklstring(L, 1, &num); - double entropy = luaL_optnumber(L, 2, num); - RAND_add(buf, num, entropy); - return 0; -} - -static int rand_status(lua_State *L) -{ - lua_pushboolean(L, RAND_status()); - return 1; -} - -enum { WRITE_FILE_COUNT = 1024 }; -static int rand_load(lua_State *L) -{ - const char *name = luaL_optstring(L, 1, 0); - char tmp[256]; - int n; - if (!name && !(name = RAND_file_name(tmp, sizeof tmp))) - return crypto_error(L); - n = RAND_load_file(name, WRITE_FILE_COUNT); - if (n == 0) - return crypto_error(L); - lua_pushnumber(L, n); - return 1; -} - -static int rand_write(lua_State *L) -{ - const char *name = luaL_optstring(L, 1, 0); - char tmp[256]; - int n; - if (!name && !(name = RAND_file_name(tmp, sizeof tmp))) - return crypto_error(L); - n = RAND_write_file(name); - if (n == 0) - return crypto_error(L); - lua_pushnumber(L, n); - return 1; -} - -static int rand_cleanup(lua_State *L) -{ - RAND_cleanup(); - return 0; -} - -/* -** Create a metatable and leave it on top of the stack. -*/ -LUACRYPTO_API int luacrypto_createmeta (lua_State *L, const char *name, const luaL_reg *methods) { - if (!luaL_newmetatable (L, name)) - return 0; - - /* define methods */ - luaL_openlib (L, NULL, methods, 0); - - /* define metamethods */ - lua_pushliteral (L, "__index"); - lua_pushvalue (L, -2); - lua_settable (L, -3); - - lua_pushliteral (L, "__metatable"); - lua_pushliteral (L, LUACRYPTO_PREFIX"you're not allowed to get this metatable"); - lua_settable (L, -3); - - return 1; -} - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) -{ - struct luaL_reg evp_functions[] = { - { "digest", evp_fdigest }, - { "new", evp_fnew }, - {NULL, NULL}, - }; - struct luaL_reg evp_methods[] = { - { "__tostring", evp_tostring }, - { "__gc", evp_gc }, - { "clone", evp_clone }, - { "digest", evp_digest }, - { "reset", evp_reset }, - { "tostring", evp_tostring }, - { "update", evp_update }, - {NULL, NULL}, - }; - struct luaL_reg hmac_functions[] = { - { "digest", hmac_fdigest }, - { "new", hmac_fnew }, - { NULL, NULL } - }; - struct luaL_reg hmac_methods[] = { - { "__tostring", hmac_tostring }, - { "__gc", hmac_gc }, - { "clone", hmac_clone }, - { "digest", hmac_digest }, - { "reset", hmac_reset }, - { "tostring", hmac_tostring }, - { "update", hmac_update }, - { NULL, NULL } - }; - struct luaL_reg rand_functions[] = { - { "bytes", rand_bytes }, - { "pseudo_bytes", rand_pseudo_bytes }, - { "add", rand_add }, - { "seed", rand_add }, - { "status", rand_status }, - { "load", rand_load }, - { "write", rand_write }, - { "cleanup", rand_cleanup }, - { NULL, NULL } - }; - - luaL_openlib (L, LUACRYPTO_EVPNAME, evp_functions, 0); - luacrypto_createmeta(L, LUACRYPTO_EVPNAME, evp_methods); - luaL_openlib (L, LUACRYPTO_HMACNAME, hmac_functions, 0); - luacrypto_createmeta(L, LUACRYPTO_HMACNAME, hmac_methods); - luaL_openlib (L, LUACRYPTO_RANDNAME, rand_functions, 0); - lua_pop (L, 3); -} - -/* -** Define the metatable for the object on top of the stack -*/ -LUACRYPTO_API void luacrypto_setmeta (lua_State *L, const char *name) { - luaL_getmetatable (L, name); - lua_setmetatable (L, -2); -} - -/* -** Assumes the table is on top of the stack. -*/ -LUACRYPTO_API void luacrypto_set_info (lua_State *L) { - lua_pushliteral (L, "_COPYRIGHT"); - lua_pushliteral (L, "Copyright (C) 2005-2006 Keith Howe"); - lua_settable (L, -3); - lua_pushliteral (L, "_DESCRIPTION"); - lua_pushliteral (L, "LuaCrypto is a Lua wrapper for OpenSSL"); - lua_settable (L, -3); - lua_pushliteral (L, "_VERSION"); - lua_pushliteral (L, "LuaCrypto 0.2.0"); - lua_settable (L, -3); -} - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUACRYPTO_API int luaopen_crypto(lua_State *L) -{ - struct luaL_reg core[] = { - {NULL, NULL}, - }; - - OpenSSL_add_all_digests(); - - create_metatables (L); - luaL_openlib (L, LUACRYPTO_CORENAME, core, 0); - luacrypto_set_info (L); - return 1; -} diff --git a/3rdparty/luacrypto-0.2.0/src/lcrypto.h b/3rdparty/luacrypto-0.2.0/src/lcrypto.h deleted file mode 100644 index 0de4942cf3..0000000000 --- a/3rdparty/luacrypto-0.2.0/src/lcrypto.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -** $Id: lcrypto.h,v 1.2 2006/08/25 03:28:32 nezroy Exp $ -** See Copyright Notice in license.html -*/ - -#ifndef _LUACRYPTO_ -#define _LUACRYPTO_ - -#ifndef LUACRYPTO_API -#define LUACRYPTO_API LUA_API -#endif - -#define LUACRYPTO_PREFIX "LuaCrypto: " -#define LUACRYPTO_CORENAME "crypto" -#define LUACRYPTO_EVPNAME "crypto.evp" -#define LUACRYPTO_HMACNAME "crypto.hmac" -#define LUACRYPTO_RANDNAME "crypto.rand" - -LUACRYPTO_API int luacrypto_createmeta (lua_State *L, const char *name, const luaL_reg *methods); -LUACRYPTO_API void luacrypto_setmeta (lua_State *L, const char *name); -LUACRYPTO_API void luacrypto_set_info (lua_State *L); - - -#endif diff --git a/3rdparty/luacrypto-0.2.0/tests/message b/3rdparty/luacrypto-0.2.0/tests/message deleted file mode 100644 index c36bbdd849..0000000000 --- a/3rdparty/luacrypto-0.2.0/tests/message +++ /dev/null @@ -1 +0,0 @@ -This is a sample message to use for hashing tests. diff --git a/3rdparty/luacrypto-0.2.0/tests/rand.lua b/3rdparty/luacrypto-0.2.0/tests/rand.lua deleted file mode 100644 index 832526bd8f..0000000000 --- a/3rdparty/luacrypto-0.2.0/tests/rand.lua +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/local/bin/lua50 - ---[[ --- $Id: rand.lua,v 1.1 2006/08/25 03:24:17 nezroy Exp $ --- See Copyright Notice in license.html ---]] - -require "crypto" -local rand = crypto.rand - -print("RAND version: " .. crypto._VERSION) -print("") - -local SEEDFILE = "tmp.rnd" - -if rand.load(SEEDFILE) then - print("loaded previous random seed") -end - -if rand.status() then - print("ready to generate") - print("") -else - print("The PRNG does not yet have enough data.") - local prompt = "Please type some random characters and press ENTER: " - repeat - io.write(prompt); io.flush() - local line = io.read("*l") - -- entropy of English is 1.1 bits per character - rand.add(line, string.len(line) * 1.1 / 8) - prompt = "More: " - until rand.status() -end - -local N = 20 -local S = 5 - -print(string.format("generating %d sets of %d random bytes using pseudo_bytes()", S, N)) -for i = 1, S do - local data = assert(rand.pseudo_bytes(N)) - print(table.concat({string.byte(data, 1, N)}, ",")) -end -print("") - -print(string.format("generating %d sets of %d random bytes using bytes()", S, N)) -for i = 1, S do - local data = assert(rand.bytes(N)) - print(table.concat({string.byte(data, 1, N)}, ",")) -end -print("") - -print("saving seed in " .. SEEDFILE) -print("") -rand.write(SEEDFILE) - --- don't leave any sensitive data lying around in memory -print("cleaning up state") -print("") -rand.cleanup() diff --git a/3rdparty/luacrypto-0.2.0/tests/test.lua b/3rdparty/luacrypto-0.2.0/tests/test.lua deleted file mode 100644 index 74570cab9c..0000000000 --- a/3rdparty/luacrypto-0.2.0/tests/test.lua +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/local/bin/lua50 - ---[[ --- $Id: test.lua,v 1.3 2006/08/25 03:24:17 nezroy Exp $ --- See Copyright Notice in license.html ---]] - -require("crypto") -local evp = crypto.evp -local hmac = crypto.hmac - -md5_KNOWN = "09920f6f666f8e7b09a8d00bd4d06873" -sha1_KNOWN = "d6ed6e26ebeb37ba0792ec75a3d0b4dcec279d25" -hmac_KNOWN = "70a7ea81a287d094c534cdd67be82e85066e13be" - -print("LuaCrypto version: " .. crypto._VERSION) -print("") - -function report(w, s, F, t) - print(w, s .. " " .. F) - assert(s == _G[t .. "_KNOWN"]) -end - -F = arg[1] -for i, t in ipairs({"sha1", "md5", "sha1", "hmac"}) do - print("testing " .. t) - local d - if (t == "hmac") then - d = hmac.new("sha1", "luacrypto") - else - d = evp.new(t) - end - - assert(io.input(F)) - report("all", d:digest(io.read("*all")), F, t) - - d:reset(d) - - assert(io.input(F)) - while true do - local c = io.read(1) - if c == nil then break end - d:update(c) - end - report("loop", d:digest(), F, t) - if (t ~= "hmac") then - report("again", d:digest(), F, t) - assert(io.input(F)) - report("alone", evp.digest(t, io.read("*all")), F, t) - else - assert(io.input(F)) - report("alone", hmac.digest("sha1", io.read("*all"), "luacrypto"), F, t); - end - - assert(io.input(F)) - d:reset() - while true do - local c = io.read(math.random(1, 16)) - if c == nil then break end - d:update(c) - end - report("reset", d:digest(d), F, t) - report("known", _G[t .. "_KNOWN"], F, t) - print("") -end - -print("all tests passed") diff --git a/3rdparty/luafilesystem-1.5.0/Makefile b/3rdparty/luafilesystem-1.5.0/Makefile deleted file mode 100644 index 6b54f2c779..0000000000 --- a/3rdparty/luafilesystem-1.5.0/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $Id: Makefile,v 1.36 2009/09/21 17:02:44 mascarenhas Exp $ - -T= lfs - -CONFIG= ./config - -include $(CONFIG) - -SRCS= src/$T.c -OBJS= src/$T.o - -lib: src/lfs.so - -src/lfs.so: $(OBJS) - MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS) - -install: - mkdir -p $(LUA_LIBDIR) - cp src/lfs.so $(LUA_LIBDIR) - -clean: - rm -f src/lfs.so $(OBJS) diff --git a/3rdparty/luafilesystem-1.5.0/Makefile.win b/3rdparty/luafilesystem-1.5.0/Makefile.win deleted file mode 100644 index 65cab81240..0000000000 --- a/3rdparty/luafilesystem-1.5.0/Makefile.win +++ /dev/null @@ -1,25 +0,0 @@ -# $Id: Makefile.win,v 1.11 2008/05/07 19:06:37 carregal Exp $ - -T= lfs - -include config.win - -SRCS= src\$T.c -OBJS= src\$T.obj - -lib: src\lfs.dll - -.c.obj: - $(CC) /c /Fo$@ $(CFLAGS) $< - -src\lfs.dll: $(OBJS) - link /dll /def:src\$T.def /out:src\lfs.dll $(OBJS) "$(LUA_LIB)" - IF EXIST src\lfs.dll.manifest mt -manifest src\lfs.dll.manifest -outputresource:src\lfs.dll;2 - -install: src\lfs.dll - IF NOT EXIST "$(LUA_LIBDIR)" mkdir "$(LUA_LIBDIR)" - copy src\lfs.dll "$(LUA_LIBDIR)" - -clean: - del src\lfs.dll $(OBJS) src\$T.lib src\$T.exp - IF EXIST src\lfs.dll.manifest del src\lfs.dll.manifest \ No newline at end of file diff --git a/3rdparty/luafilesystem-1.5.0/README b/3rdparty/luafilesystem-1.5.0/README deleted file mode 100644 index 0103efa642..0000000000 --- a/3rdparty/luafilesystem-1.5.0/README +++ /dev/null @@ -1,66 +0,0 @@ -LuaFileSystem - File System Library for Lua -Copyright 2003 Kepler Project -http://www.keplerproject.org/luafilesystem - -Description ------------ -LuaFileSystem is a Lua library developed to complement the set of functions -related to file systems offered by the standard Lua distribution. - -LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. -LuaFileSystem is free software and uses the same license as Lua 5.1 - -LuaRocks Installation ---------------------- -luarocks install luafilesystem - - -Documentation -------------- -Please check the documentation at doc/us/ for more information. - -History -------- - -Version 1.5.0 [20/Oct/2009] - * added explicit next and close methods to second return value of lfs.dir (the directory object), for explicit iteration or explicit closing. - * added directory locking via lfs.lock_dir function (see the manual). - -Version 1.4.2 [03/Feb/2009] - - * fixed bug [#13198] lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro). - * fixed bug [#39794] Compile error on Solaris 10 (bug report and patch by Aaron B). - * fixed compilation problems with Borland C. - -Version 1.4.1 [07/May/2008] - - * documentation review - * fixed Windows compilation issues - * fixed bug in the Windows tests (patch by Shmuel Zeigerman) - * fixed bug [#2185] lfs.attributes(filename, 'size') overflow on files > 2 Gb - -Version 1.4.0 [13/Feb/2008] - - * added function lfs.setmode (works only in Windows systems). - * lfs.attributes raises an error if attribute does not exist - -Version 1.3.0 [26/Oct/2007] - - * added function lfs.symlinkattributes (works only in non Windows systems). - -Version 1.2.1 [08/May/2007] - - * compatible only with Lua 5.1 (Lua 5.0 support was dropped) - -Version 1.2 [15/Mar/2006] - - * added optional argument to lfs.attributes - * added function lfs.rmdir - * bug correction on lfs.dir - -Version 1.1 [30/May/2005] - - * added function lfs.touch. - -Version 1.0 [21/Jan/2005] -Version 1.0 Beta [10/Nov/2004] diff --git a/3rdparty/luafilesystem-1.5.0/config b/3rdparty/luafilesystem-1.5.0/config deleted file mode 100644 index cfd4c6a6d3..0000000000 --- a/3rdparty/luafilesystem-1.5.0/config +++ /dev/null @@ -1,24 +0,0 @@ -# Installation directories - -# Default installation prefix -PREFIX=/usr/local - -# System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 - -# Lua includes directory -LUA_INC= $(PREFIX)/include - -# OS dependent -LIB_OPTION= -shared #for Linux -#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X - -LIBNAME= $T.so.$V - -# Compilation directives -WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic -INCS= -I$(LUA_INC) -CFLAGS= $(WARN) $(INCS) -CC= gcc - -# $Id: config,v 1.21 2007/10/27 22:42:32 carregal Exp $ diff --git a/3rdparty/luafilesystem-1.5.0/config.win b/3rdparty/luafilesystem-1.5.0/config.win deleted file mode 100644 index 50e81f6420..0000000000 --- a/3rdparty/luafilesystem-1.5.0/config.win +++ /dev/null @@ -1,19 +0,0 @@ -# Installation directories -# System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= "c:\lua5.1" - -# Lua includes directory -LUA_INC= "c:\lua5.1\include" - -# Lua library -LUA_LIB= "c:\lua5.1\lua5.1.lib" - -LIBNAME= $T.dll - -# Compilation directives -WARN= /O2 -INCS= /I$(LUA_INC) -CFLAGS= /MD $(WARN) $(INCS) -CC= cl - -# $Id: config.win,v 1.7 2008/03/25 17:39:29 mascarenhas Exp $ diff --git a/3rdparty/luafilesystem-1.5.0/doc/us/examples.html b/3rdparty/luafilesystem-1.5.0/doc/us/examples.html deleted file mode 100644 index 746df62b4e..0000000000 --- a/3rdparty/luafilesystem-1.5.0/doc/us/examples.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

Examples

- -

Directory iterator

- -

The following example iterates over a directory and recursively lists the -attributes for each file inside it.

- -
-require"lfs"
-
-function attrdir (path)
-    for file in lfs.dir(path) do
-        if file ~= "." and file ~= ".." then
-            local f = path..'/'..file
-            print ("\t "..f)
-            local attr = lfs.attributes (f)
-            assert (type(attr) == "table")
-            if attr.mode == "directory" then
-                attrdir (f)
-            else
-                for name, value in pairs(attr) do
-                    print (name, value)
-                end
-            end
-        end
-    end
-end
-
-attrdir (".")
-
- -
- -
- -
-

Valid XHTML 1.0!

-

$Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $

-
- -
- - - diff --git a/3rdparty/luafilesystem-1.5.0/doc/us/index.html b/3rdparty/luafilesystem-1.5.0/doc/us/index.html deleted file mode 100644 index 43edefc5a1..0000000000 --- a/3rdparty/luafilesystem-1.5.0/doc/us/index.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

Overview

- -

LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

- -

LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

- -

LuaFileSystem is free software and uses the same -license as Lua 5.1.

- -

Status

- -

Current version is 1.5.0. It was developed for Lua 5.1.

- -

Download

- -

LuaFileSystem source can be downloaded from its -Github -page.

- -

History

- -
-
Version 1.5.0 [20/Oct/2009]
-
  • Added explicit next and close methods to second return value of lfs.dir -(the directory object), for explicit iteration or explicit closing.
  • -
  • Added directory locking via lfs.lock_dir function (see the manual).
  • -
    Version 1.4.2 [03/Feb/2009]
    -
    -
      -
    • fixed bug [#13198] - lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).
    • -
    • fixed bug [#39794] - Compile error on Solaris 10 (bug report and patch by Aaron B).
    • -
    • fixed compilation problems with Borland C.
    • -
    -
    - -
    Version 1.4.1 [07/May/2008]
    -
    -
      -
    • documentation review
    • -
    • fixed Windows compilation issues
    • -
    • fixed bug in the Windows tests (patch by Shmuel Zeigerman)
    • -
    • fixed bug [#2185] - lfs.attributes(filename, 'size') overflow on files > 2 Gb -
    • -
    -
    - -
    Version 1.4.0 [13/Feb/2008]
    -
    -
      -
    • added function - lfs.setmode - (works only in Windows systems).
    • -
    • lfs.attributes - raises an error if attribute does not exist
    • -
    -
    - -
    Version 1.3.0 [26/Oct/2007]
    -
    - -
    - -
    Version 1.2.1 [08/May/2007]
    -
    -
      -
    • compatible only with Lua 5.1 (Lua 5.0 support was dropped)
    • -
    -
    - -
    Version 1.2 [15/Mar/2006]
    -
    - -
    - -
    Version 1.1 [30/May/2005]
    -
    - -
    - -
    Version 1.0 [21/Jan/2005]
    -
    - -
    Version 1.0 Beta [10/Nov/2004]
    -
    -
    - -

    Credits

    - -

    LuaFileSystem was designed by Roberto Ierusalimschy, -André Carregal and Tomás Guisasola as part of the -Kepler Project, -which holds its copyright. LuaFileSystem is currently maintained by Fábio Mascarenhas.

    - -

    Contact us

    - -

    For more information please -contact us. -Comments are welcome!

    - -

    You can also reach other Kepler developers and users on the Kepler Project -mailing list.

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $

    -
    - -
    - - - diff --git a/3rdparty/luafilesystem-1.5.0/doc/us/license.html b/3rdparty/luafilesystem-1.5.0/doc/us/license.html deleted file mode 100644 index 4ecad4bd7b..0000000000 --- a/3rdparty/luafilesystem-1.5.0/doc/us/license.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    License

    - -

    -LuaFileSystem is free software: it can be used for both academic -and commercial purposes at absolutely no cost. There are no -royalties or GNU-like "copyleft" restrictions. LuaFileSystem -qualifies as -Open Source -software. -Its licenses are compatible with -GPL. -LuaFileSystem is not in the public domain and the -Kepler Project -keep its copyright. -The legal details are below. -

    - -

    The spirit of the license is that you are free to use -LuaFileSystem for any purpose at no cost without having to ask us. -The only requirement is that if you do use LuaFileSystem, then you -should give us credit by including the appropriate copyright notice -somewhere in your product or its documentation.

    - -

    The LuaFileSystem library is designed and implemented by Roberto -Ierusalimschy, André Carregal and Tomás Guisasola. -The implementation is not derived from licensed software.

    - -
    -

    Copyright © 2003 Kepler Project.

    - -

    Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

    - -

    The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

    - -

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $

    -
    - -
    - - - diff --git a/3rdparty/luafilesystem-1.5.0/doc/us/luafilesystem.png b/3rdparty/luafilesystem-1.5.0/doc/us/luafilesystem.png deleted file mode 100644 index e1dd8c65b5..0000000000 Binary files a/3rdparty/luafilesystem-1.5.0/doc/us/luafilesystem.png and /dev/null differ diff --git a/3rdparty/luafilesystem-1.5.0/doc/us/manual.html b/3rdparty/luafilesystem-1.5.0/doc/us/manual.html deleted file mode 100644 index 1409c404b1..0000000000 --- a/3rdparty/luafilesystem-1.5.0/doc/us/manual.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    Introduction

    - -

    LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

    - -

    LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

    - -

    Building

    - -

    -LuaFileSystem should be built with Lua 5.1 so the language library -and header files for the target version must be installed properly. -

    - -

    -LuaFileSystem offers a Makefile and a separate configuration file, -config, -which should be edited to suit your installation before running -make. -The file has some definitions like paths to the external libraries, -compiler options and the like. -

    - -

    On Windows, the C runtime used to compile LuaFileSystem must be the same -runtime that Lua uses, or some LuaFileSystem functions will not work.

    - -

    Installation

    - -

    The easiest way to install LuaFileSystem is to use LuaRocks:

    - -
    -luarocks install luafilesystem
    -
    - -

    If you prefer to install LuaFileSystem manually, the compiled binary should be copied to a directory in your -C path.

    - -

    Reference

    - -

    -LuaFileSystem offers the following functions: -

    - -
    -
    lfs.attributes (filepath [, aname])
    -
    Returns a table with the file attributes corresponding to - filepath (or nil followed by an error message - in case of error). - If the second optional argument is given, then only the value of the - named attribute is returned (this use is equivalent to - lfs.attributes(filepath).aname, but the table is not created - and only one attribute is retrieved from the O.S.). - The attributes are described as follows; - attribute mode is a string, all the others are numbers, - and the time related attributes use the same time reference of - os.time: -
    -
    dev
    -
    on Unix systems, this represents the device that the inode resides on. On Windows systems, - represents the drive number of the disk containing the file
    - -
    ino
    -
    on Unix systems, this represents the inode number. On Windows systems this has no meaning
    - -
    mode
    -
    string representing the associated protection mode (the values could be - file, directory, link, socket, - named pipe, char device, block device or - other)
    - -
    nlink
    -
    number of hard links to the file
    - -
    uid
    -
    user-id of owner (Unix only, always 0 on Windows)
    - -
    gid
    -
    group-id of owner (Unix only, always 0 on Windows)
    - -
    rdev
    -
    on Unix systems, represents the device type, for special file inodes. - On Windows systems represents the same as dev
    - -
    access
    -
    time of last access
    - -
    modification
    -
    time of last data modification
    - -
    change
    -
    time of last file status change
    - -
    size
    -
    file size, in bytes
    - -
    blocks
    -
    block allocated for file; (Unix only)
    - -
    blksize
    -
    optimal file system I/O blocksize; (Unix only)
    -
    - This function uses stat internally thus if the given - filepath is a symbolic link, it is followed (if it points to - another link the chain is followed recursively) and the information - is about the file it refers to. - To obtain information about the link itself, see function - lfs.symlinkattributes. -
    - -
    lfs.chdir (path)
    -
    Changes the current working directory to the given - path.
    - Returns true in case of success or nil plus an - error string.
    - -
    lfs.lock_dir(path, [seconds_stale])
    -
    Creates a lockfile (called lockfile.lfs) in path if it does not - exist and returns the lock. If the lock already exists checks it - it's stale, using the second parameter (default for the second - parameter is INT_MAX, which in practice means the lock will never - be stale. To free the the lock call lock:free().
    - In case of any errors it returns nil and the error message. In - particular, if the lock exists and is not stale it returns the - "File exists" message.
    - -
    lfs.currentdir ()
    -
    Returns a string with the current working directory or nil - plus an error string.
    - -
    iter, dir_obj = lfs.dir (path)
    -
    - Lua iterator over the entries of a given directory. - Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or - nil if there are no more entries. You can also iterate by calling dir_obj:next(), and - explicitly close the directory before the iteration finished with dir_obj:close(). - Raises an error if path is not a directory. -
    - -
    lfs.lock (filehandle, mode[, start[, length]])
    -
    Locks a file or a part of it. This function works on open files; the - file handle should be specified as the first argument. - The string mode could be either - r (for a read/shared lock) or w (for a - write/exclusive lock). The optional arguments start - and length can be used to specify a starting point and - its length; both should be numbers.
    - Returns true if the operation was successful; in - case of error, it returns nil plus an error string. -
    - -
    lfs.mkdir (dirname)
    -
    Creates a new directory. The argument is the name of the new - directory.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    - -
    lfs.rmdir (dirname)
    -
    Removes an existing directory. The argument is the name of the directory.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string.
    - -
    lfs.setmode (file, mode)
    -
    Sets the writing mode for a file. The mode string can be either binary or text. - Returns the previous mode string for the file. This function is only available in Windows, so you may want to make sure that - lfs.setmode exists before using it. -
    - -
    lfs.symlinkattributes (filepath [, aname])
    -
    Identical to lfs.attributes except that - it obtains information about the link itself (not the file it refers to). - This function is not available in Windows so you may want to make sure that - lfs.symlinkattributes exists before using it. -
    - -
    lfs.touch (filepath [, atime [, mtime]])
    -
    Set access and modification times of a file. This function is - a bind to utime function. The first argument is the - filename, the second argument (atime) is the access time, - and the third argument (mtime) is the modification time. - Both times are provided in seconds (which should be generated with - Lua standard function os.time). - If the modification time is omitted, the access time provided is used; - if both times are omitted, the current time is used.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    - -
    lfs.unlock (filehandle[, start[, length]])
    -
    Unlocks a file or a part of it. This function works on - open files; the file handle should be specified as the first - argument. The optional arguments start and - length can be used to specify a starting point and its - length; both should be numbers.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    -
    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $

    -
    - -
    - - - diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.3.0-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.3.0-1.rockspec deleted file mode 100644 index d4d484f68a..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.3.0-1.rockspec +++ /dev/null @@ -1,27 +0,0 @@ -package = "LuaFileSystem" -version = "1.3.0-1" -source = { - url = "http://luaforge.net/frs/download.php/2679/luafilesystem-1.3.0.tar.gz" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - type = "make", - build_variables = { - LUA_INC = "$(LUA_INCDIR)", - LIB_OPTION = "$(LIBFLAG)" - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-1.rockspec deleted file mode 100644 index b693618239..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-1.rockspec +++ /dev/null @@ -1,27 +0,0 @@ -package = "LuaFileSystem" -version = "1.4.0-1" -source = { - url = "http://luaforge.net/frs/download.php/3158/luafilesystem-1.4.0.tar.gz" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - type = "make", - build_variables = { - LUA_INC = "$(LUA_INCDIR)", - LIB_OPTION = "$(LIBFLAG)" - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-2.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-2.rockspec deleted file mode 100644 index f7ed871527..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.0-2.rockspec +++ /dev/null @@ -1,43 +0,0 @@ -package = "LuaFileSystem" -version = "1.4.0-2" -source = { - url = "http://luaforge.net/frs/download.php/3158/luafilesystem-1.4.0.tar.gz" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - platforms = { - unix = { - type = "make", - build_variables = { - LIB_OPTION = "$(LIBFLAG)", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } - }, - win32 = { - type = "make", - build_variables = { - LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", - CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - LUA_DIR = "$(LUADIR)", - BIN_DIR = "$(BINDIR)" - } - } - } -} \ No newline at end of file diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1-1.rockspec deleted file mode 100644 index db3a3ebb6d..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1-1.rockspec +++ /dev/null @@ -1,43 +0,0 @@ -package = "LuaFileSystem" -version = "1.4.1-1" -source = { - url = "http://luaforge.net/frs/download.php/3345/luafilesystem-1.4.1.tar.gz", -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - platforms = { - unix = { - type = "make", - build_variables = { - LIB_OPTION = "$(LIBFLAG)", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) $(STAT64)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } - }, - win32 = { - type = "make", - build_variables = { - LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", - CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - LUA_DIR = "$(LUADIR)", - BIN_DIR = "$(BINDIR)" - } - } - } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1rc1-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1rc1-1.rockspec deleted file mode 100644 index 1194711715..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.1rc1-1.rockspec +++ /dev/null @@ -1,43 +0,0 @@ -package = "LuaFileSystem" -version = "1.4.1rc1-1" -source = { - url = "http://luafilesystem.luaforge.net/luafilesystem-1.4.1rc1.tar.gz", -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - platforms = { - unix = { - type = "make", - build_variables = { - LIB_OPTION = "$(LIBFLAG)", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) $(STAT64)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } - }, - win32 = { - type = "make", - build_variables = { - LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", - CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - LUA_DIR = "$(LUADIR)", - BIN_DIR = "$(BINDIR)" - } - } - } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.2-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.2-1.rockspec deleted file mode 100644 index 7cfe92b78e..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.4.2-1.rockspec +++ /dev/null @@ -1,26 +0,0 @@ -package = "LuaFileSystem" - -version = "1.4.2-1" - -source = { - url = "http://luaforge.net/frs/download.php/3931/luafilesystem-1.4.2.tar.gz", -} - -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} - -dependencies = { - "lua >= 5.1" -} - -build = { - type = "module", - modules = { lfs = "src/lfs.c" } -} \ No newline at end of file diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.5.0-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.5.0-1.rockspec deleted file mode 100644 index 1170ad25c9..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-1.5.0-1.rockspec +++ /dev/null @@ -1,27 +0,0 @@ -package = "LuaFileSystem" - -version = "1.5.0-1" - -source = { - url = "http://cloud.github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.5.0.tar.gz", -} - -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} - -dependencies = { - "lua >= 5.1" -} - -build = { - type = "module", - modules = { lfs = "src/lfs.c" }, - copy_directories = { "doc", "tests" } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-1.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-1.rockspec deleted file mode 100644 index a02d4f14e7..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-1.rockspec +++ /dev/null @@ -1,44 +0,0 @@ -package = "LuaFileSystem" -version = "cvs-1" -source = { - url = "cvs://:pserver:anonymous:@cvs.luaforge.net:/cvsroot/luafilesystem", - cvs_tag = "HEAD" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} -dependencies = { - "lua >= 5.1" -} -build = { - platforms = { - unix = { - type = "make", - build_variables = { - LIB_OPTION = "$(LIBFLAG)", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)" - } - }, - win32 = { - type = "make", - build_variables = { - LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib", - CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR)", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - LUA_DIR = "$(LUADIR)", - BIN_DIR = "$(BINDIR)" - } - } - } -} diff --git a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-2.rockspec b/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-2.rockspec deleted file mode 100644 index 651c7cf131..0000000000 --- a/3rdparty/luafilesystem-1.5.0/rockspecs/luafilesystem-cvs-2.rockspec +++ /dev/null @@ -1,26 +0,0 @@ -package = "LuaFileSystem" - -version = "cvs-2" - -source = { - url = "git://github.com/keplerproject/luafilesystem.git", -} - -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]] -} - -dependencies = { - "lua >= 5.1" -} - -build = { - type = "module", - modules = { lfs = "src/lfs.c" } -} diff --git a/3rdparty/luafilesystem-1.5.0/src/lfs.c b/3rdparty/luafilesystem-1.5.0/src/lfs.c deleted file mode 100644 index f46cfedef7..0000000000 --- a/3rdparty/luafilesystem-1.5.0/src/lfs.c +++ /dev/null @@ -1,801 +0,0 @@ -/* -** LuaFileSystem -** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) -** -** File system manipulation library. -** This library offers these functions: -** lfs.attributes (filepath [, attributename]) -** lfs.chdir (path) -** lfs.currentdir () -** lfs.dir (path) -** lfs.lock (fh, mode) -** lfs.lock_dir (path) -** lfs.mkdir (path) -** lfs.rmdir (path) -** lfs.setmode (filepath, mode) -** lfs.symlinkattributes (filepath [, attributename]) -- thanks to Sam Roberts -** lfs.touch (filepath [, atime [, mtime]]) -** lfs.unlock (fh) -** -** $Id: lfs.c,v 1.61 2009/07/04 02:10:16 mascarenhas Exp $ -*/ - -#ifndef _WIN32 -#ifndef _AIX -#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ -#else -#define _LARGE_FILES 1 /* AIX */ -#endif -#endif - -#define _LARGEFILE64_SOURCE - -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 -#include -#include -#include -#include -#ifdef __BORLANDC__ - #include -#else - #include -#endif -#include -#else -#include -#include -#include -#include -#include -#endif - -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" -#include "lfs.h" - -/* Define 'strerror' for systems that do not implement it */ -#ifdef NO_STRERROR -#define strerror(_) "System unable to describe the error" -#endif - -/* Define 'getcwd' for systems that do not implement it */ -#ifdef NO_GETCWD -#define getcwd(p,s) NULL -#define getcwd_error "Function 'getcwd' not provided by system" -#else -#define getcwd_error strerror(errno) -#endif - -#define DIR_METATABLE "directory metatable" -#define MAX_DIR_LENGTH 1023 -typedef struct dir_data { - int closed; -#ifdef _WIN32 - long hFile; - char pattern[MAX_DIR_LENGTH+1]; -#else - DIR *dir; -#endif -} dir_data; - -#define LOCK_METATABLE "lock metatable" - -#ifdef _WIN32 - #ifdef __BORLANDC__ - #define lfs_setmode(L,file,m) ((void)L, setmode(_fileno(file), m)) - #define STAT_STRUCT struct stati64 - #else - #define lfs_setmode(L,file,m) ((void)L, _setmode(_fileno(file), m)) - #define STAT_STRUCT struct _stati64 - #endif -#define STAT_FUNC _stati64 -#else -#define _O_TEXT 0 -#define _O_BINARY 0 -#define lfs_setmode(L,file,m) ((void)((void)file,m), \ - luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1) -#define STAT_STRUCT struct stat -#define STAT_FUNC stat -#define LSTAT_FUNC lstat -#endif - -/* -** This function changes the working (current) directory -*/ -static int change_dir (lua_State *L) { - const char *path = luaL_checkstring(L, 1); - if (chdir(path)) { - lua_pushnil (L); - lua_pushfstring (L,"Unable to change working directory to '%s'\n%s\n", - path, chdir_error); - return 2; - } else { - lua_pushboolean (L, 1); - return 1; - } -} - -/* -** This function returns the current directory -** If unable to get the current directory, it returns nil -** and a string describing the error -*/ -static int get_dir (lua_State *L) { - char *path; - if ((path = getcwd(NULL, 0)) == NULL) { - lua_pushnil(L); - lua_pushstring(L, getcwd_error); - return 2; - } - else { - lua_pushstring(L, path); - free(path); - return 1; - } -} - -/* -** Check if the given element on the stack is a file and returns it. -*/ -static FILE *check_file (lua_State *L, int idx, const char *funcname) { - FILE **fh = (FILE **)luaL_checkudata (L, idx, "FILE*"); - if (fh == NULL) { - luaL_error (L, "%s: not a file", funcname); - return 0; - } else if (*fh == NULL) { - luaL_error (L, "%s: closed file", funcname); - return 0; - } else - return *fh; -} - - -/* -** -*/ -static int _file_lock (lua_State *L, FILE *fh, const char *mode, const long start, long len, const char *funcname) { - int code; -#ifdef _WIN32 - /* lkmode valid values are: - LK_LOCK Locks the specified bytes. If the bytes cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, the constant returns an error. - LK_NBLCK Locks the specified bytes. If the bytes cannot be locked, the constant returns an error. - LK_NBRLCK Same as _LK_NBLCK. - LK_RLCK Same as _LK_LOCK. - LK_UNLCK Unlocks the specified bytes, which must have been previously locked. - - Regions should be locked only briefly and should be unlocked before closing a file or exiting the program. - - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__locking.asp - */ - int lkmode; - switch (*mode) { - case 'r': lkmode = LK_NBLCK; break; - case 'w': lkmode = LK_NBLCK; break; - case 'u': lkmode = LK_UNLCK; break; - default : return luaL_error (L, "%s: invalid mode", funcname); - } - if (!len) { - fseek (fh, 0L, SEEK_END); - len = ftell (fh); - } - fseek (fh, start, SEEK_SET); -#ifdef __BORLANDC__ - code = locking (fileno(fh), lkmode, len); -#else - code = _locking (fileno(fh), lkmode, len); -#endif -#else - struct flock f; - switch (*mode) { - case 'w': f.l_type = F_WRLCK; break; - case 'r': f.l_type = F_RDLCK; break; - case 'u': f.l_type = F_UNLCK; break; - default : return luaL_error (L, "%s: invalid mode", funcname); - } - f.l_whence = SEEK_SET; - f.l_start = (off_t)start; - f.l_len = (off_t)len; - code = fcntl (fileno(fh), F_SETLK, &f); -#endif - return (code != -1); -} - -#ifdef _WIN32 -typedef struct lfs_Lock { - HANDLE fd; -} lfs_Lock; -static int lfs_lock_dir(lua_State *L) { - size_t pathl; HANDLE fd; - lfs_Lock *lock; - char *ln; - const char *lockfile = "/lockfile.lfs"; - const char *path = luaL_checklstring(L, 1, &pathl); - ln = (char*)malloc(pathl + strlen(lockfile) + 1); - if(!ln) { - lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2; - } - strcpy(ln, path); strcat(ln, lockfile); - if((fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_NEW, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL)) == INVALID_HANDLE_VALUE) { - int en = GetLastError(); - free(ln); lua_pushnil(L); - if(en == ERROR_FILE_EXISTS || en == ERROR_SHARING_VIOLATION) - lua_pushstring(L, "File exists"); - else - lua_pushstring(L, strerror(en)); - return 2; - } - free(ln); - lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock)); - lock->fd = fd; - luaL_getmetatable (L, LOCK_METATABLE); - lua_setmetatable (L, -2); - return 1; -} -static int lfs_unlock_dir(lua_State *L) { - lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE); - CloseHandle(lock->fd); - return 0; -} -#else -typedef struct lfs_Lock { - char *ln; -} lfs_Lock; -static int lfs_lock_dir(lua_State *L) { - lfs_Lock *lock; - size_t pathl; - char *ln; - const char *lockfile = "/lockfile.lfs"; - const char *path = luaL_checklstring(L, 1, &pathl); - lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock)); - ln = (char*)malloc(pathl + strlen(lockfile) + 1); - if(!ln) { - lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2; - } - strcpy(ln, path); strcat(ln, lockfile); - if(symlink("lock", ln) == -1) { - free(ln); lua_pushnil(L); - lua_pushstring(L, strerror(errno)); return 2; - } - lock->ln = ln; - luaL_getmetatable (L, LOCK_METATABLE); - lua_setmetatable (L, -2); - return 1; -} -static int lfs_unlock_dir(lua_State *L) { - lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE); - if(lock->ln) { - unlink(lock->ln); - free(lock->ln); - lock->ln = NULL; - } - return 0; -} -#endif - -#ifdef _WIN32 -static int lfs_g_setmode (lua_State *L, FILE *f, int arg) { - static const int mode[] = {_O_TEXT, _O_BINARY}; - static const char *const modenames[] = {"text", "binary", NULL}; - int op = luaL_checkoption(L, arg, NULL, modenames); - int res = lfs_setmode(L, f, mode[op]); - if (res != -1) { - int i; - lua_pushboolean(L, 1); - for (i = 0; modenames[i] != NULL; i++) { - if (mode[i] == res) { - lua_pushstring(L, modenames[i]); - goto exit; - } - } - lua_pushnil(L); - exit: - return 2; - } else { - int en = errno; - lua_pushnil(L); - lua_pushfstring(L, "%s", strerror(en)); - lua_pushinteger(L, en); - return 3; - } -} -#else -static int lfs_g_setmode (lua_State *L, FILE *f, int arg) { - lua_pushboolean(L, 0); - lua_pushliteral(L, "setmode not supported on this platform"); - return 2; -} -#endif - -static int lfs_f_setmode(lua_State *L) { - return lfs_g_setmode(L, check_file(L, 1, "setmode"), 2); -} - -/* -** Locks a file. -** @param #1 File handle. -** @param #2 String with lock mode ('w'rite, 'r'ead). -** @param #3 Number with start position (optional). -** @param #4 Number with length (optional). -*/ -static int file_lock (lua_State *L) { - FILE *fh = check_file (L, 1, "lock"); - const char *mode = luaL_checkstring (L, 2); - const long start = luaL_optlong (L, 3, 0); - long len = luaL_optlong (L, 4, 0); - if (_file_lock (L, fh, mode, start, len, "lock")) { - lua_pushboolean (L, 1); - return 1; - } else { - lua_pushnil (L); - lua_pushfstring (L, "%s", strerror(errno)); - return 2; - } -} - - -/* -** Unlocks a file. -** @param #1 File handle. -** @param #2 Number with start position (optional). -** @param #3 Number with length (optional). -*/ -static int file_unlock (lua_State *L) { - FILE *fh = check_file (L, 1, "unlock"); - const long start = luaL_optlong (L, 2, 0); - long len = luaL_optlong (L, 3, 0); - if (_file_lock (L, fh, "u", start, len, "unlock")) { - lua_pushboolean (L, 1); - return 1; - } else { - lua_pushnil (L); - lua_pushfstring (L, "%s", strerror(errno)); - return 2; - } -} - - -static int make_dir (lua_State *L) { - const char *path = luaL_checkstring (L, 1); - int fail; -#ifdef _WIN32 - int oldmask = umask (0); - fail = _mkdir (path); -#else - mode_t oldmask = umask( (mode_t)0 ); - fail = mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | - S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH ); -#endif - if (fail) { - lua_pushnil (L); - lua_pushfstring (L, "%s", strerror(errno)); - return 2; - } - umask (oldmask); - lua_pushboolean (L, 1); - return 1; -} - -/* -** Removes a directory. -** @param #1 Directory path. -*/ -static int remove_dir (lua_State *L) { - const char *path = luaL_checkstring (L, 1); - int fail; - - fail = rmdir (path); - - if (fail) { - lua_pushnil (L); - lua_pushfstring (L, "%s", strerror(errno)); - return 2; - } - lua_pushboolean (L, 1); - return 1; -} - -/* -** Directory iterator -*/ -static int dir_iter (lua_State *L) { -#ifdef _WIN32 - struct _finddata_t c_file; -#else - struct dirent *entry; -#endif - dir_data *d = (dir_data *)luaL_checkudata (L, 1, DIR_METATABLE); - luaL_argcheck (L, !d->closed, 1, "closed directory"); -#ifdef _WIN32 - if (d->hFile == 0L) { /* first entry */ - if ((d->hFile = _findfirst (d->pattern, &c_file)) == -1L) { - lua_pushnil (L); - lua_pushstring (L, strerror (errno)); - return 2; - } else { - lua_pushstring (L, c_file.name); - return 1; - } - } else { /* next entry */ - if (_findnext (d->hFile, &c_file) == -1L) { - /* no more entries => close directory */ - _findclose (d->hFile); - d->closed = 1; - return 0; - } else { - lua_pushstring (L, c_file.name); - return 1; - } - } -#else - if ((entry = readdir (d->dir)) != NULL) { - lua_pushstring (L, entry->d_name); - return 1; - } else { - /* no more entries => close directory */ - closedir (d->dir); - d->closed = 1; - return 0; - } -#endif -} - - -/* -** Closes directory iterators -*/ -static int dir_close (lua_State *L) { - dir_data *d = (dir_data *)lua_touserdata (L, 1); -#ifdef _WIN32 - if (!d->closed && d->hFile) { - _findclose (d->hFile); - d->closed = 1; - } -#else - if (!d->closed && d->dir) { - closedir (d->dir); - d->closed = 1; - } -#endif - return 0; -} - - -/* -** Factory of directory iterators -*/ -static int dir_iter_factory (lua_State *L) { - const char *path = luaL_checkstring (L, 1); - dir_data *d; - lua_pushcfunction (L, dir_iter); - d = (dir_data *) lua_newuserdata (L, sizeof(dir_data)); - d->closed = 0; -#ifdef _WIN32 - d->hFile = 0L; - luaL_getmetatable (L, DIR_METATABLE); - lua_setmetatable (L, -2); - if (strlen(path) > MAX_DIR_LENGTH) - luaL_error (L, "path too long: %s", path); - else - sprintf (d->pattern, "%s/*", path); -#else - luaL_getmetatable (L, DIR_METATABLE); - lua_setmetatable (L, -2); - d->dir = opendir (path); - if (d->dir == NULL) - luaL_error (L, "cannot open %s: %s", path, strerror (errno)); -#endif - return 2; -} - - -/* -** Creates directory metatable. -*/ -static int dir_create_meta (lua_State *L) { - luaL_newmetatable (L, DIR_METATABLE); - /* set its __gc field */ - lua_pushstring (L, "__index"); - lua_newtable(L); - lua_pushstring (L, "next"); - lua_pushcfunction (L, dir_iter); - lua_settable(L, -3); - lua_pushstring (L, "close"); - lua_pushcfunction (L, dir_close); - lua_settable(L, -3); - lua_settable (L, -3); - lua_pushstring (L, "__gc"); - lua_pushcfunction (L, dir_close); - lua_settable (L, -3); - return 1; -} - -/* -** Creates lock metatable. -*/ -static int lock_create_meta (lua_State *L) { - luaL_newmetatable (L, LOCK_METATABLE); - /* set its __gc field */ - lua_newtable(L); - lua_pushcfunction(L, lfs_unlock_dir); - lua_setfield(L, -2, "free"); - lua_setfield(L, -2, "__index"); - lua_pushcfunction(L, lfs_unlock_dir); - lua_setfield(L, -2, "__gc"); - return 1; -} - - -#ifdef _WIN32 - #ifndef S_ISDIR - #define S_ISDIR(mode) (mode&_S_IFDIR) - #endif - #ifndef S_ISREG - #define S_ISREG(mode) (mode&_S_IFREG) - #endif - #ifndef S_ISLNK - #define S_ISLNK(mode) (0) - #endif - #ifndef S_ISSOCK - #define S_ISSOCK(mode) (0) - #endif - #ifndef S_ISFIFO - #define S_ISFIFO(mode) (0) - #endif - #ifndef S_ISCHR - #define S_ISCHR(mode) (mode&_S_IFCHR) - #endif - #ifndef S_ISBLK - #define S_ISBLK(mode) (0) - #endif -#endif -/* -** Convert the inode protection mode to a string. -*/ -#ifdef _WIN32 -static const char *mode2string (unsigned short mode) { -#else -static const char *mode2string (mode_t mode) { -#endif - if ( S_ISREG(mode) ) - return "file"; - else if ( S_ISDIR(mode) ) - return "directory"; - else if ( S_ISLNK(mode) ) - return "link"; - else if ( S_ISSOCK(mode) ) - return "socket"; - else if ( S_ISFIFO(mode) ) - return "named pipe"; - else if ( S_ISCHR(mode) ) - return "char device"; - else if ( S_ISBLK(mode) ) - return "block device"; - else - return "other"; -} - - -/* -** Set access time and modification values for file -*/ -static int file_utime (lua_State *L) { - const char *file = luaL_checkstring (L, 1); - struct utimbuf utb, *buf; - - if (lua_gettop (L) == 1) /* set to current date/time */ - buf = NULL; - else { - utb.actime = (time_t)luaL_optnumber (L, 2, 0); - utb.modtime = (time_t)luaL_optnumber (L, 3, utb.actime); - buf = &utb; - } - if (utime (file, buf)) { - lua_pushnil (L); - lua_pushfstring (L, "%s", strerror (errno)); - return 2; - } - lua_pushboolean (L, 1); - return 1; -} - - -/* inode protection mode */ -static void push_st_mode (lua_State *L, STAT_STRUCT *info) { - lua_pushstring (L, mode2string (info->st_mode)); -} -/* device inode resides on */ -static void push_st_dev (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_dev); -} -/* inode's number */ -static void push_st_ino (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_ino); -} -/* number of hard links to the file */ -static void push_st_nlink (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_nlink); -} -/* user-id of owner */ -static void push_st_uid (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_uid); -} -/* group-id of owner */ -static void push_st_gid (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_gid); -} -/* device type, for special file inode */ -static void push_st_rdev (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_rdev); -} -/* time of last access */ -static void push_st_atime (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, info->st_atime); -} -/* time of last data modification */ -static void push_st_mtime (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, info->st_mtime); -} -/* time of last file status change */ -static void push_st_ctime (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, info->st_ctime); -} -/* file size, in bytes */ -static void push_st_size (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_size); -} -#ifndef _WIN32 -/* blocks allocated for file */ -static void push_st_blocks (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_blocks); -} -/* optimal file system I/O blocksize */ -static void push_st_blksize (lua_State *L, STAT_STRUCT *info) { - lua_pushnumber (L, (lua_Number)info->st_blksize); -} -#endif -static void push_invalid (lua_State *L, STAT_STRUCT *info) { - luaL_error(L, "invalid attribute name"); -#ifndef _WIN32 - info->st_blksize = 0; /* never reached */ -#endif -} - -typedef void (*_push_function) (lua_State *L, STAT_STRUCT *info); - -struct _stat_members { - const char *name; - _push_function push; -}; - -struct _stat_members members[] = { - { "mode", push_st_mode }, - { "dev", push_st_dev }, - { "ino", push_st_ino }, - { "nlink", push_st_nlink }, - { "uid", push_st_uid }, - { "gid", push_st_gid }, - { "rdev", push_st_rdev }, - { "access", push_st_atime }, - { "modification", push_st_mtime }, - { "change", push_st_ctime }, - { "size", push_st_size }, -#ifndef _WIN32 - { "blocks", push_st_blocks }, - { "blksize", push_st_blksize }, -#endif - { NULL, push_invalid } -}; - -/* -** Get file or symbolic link information -*/ -static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) { - int i; - STAT_STRUCT info; - const char *file = luaL_checkstring (L, 1); - - if (st(file, &info)) { - lua_pushnil (L); - lua_pushfstring (L, "cannot obtain information from file `%s'", file); - return 2; - } - if (lua_isstring (L, 2)) { - int v; - const char *member = lua_tostring (L, 2); - if (strcmp (member, "mode") == 0) v = 0; -#ifndef _WIN32 - else if (strcmp (member, "blocks") == 0) v = 11; - else if (strcmp (member, "blksize") == 0) v = 12; -#endif - else /* look for member */ - for (v = 1; members[v].name; v++) - if (*members[v].name == *member) - break; - /* push member value and return */ - members[v].push (L, &info); - return 1; - } else if (!lua_istable (L, 2)) - /* creates a table if none is given */ - lua_newtable (L); - /* stores all members in table on top of the stack */ - for (i = 0; members[i].name; i++) { - lua_pushstring (L, members[i].name); - members[i].push (L, &info); - lua_rawset (L, -3); - } - return 1; -} - - -/* -** Get file information using stat. -*/ -static int file_info (lua_State *L) { - return _file_info_ (L, STAT_FUNC); -} - - -/* -** Get symbolic link information using lstat. -*/ -#ifndef _WIN32 -static int link_info (lua_State *L) { - return _file_info_ (L, LSTAT_FUNC); -} -#else -static int link_info (lua_State *L) { - lua_pushboolean(L, 0); - lua_pushliteral(L, "symlinkattributes not supported on this platform"); - return 2; -} -#endif - - -/* -** Assumes the table is on top of the stack. -*/ -static void set_info (lua_State *L) { - lua_pushliteral (L, "_COPYRIGHT"); - lua_pushliteral (L, "Copyright (C) 2003-2009 Kepler Project"); - lua_settable (L, -3); - lua_pushliteral (L, "_DESCRIPTION"); - lua_pushliteral (L, "LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution"); - lua_settable (L, -3); - lua_pushliteral (L, "_VERSION"); - lua_pushliteral (L, "LuaFileSystem 1.5.0"); - lua_settable (L, -3); -} - - -static const struct luaL_reg fslib[] = { - {"attributes", file_info}, - {"chdir", change_dir}, - {"currentdir", get_dir}, - {"dir", dir_iter_factory}, - {"lock", file_lock}, - {"mkdir", make_dir}, - {"rmdir", remove_dir}, - {"symlinkattributes", link_info}, - {"setmode", lfs_f_setmode}, - {"touch", file_utime}, - {"unlock", file_unlock}, - {"lock_dir", lfs_lock_dir}, - {NULL, NULL}, -}; - -int luaopen_lfs (lua_State *L) { - dir_create_meta (L); - lock_create_meta (L); - luaL_register (L, "lfs", fslib); - set_info (L); - return 1; -} diff --git a/3rdparty/luafilesystem-1.5.0/src/lfs.def b/3rdparty/luafilesystem-1.5.0/src/lfs.def deleted file mode 100644 index f79cd298b3..0000000000 --- a/3rdparty/luafilesystem-1.5.0/src/lfs.def +++ /dev/null @@ -1,5 +0,0 @@ -LIBRARY lfs.dll -DESCRIPTION "LuaFileSystem" -VERSION 1.4.2 -EXPORTS -luaopen_lfs diff --git a/3rdparty/luafilesystem-1.5.0/src/lfs.h b/3rdparty/luafilesystem-1.5.0/src/lfs.h deleted file mode 100644 index 4b52780bb3..0000000000 --- a/3rdparty/luafilesystem-1.5.0/src/lfs.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -** LuaFileSystem -** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) -** -** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $ -*/ - -/* Define 'chdir' for systems that do not implement it */ -#ifdef NO_CHDIR -#define chdir(p) (-1) -#define chdir_error "Function 'chdir' not provided by system" -#else -#define chdir_error strerror(errno) -#endif - - -int luaopen_lfs (lua_State *L); diff --git a/3rdparty/luafilesystem-1.5.0/tests/test.lua b/3rdparty/luafilesystem-1.5.0/tests/test.lua deleted file mode 100644 index 71110749c0..0000000000 --- a/3rdparty/luafilesystem-1.5.0/tests/test.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/local/bin/lua5.1 - -local tmp = "/tmp" -local sep = "/" -local upper = ".." - -require"lfs" -print (lfs._VERSION) - -function attrdir (path) - for file in lfs.dir(path) do - if file ~= "." and file ~= ".." then - local f = path..sep..file - print ("\t=> "..f.." <=") - local attr = lfs.attributes (f) - assert (type(attr) == "table") - if attr.mode == "directory" then - attrdir (f) - else - for name, value in pairs(attr) do - print (name, value) - end - end - end - end -end - --- Checking changing directories -local current = assert (lfs.currentdir()) -local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1") -assert (lfs.chdir (upper), "could not change to upper directory") -assert (lfs.chdir (reldir), "could not change back to current directory") -assert (lfs.currentdir() == current, "error trying to change directories") -assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory") - --- Changing creating and removing directories -local tmpdir = current..sep.."lfs_tmp_dir" -local tmpfile = tmpdir..sep.."tmp_file" --- Test for existence of a previous lfs_tmp_dir --- that may have resulted from an interrupted test execution and remove it -if lfs.chdir (tmpdir) then - assert (lfs.chdir (upper), "could not change to upper directory") - assert (os.remove (tmpfile), "could not remove file from previous test") - assert (lfs.rmdir (tmpdir), "could not remove directory from previous test") -end - --- tries to create a directory -assert (lfs.mkdir (tmpdir), "could not make a new directory") -local attrib, errmsg = lfs.attributes (tmpdir) -if not attrib then - error ("could not get attributes of file `"..tmpdir.."':\n"..errmsg) -end -local f = io.open(tmpfile, "w") -f:close() - --- Change access time -local testdate = os.time({ year = 2007, day = 10, month = 2, hour=0}) -assert (lfs.touch (tmpfile, testdate)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate, "could not set access time") -assert (new_att.modification == testdate, "could not set modification time") - --- Change access and modification time -local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) -local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) - -assert (lfs.touch (tmpfile, testdate2, testdate1)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate2, "could not set access time") -assert (new_att.modification == testdate1, "could not set modification time") - -local res, err = lfs.symlinkattributes(tmpfile) -if err ~= "symlinkattributes not supported on this platform" then - -- Checking symbolic link information (does not work in Windows) - assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) - assert (lfs.attributes"_a_link_for_test_".mode == "file") - assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") - assert (os.remove"_a_link_for_test_") -end - -if lfs.setmode then - -- Checking text/binary modes (works only in Windows) - local f = io.open(tmpfile, "w") - local result, mode = lfs.setmode(f, "binary") - assert((result and mode == "text") or (not result and mode == "setmode not supported on this platform")) - result, mode = lfs.setmode(f, "text") - assert((result and mode == "binary") or (not result and mode == "setmode not supported on this platform")) - f:close() -end - --- Restore access time to current value -assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) -new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == attrib.access) -assert (new_att.modification == attrib.modification) - --- Remove new file and directory -assert (os.remove (tmpfile), "could not remove new file") -assert (lfs.rmdir (tmpdir), "could not remove new directory") -assert (lfs.mkdir (tmpdir..sep.."lfs_tmp_dir") == nil, "could create a directory inside a non-existent one") - --- Trying to get attributes of a non-existent file -assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file") -assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") - --- Stressing directory iterator -count = 0 -for i = 1, 4000 do - for file in lfs.dir (tmp) do - count = count + 1 - end -end - --- Stressing directory iterator, explicit version -count = 0 -for i = 1, 4000 do - local iter, dir = lfs.dir(tmp) - local file = dir:next() - while file do - count = count + 1 - file = dir:next() - end - assert(not pcall(dir.next, dir)) -end - --- directory explicit close -local iter, dir = lfs.dir(tmp) -dir:close() -assert(not pcall(dir.next, dir)) -print"Ok!" diff --git a/3rdparty/luafilesystem-1.5.0/vc6/lfs.def b/3rdparty/luafilesystem-1.5.0/vc6/lfs.def deleted file mode 100644 index 55ec688d3c..0000000000 --- a/3rdparty/luafilesystem-1.5.0/vc6/lfs.def +++ /dev/null @@ -1,5 +0,0 @@ -LIBRARY lfs.dll -DESCRIPTION "LuaFileSystem" -VERSION 1.2 -EXPORTS -luaopen_lfs diff --git a/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem.dsw b/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem.dsw deleted file mode 100644 index b4bb4b310f..0000000000 --- a/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem.dsw +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "luafilesystem_dll"=.\luafilesystem_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ - begin source code control - luafilesystem - .. - end source code control -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem_dll.dsp b/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem_dll.dsp deleted file mode 100644 index efe6c720b6..0000000000 --- a/3rdparty/luafilesystem-1.5.0/vc6/luafilesystem_dll.dsp +++ /dev/null @@ -1,127 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luafilesystem_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luafilesystem_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luafilesystem_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luafilesystem_dll.mak" CFG="luafilesystem_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luafilesystem_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luafilesystem_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luafilesystem_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luafilesystem_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6" -# PROP Intermediate_Dir "luafilesystem_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../bin/vc6/lfs.dll" /libpath:"../../external-src/lua50/lib/dll" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=cd ../bin/vc6 zip.exe luafilesystem-1.2-win32.zip lfs.dll -# End Special Build Tool - -!ELSEIF "$(CFG)" == "luafilesystem_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6" -# PROP Intermediate_Dir "luafilesystem_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/lfsd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" - -!ENDIF - -# Begin Target - -# Name "luafilesystem_dll - Win32 Release" -# Name "luafilesystem_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\lfs.c -# End Source File -# Begin Source File - -SOURCE=.\lfs.def -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\lfs.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/Makefile b/3rdparty/luasql-2.2.0/Makefile deleted file mode 100644 index e24f8acc49..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -V= 2.2.0 -CONFIG= ./config - -include $(CONFIG) - -ifeq "$(LUA_VERSION_NUM)" "500" -COMPAT_O= $(COMPAT_DIR)/compat-5.1.o -endif - -OBJS= src/luasql.o src/ls_$T.o $(COMPAT_O) - - -SRCS= src/luasql.h src/luasql.c \ - src/ls_firebird.c \ - src/ls_postgres.c \ - src/ls_odbc.c \ - src/ls_oci8.c \ - src/ls_mysql.c \ - src/ls_sqlite.c \ - src/ls_sqlite3.c - -AR= ar rcu -RANLIB= ranlib - - -lib: src/$(LIBNAME) - -src/$(LIBNAME): $(OBJS) - export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) -o $@ $(LIB_OPTION) $(OBJS) $(DRIVER_LIBS) - -$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c - -install: - mkdir -p $(LUA_LIBDIR)/luasql - cp src/$(LIBNAME) $(LUA_LIBDIR)/luasql - -jdbc_driver: - cd src/jdbc; make $@ - -clean: - rm -f src/$(LIBNAME) src/*.o $(COMPAT_O) - -# $Id: Makefile,v 1.56 2008/05/30 17:21:18 tomas Exp $ diff --git a/3rdparty/luasql-2.2.0/Makefile.win b/3rdparty/luasql-2.2.0/Makefile.win deleted file mode 100644 index 174a2da822..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win +++ /dev/null @@ -1,18 +0,0 @@ - -OBJS= src\luasql.obj src\ls_$T.obj - -SRCS= src\luasql.h src\luasql.c src\ls_$T.c - -LIBNAME= $T.dll - -all: src\$(LIBNAME) - -.c.obj: - cl /c /Fo$@ /O2 $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $< - -src\$(LIBNAME): $(OBJS) - link /dll /def:src\$T.def /out:$@ $(LIB_OPTION) $(OBJS) - -install: - IF NOT EXIST "$(LUA_LIBDIR)\luasql" mkdir "$(LUA_LIBDIR)\luasql" - cp src\$(LIBNAME) "$(LUA_LIBDIR)\luasql" diff --git a/3rdparty/luasql-2.2.0/Makefile.win.ado b/3rdparty/luasql-2.2.0/Makefile.win.ado deleted file mode 100644 index 05d0ee7e89..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win.ado +++ /dev/null @@ -1,8 +0,0 @@ -LUA_DIR=c:\lua5.1\lua - -install: - IF NOT EXIST $(LUA_DIR)\luasql mkdir $(LUA_DIR)\luasql - copy src\ado\ado.lua $(LUA_DIR)\luasql - -clean: - diff --git a/3rdparty/luasql-2.2.0/Makefile.win.firebird b/3rdparty/luasql-2.2.0/Makefile.win.firebird deleted file mode 100644 index 10eef85058..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win.firebird +++ /dev/null @@ -1,28 +0,0 @@ -LUA_INC=c:\lua5.1\include -LUA_DIR=c:\lua5.1\lua -LUA_LIBDIR=c:\lua5.1 -LUA_LIB=c:\lua5.1\lua5.1.lib - -T=firebird - -DRIVER_INCLUDE= -DRIVER_LIBS=fbclient_ms.lib - -OBJS= src\luasql.obj src\ls_$T.obj - -.c.obj: - cl /c /Fo$@ /O2 /I$(LUA_INC) /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< - -src\$T.dll: $(OBJS) - link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) - -install: - IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql - copy src\$T.dll $(LUA_LIBDIR)\luasql - -clean: - del src\$T.dll - del src\$T.exp - del src\$T.lib - del $(OBJS) - diff --git a/3rdparty/luasql-2.2.0/Makefile.win.mysql b/3rdparty/luasql-2.2.0/Makefile.win.mysql deleted file mode 100644 index c89ea99652..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win.mysql +++ /dev/null @@ -1,28 +0,0 @@ -LUA_INC=c:\lua5.1\include -LUA_DIR=c:\lua5.1\lua -LUA_LIBDIR=c:\lua5.1 -LUA_LIB=c:\lua5.1\lua5.1.lib - -T=mysql - -DRIVER_INCLUDE= /I"c:\Program Files\MySQL\MySQL Server 5.0\include" -DRIVER_LIBS= "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\libmySQL.lib" "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\mysqlclient.lib" - -OBJS= src\luasql.obj src\ls_$T.obj - -.c.obj: - cl /c /Fo$@ /O2 /I$(LUA_INC) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< - -src\$T.dll: $(OBJS) - link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) - -install: - IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql - copy src\$T.dll $(LUA_LIBDIR)\luasql - -clean: - del src\$T.dll - del src\$T.exp - del src\$T.lib - del $(OBJS) - diff --git a/3rdparty/luasql-2.2.0/Makefile.win.odbc b/3rdparty/luasql-2.2.0/Makefile.win.odbc deleted file mode 100644 index f121e26248..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win.odbc +++ /dev/null @@ -1,28 +0,0 @@ -LUA_INC=c:\lua5.1\include -LUA_DIR=c:\lua5.1\lua -LUA_LIBDIR=c:\lua5.1 -LUA_LIB=c:\lua5.1\lua5.1.lib - -T=odbc - -DRIVER_INCLUDE= -DRIVER_LIBS=odbc32.lib - -OBJS= src\luasql.obj src\ls_$T.obj - -.c.obj: - cl /c /Fo$@ /O2 /I$(LUA_INC) /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< - -src\$T.dll: $(OBJS) - link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) - -install: - IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql - copy src\$T.dll $(LUA_LIBDIR)\luasql - -clean: - del src\$T.dll - del src\$T.exp - del src\$T.lib - del $(OBJS) - diff --git a/3rdparty/luasql-2.2.0/Makefile.win.sqlite3 b/3rdparty/luasql-2.2.0/Makefile.win.sqlite3 deleted file mode 100644 index aeb99cac5f..0000000000 --- a/3rdparty/luasql-2.2.0/Makefile.win.sqlite3 +++ /dev/null @@ -1,28 +0,0 @@ -LUA_INC=c:\lua5.1\include -LUA_DIR=c:\lua5.1\lua -LUA_LIBDIR=c:\lua5.1 -LUA_LIB=c:\lua5.1\lua5.1.lib - -T=sqlite3 - -DRIVER_INCLUDE= /I"c:\sqlite3" -DRIVER_OBJ="c:\sqlite3\sqlite3.obj" - -OBJS= src\luasql.obj src\ls_$T.obj $(DRIVER_OBJ) - -.c.obj: - cl /c /Fo$@ /O2 /MD /I$(LUA_INC) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< - -src\$T.dll: $(OBJS) - link /dll /def:src\$T.def /out:$@ $(OBJS) $(LUA_LIB) - -install: - IF NOT EXIST "$(LUA_LIBDIR)\luasql" mkdir "$(LUA_LIBDIR)\luasql" - copy "src\$T.dll" "$(LUA_LIBDIR)\luasql" - -clean: - del src\$T.dll - del src\$T.exp - del src\$T.lib - del $(OBJS) - diff --git a/3rdparty/luasql-2.2.0/README b/3rdparty/luasql-2.2.0/README deleted file mode 100644 index f6c614f073..0000000000 --- a/3rdparty/luasql-2.2.0/README +++ /dev/null @@ -1,20 +0,0 @@ -LuaSQL 2.1 -http://www.keplerproject.org/luasql/ - -LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to: - - * Connect to ODBC, ADO, Oracle, MySQL, SQLite and PostgreSQL databases; - * Execute arbitrary SQL statements; - * Retrieve results in a row-by-row cursor fashion. - -LuaSQL is free software and uses the same license as Lua 5.1. - - -Source code for LuaSQL can be downloaded from the LuaForge page. - -If you are using LuaBinaries a Windows binary version of LuaSQL can be found at the same LuaForge page. - -LuaSQL 2.1.1 [29/Oct/2007] -* Fixed a bug in the SQLite3 error handling (patch by David Burgess) -* Fixed bug [#1834] for SQLite 3 (found by Savin Zlobec, patch by Marc Nijdam) -* Fixed bug [#1770] for SQLite 3 (found by Enrico Tassi, patch by Marc Nijdam) \ No newline at end of file diff --git a/3rdparty/luasql-2.2.0/config b/3rdparty/luasql-2.2.0/config deleted file mode 100644 index 4f1bae6b84..0000000000 --- a/3rdparty/luasql-2.2.0/config +++ /dev/null @@ -1,65 +0,0 @@ -# $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $ - -# Driver (leave uncommented ONLY the line with the name of the driver) -#T= mysql -#T= oci8 -#T= odbc -T= postgres -#T= sqlite -#T=sqlite3 -#T=firebird - -# Installation directories - -# Default prefix -PREFIX = /usr/local - -# System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 - -# System's lua directory (where Lua libraries are installed) -LUA_DIR= $(PREFIX)/share/lua/5.1 - -# Lua includes directory -LUA_INC= $(PREFIX)/include - -# Lua version number (first and second digits of target version) -LUA_VERSION_NUM= 501 - -# OS dependent -LIB_OPTION= -shared #for Linux -#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X - -LIBNAME= $T.so -COMPAT_DIR= ../compat/src - -# Compilation parameters -# Driver specific -######## MySQL -#DRIVER_LIBS= -L/usr/local/mysql/lib -lmysqlclient -lz -#DRIVER_INCS= -I/usr/local/mysql/include -######## Oracle OCI8 -#DRIVER_LIBS= -L/home/oracle/OraHome1/lib -lz -lclntsh -#DRIVER_INCS= -I/home/oracle/OraHome1/rdbms/demo -I/home/oracle/OraHome1/rdbms/public -######## PostgreSQL -DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq -DRIVER_INCS= -I/usr/local/pgsql/include/ -######## SQLite -#DRIVER_LIBS= -lsqlite -#DRIVER_INCS= -######## SQLite3 -#DRIVER_LIBS= -L/opt/local/lib -lsqlite3 -#DRIVER_INCS= -I/opt/local/include -######## ODBC -#DRIVER_LIBS= -L/usr/local/lib -lodbc -#DRIVER_INCS= -DUNIXODBC -I/usr/local/include -######## Firebird -#DRIVER_LIBS= -L/usr/local/firebird -lfbclient -#DRIVER_INCS= - -WARN= -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -INCS= -I$(LUA_INC) -CFLAGS= -O2 $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS) -CC= gcc - -# $Id: config,v 1.10 2008/05/30 17:21:18 tomas Exp $ diff --git a/3rdparty/luasql-2.2.0/doc/br/examples.html b/3rdparty/luasql-2.2.0/doc/br/examples.html deleted file mode 100644 index 1f69795398..0000000000 --- a/3rdparty/luasql-2.2.0/doc/br/examples.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua - - - - - -
    - -
    - -
    LuaSQL
    -
    Conectividade de banco de dados para a linguagem de programação Lua
    -
    - -
    - - - -
    - -

    Exemplos

    - -

    Abaixo, você verá um pequeno exemplo do código do uso básico da biblioteca. -Em seguida, outro exemplo mostra como criar um -iterador sobre o resultado de uma determinada consulta.

    - - -

    Uso básico

    -
    --- carregar o driver
    -require "luasql.postgres"
    --- criar o objeto de ambiente
    -env = assert (luasql.postgres())
    --- conectar a base de dados
    -con = assert (env:connect("luasql-test"))
    --- retornar a tabela
    -res = con:execute"DROP TABLE people"
    -res = assert (con:execute[[
    -  CREATE TABLE people (
    -    name  varchar(50),
    -    email varchar(50)
    -  )
    -]])
    --- adiciona alguns elementos
    -list = {
    -  { name="José das Couves", email="jose@couves.com", },
    -  { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", },
    -  { name="Maria das Dores", email="maria@dores.com", },
    -}
    -for i, p in pairs (list) do
    -  res = assert (con:execute(string.format([[
    -    INSERT INTO people
    -    VALUES ('%s', '%s')]], p.name, p.email)
    -  ))
    -end
    --- obtem um cursor
    -cur = assert (con:execute"SELECT name, email from people")
    --- imprime todos os registros, indexados pelos nomes de campos
    -row = cur:fetch ({}, "a")
    -while row do
    -  print(string.format("Nome: %s, E-mail: %s", row.name, row.email))
    -  -- reutiliza a tabela de resultados
    -  row = cur:fetch (row, "a")
    -end
    --- fecha tudo
    -cur:close()
    -con:close()
    -env:close()
    -
    - -

    O resultado desse script será:

    - -
    -Nome: José das Couves, E-mail: jose@couves.com
    -Nome: Manoel Joaquim, E-mail: manoel.joaquim@cafundo.com
    -Nome: Maria das Dores, E-mail: maria@dores.com
    -
    - - -

    Uso do iterador

    -

    Pode ser útil oferecer um iterador para cada registro do resultado:

    - -
    -function rows (connection, sql_statement)
    -  local cursor = assert (connection:execute (sql_statement))
    -  return function ()
    -    return cursor:fetch()
    -  end
    -end
    -
    - -

    Esse iterador é usado da seguinte forma:

    - -
    -require "luasql.mysql"
    -env = assert (luasql.mysql())
    -con = assert (env:connect"my_db")
    -for id, name, address in rows (con, "select * from contacts") do
    -  print (string.format ("%s: %s", name, address))
    -end
    -
    - -

    A implementação acima utiliza a coleta de lixo de Lua para -fechar o cursor. Ela pode ser melhorada de modo a apresentar -mensagens de erro mais adequadas (incluindo o statement SQL por -exemplo) ou para fechar explicitamente o cursor (verificando -se ainda existem mais linhas).

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    - $Id: examples.html,v 1.7 2008/06/11 00:26:13 jasonsantos Exp $ -

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/br/history.html b/3rdparty/luasql-2.2.0/doc/br/history.html deleted file mode 100644 index 5e582bd8bb..0000000000 --- a/3rdparty/luasql-2.2.0/doc/br/history.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua - - - - - - -
    - -
    - -
    LuaSQL
    -
    Conectividade de banco de dados para a linguagem de programação Lua
    -
    - -
    - - - -
    - -

    História

    - -
    -
    2.0.2 [26/06/2006]
    -
    Método numrows acrescentado ao driver MySQL.
    - Adicionado um arquivo config para o makefile.
    - Adicionada configuração do driver LinuxODBC.
    - Corrigiu um bug no driver SQLite (bug encontrado por Mike Petersen).
    - Corrigiu bugs nos drivers JDBC, OCI8 e ADO.
    - Testes melhorados.
    - Documentação melhorada.
    -
    - -
    2.0.1 [02/06/2005]
    -
    Corrigiu alguns erros relativos ao driver ODBC.
    - -
    2.0.0 [22/03/2005]
    -
    Novo driver ADO e corrigiu alguns erros relativos ao driver ODBC.
    - -
    2.0 beta 3 [23/12/2004]
    -
    Corrigiu apenas alguns pequenos erros.
    - -
    2.0 beta 2 [26/11/2004]
    -
    Corrigiu alguns erros e introduziu os novos drivers SQLite and JDBC. - Utiliza a - proposta de pacotes - para Lua 5.1. Veja mais detalhes em - Instalação. -
    - -
    2.0 beta [10/12/2003]
    -
    - - -

    -A versão 2.0 apresenta algumas modificações no design e aprimoramentos -na implementação em relação à versão 1.0: -

    -
      -
    • Novo método de fetch: mais eficiente e mais flexível;
    • -
    • Novo método de setautocommit;
    • -
    • Compatível com Lua 5.0 e 5.1;
    • -
    • Carregável dinamicamente ou estaticamente;
    • -
    • Novos drivers para bancos de dados Oracle e MySQL.
    • -
    - -

     

    -

     

    -

     

    - -
    - -
    - -
    -

    - Valid XHTML 1.0!

    -

    $Id: history.html,v 1.11 2008/06/11 00:26:13 jasonsantos Exp $ -

    -
    -
    - - diff --git a/3rdparty/luasql-2.2.0/doc/br/index.html b/3rdparty/luasql-2.2.0/doc/br/index.html deleted file mode 100644 index 6032bc7493..0000000000 --- a/3rdparty/luasql-2.2.0/doc/br/index.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua - - - - - - -
    - -
    - -
    LuaSQL
    -
    Conectividade de banco de dados para a linguagem de programação Lua
    -
    - -
    - - - -
    -

    Visão Geral

    -

    -LuaSQL é uma interface simples entre Lua e um sistema gerenciador de banco de dados (DBMS). Ela permite que um programa Lua: -

    -
      -
    • Conecte-se aos bancos de dados ODBC, ADO, Oracle, MySQL, SQLite, JDBC e PostgreSQL;
    • -
    • Execute comandos arbritários do SQL;
    • -
    • Recupere resultados no modo linha-a-linha de um cursor SQL.
    • -
    - -

    -LuaSQL é um software livre e utiliza a mesma licença -do Lua 5.0. -

    - -

    Status

    -

    A versão LuaSQL 2.0.2 (para Lua 5.0) está disponível para -download. -

    - -

    O driver PostgreSQL foi testado em Windows, Linux e MacOS X e é compatível com -PostgreSQL 7.x e 8.x.

    -

    O driver ODBC foi testado em Windows (drivers SQLServer e Microsoft Access).

    -

    O driver MySQL foi testado em Windows, Linux e é compatível com as versões 4.0, 4.1 e 5.0.

    -

    O driver Oracle foi testado em Windows e é compatível com OCI 8 API.

    -

    O driver SQLite foi testado em Windows e Linux e é compatível com as versões 2.x.

    -

    O driver JDBC foi testado em Windows com LuaJava 1.0 e JDK 1.4 (driver MySQL).

    -

    O driver ADO foi testado em Windows, com LuaCOM 1.3 (driver Microsoft Access).

    - -

    Download

    -

    -O download do código fonte do LuaSQL pode ser feito a partir da sua -página no -LuaForge. -Para os usuários do -LuaBinaries 5.0.2 Release 2 -uma versão compilada dos drivers do LuaSQL pode ser encontrada na mesma página -do LuaForge. -

    - -

    Créditos

    - -

    LuaSQL 2.0

    -

    -A Versão 2.0 foi redesenhada por Roberto Ierusalimschy, André Carregal -e Tomás Guisasola como parte do -Projeto Kepler. -A implementação é compatível com Lua 5.0 e foi codificada por Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas, Danilo Tuler, -com inestimáveis contribuições de Michael Roth, Tiago Dionizio e Leonardo Godinho. -

    - -

    LuaSQL 1.0

    -

    -LuaSQL foi projetado por Pedro Miller Rabinovitch e Roberto -Ierusalimschy. -A primeira implementação era compatível com Lua 4.0a. -Muitas modificações foram feitas, mas não distribuídas, por Diego Nehab (ODBC), -Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL). -

    -

    -O desenvolvimento de LuaSQL foi patrocinado pela -Fábrica Digital, FINEP e CNPq. -

    - -

    Contato

    - -

    -Para mais informações, entre em -contato conosco. -Comentários são muito bem-vindos! -

    - -

    -A lista de discussão -do projeto Kepler é outra forma de entrar em contato com desenvolvedores -e usuários da plataforma Kepler. -

    - -
    - -
    - -
    -

    - Valid XHTML 1.0!

    -

    $Id: index.html,v 1.9 2008/06/11 00:26:13 jasonsantos Exp $ -

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/br/license.html b/3rdparty/luasql-2.2.0/doc/br/license.html deleted file mode 100644 index 318ac818df..0000000000 --- a/3rdparty/luasql-2.2.0/doc/br/license.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - Licença LuaSQL - - - - - -
    - -
    - -
    LuaSQL
    -
    Conectividade de banco de dados para a linguagem de programação Lua
    -
    - -
    - - - -
    -

    License

    - -

    LuaSQL is free software: -it can be used for both academic and commercial purposes at absolutely no cost. -There are no royalties or GNU-like "copyleft" restrictions. -LuaSQL qualifies as -Open Source -software. -Its licenses are compatible with -GPL. -LuaSQL is not in the public domain and the -Kepler Project -keep its copyright. -The legal details are below.

    - -

    The spirit of the license is that -you are free to use LuaSQL for any purpose at no cost without having to ask us. -The only requirement is that if you do use LuaSQL, -then you should give us credit by including the appropriate copyright notice -somewhere in your product or its documentation.

    - -

    The LuaSQL library is designed and implemented by the -Kepler Project team. -The implementation is not derived from licensed software.

    - -
    -

    Copyright © 2003-2006 The Kepler Project.

    - -

    Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

    - -

    The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software.

    - -

    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.

    - -
    -
    - -
    -

    Valid XHTML 1.0!

    -

    -$Id: license.html,v 1.6 2008/06/11 00:26:13 jasonsantos Exp $ -

    -
    - -
    - - diff --git a/3rdparty/luasql-2.2.0/doc/br/luasql.png b/3rdparty/luasql-2.2.0/doc/br/luasql.png deleted file mode 100644 index 6d322142dc..0000000000 Binary files a/3rdparty/luasql-2.2.0/doc/br/luasql.png and /dev/null differ diff --git a/3rdparty/luasql-2.2.0/doc/br/manual.html b/3rdparty/luasql-2.2.0/doc/br/manual.html deleted file mode 100644 index fe16c406fc..0000000000 --- a/3rdparty/luasql-2.2.0/doc/br/manual.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua - - - - - -
    - -
    - -
    LuaSQL
    -
    Conectividade de banco de dados para a linguagem de programação Lua
    -
    - -
    - - - -
    - -

    Introdução

    -

    LuaSQL é uma interface simples entre Lua e diversos sistemas gerenciadores de bancos de dados (DBMS) populares -(atualmente PostgreSQL, ODBC, JDBC, MySQL, SQLite, Oracle e ADO; Interbase e Sybase estão nos nossos planos). -LuaSQL define uma API orientada a objetos. Todos os drivers devem implementar essa API comum, -mas cada um é livre para oferecer extensões.

    - -

    LuaSQL define uma única variável global: uma tabela chamada luasql. -Essa tabela é usada para armazenar os métodos de inicialização dos drivers instalados. -Esses métodos são usados para criar um -ambiente, -o qual é usado para criar uma -conexão. -A conexão pode executar comandos SQL e, eventualmente, criar um -cursor, utilizado para recuperar dados.

    - -

    LuaSQL é um software livre e usa a mesma licença do Lua 5.0.

    - -

    Compilando

    - -

    LuaSQL é distribuído como um conjunto de arquivos fonte C – -um arquivo fonte e um arquivo cabeçalho comuns a todos os drivers -(luasql.h e luasql.c) – e um arquivo fonte para cada driver. -Cada driver deve ser compilado juntamente com o arquivo luasql.c -para gerar uma biblioteca. Essa biblioteca pode ser linkada à aplicação -ou carregada dinamicamente. A função de inicialização é -luaopen_luasqlnomedriver e é compatível com o formato -open-library de Lua.

    - -

    Instalação

    - -

    Todos os drivers LuaSQL seguem a -proposta de pacotes -para Lua 5.1. Logo, esse pacote deve ser "instalado". Consulte a seção de - -configuração do Compat-5.1 para saber como instalar os pacotes binários -da maneira correta. -As bibliotecas compiladas devem ser instaladas em um diretório chamado -luasql no seu LUA_CPATH.

    - -

    Usuários Windows podem utilizar os pacotes compilados do LuaSQL disponíveis na -página do -LuaForge

    - -

    Para usar LuaSQL com o JDBC, certifique-se que:

    -
      -
    • Lua está rodando com LuaJava
    • -
    • O jar do LuaSQL está na classpath da máquina virtual do Java
    • -
    • O driver JDBC do banco de dados desejado também está na classpath - da máquina virtual
    • -
    - -

    Para usar LuaSQL com ADO, certifique-se que Lua está rodando com - LuaCOM 1.3

    - -

    Tratamento de erros

    - -

    LuaSQL é apenas uma camada abstrata de comunicação entre Lua -e um sistema de banco de dados. Portanto, erros podem ocorrem em ambos os níveis: -no cliente do banco de dados ou no driver LuaSQL.

    - -

    Erros como comandos SQL mal formados, nomes de tabela desconhecidos etc., chamados -erros de banco de dados, serão reportados pelo retorno de nil -pela função/método, seguido de uma mensagem de erro enviada pelo -sistema de banco de dados. Erros como parâmetros inválidos, ausência -de conexão, objetos inválidos etc., chamados erros de API, -são usualmente erros de programação e geram erros Lua.

    - -

    Esse comportamento vale para todas as funções/métodos descritos -neste documento, a menos que seja especificado de outra forma.

    - -

    Drivers

    - -

    -Um driver LuaSQL permite o uso da API LuaSQL com um determinado banco de dados. Para usar -um driver, este deve ser carregado na tabela luasql. O exemplo abaixo -

    - -
    -require "luasql.odbc"
    -
    - -

    -carrega o driver ODBC na tabela luasql. Note que pode-se ter mais de um driver -carregado usando-se algo como: -

    - -
    -require "luasql.odbc"
    -require "luasql.oci8"
    -
    - -

    -Este exemplo também mostra que o nome do driver nem sempre corresponde ao -nome do banco de dados, mas sim ao nome do driver no sistema de arquivos. Dado que -o driver Oracle se refere à API OCI8, ele recebe o nome de oci8 -ao invés de oracle. -

    - -

    -Alguns drivers, tais como o MySQL, tem bibliotecas para versões diferentes -do banco de dados MySQL mas utilizam o mesmo nome de arquivo (mysql). -Neste caso não é possível carregar mais de uma versão -do driver MySQL na tabela luasql. -

    - -

    Ambiente

    - -

    Um ambiente é criado chamando a função de inicialização -do driver que está armazenada na tabela luasql com o mesmo nome do driver -(odbc, postgres etc). Por exemplo,

    - -
    -env = luasql.odbc()
    -
    - -

    tentará criar um ambiente usando o driver ODBC. A única exceção -é o driver JDBC, que precisa saber que driver interno utilizar. -Logo, quando se cria um ambiente, deve-se passar o nome da classe do driver como primeiro -parâmetro para a função luasql.jdbc. Por exemplo:

    - -
    -env = luasql.jdbc ("com.mysql.jdbc.Driver")
    -
    - -

    Métodos

    - -
    -
    env:close()
    -
    Fecha o ambiente env. Só é bem sucedido se todas as suas - conexões já tiverem sido fechadas anteriormente.
    - Retorna: true, em caso de sucesso; false, quando o ambiente - já estiver fechado. -
    - -
    env:connect(sourcename[,username[,password]])
    -
    Conecta à fonte de dados especificada em sourcename usando - username e password se eles são fornecidos.
    - O sourcename pode variar de acordo com cada driver. - Alguns usam simplesmente o nome do banco de dados, como PostgreSQL, MySQL e SQLite; - o driver ODBC recebe o nome de DSN; o driver Oracle recebe o nome do serviço; e - o driver JDBC recebe um comando como - "jdbc:<database system>://<database name>", o qual é - específico para cada driver.
    - Veja também: PostgreSQL e - MySQL.
    - Retorna: uma conexão. -
    -
    - - -

    Conexão

    - -

    Uma conexão contém atributos e parâmetros específicos de uma -única conexão de base de dados. Uma conexão é criada chamando -o método environment:connect.

    - -

    Métodos

    - -
    -
    conn:close()
    -
    Fecha a conexão conn. Só é bem sucedido se todos - os seus cursores tiverem sido fechados anteriormente e se a conexão ainda estiver aberta.
    - Retorna: true, em caso de sucesso; false em caso de fracasso. -
    - -
    conn:commit()
    -
    Efetua a transação corrente. Esse atributo pode não funcionar - em sistemas de banco de dados que não implementam transações.
    - Retorna: true, em caso de sucesso; false, quando - a operação não pode ser realizada ou não está implementada. -
    - -
    conn:execute(statement)
    -
    Executa o statement SQL dado.
    - Retorna: o cursor, se houver resultados, ou o número - de registros alterados pelo comando. -
    - -
    conn:rollback()
    -
    Desfaz a transação corrente. Esse atributo pode não funcionar - em sistemas de banco de dados que não implementam transações.
    - Retorna: true, em caso de sucesso; false, quando - a operação não pode ser realizada ou não está implementada. -
    - -
    conn:setautocommit(boolean)
    -
    Ativa ou desativa o modo "auto commit". Esse atributo pode não funcionar em sistemas - de banco de dados que não implementam transações. Em sistemas de banco - de dados que não trabalham com o conceito de "modo auto commit", mas que implementam - transações, esse mecanismo é implementado pelo driver.
    - Retorna: true, em caso de sucesso; false, quando - a operação não pode ser realizada ou não está implementada. -
    -
    - - -

    Cursores

    - -

    Um cursor contém métodos para recuperar dados resultantes de um comando executado. -Um cursor é criado por meio de uma função -connection:execute. -Veja também: PostgreSQL -e Oracle.

    - -

    Métodos

    - -
    -
    cur:close()
    -
    Fecha esse cursor.
    - Retorna: true, em caso de sucesso; false, quando o cursor - já está fechado. -
    - -
    cur:fetch([table[,modestring]])
    -
    Recupera o próximo registro do resultado.
    - Se fetch é chamado sem parâmetros, os resultados - consistem em uma lista de valores. Se fetch é - chamado com uma tabela, os resultados são copiados para a tabela e a tabela - é retornada. Neste caso, pode ser usado um - parâmetro opcional de modo (modestring): uma seqüência - de caracteres indicando como deve ser construída a tabela de resultados. - A seqüência de caracteres do modo pode conter: -
    -
    "n"
    a tabela resultante terá índices numéricos (padrão)
    -
    "a"
    a tabela resultante terá índices alfanuméricos
    -
    -
    - Os índices numéricos representam as posições dos - campos no comando SELECT; os índices alfanuméricos representam - os nomes dos campos.
    - A tabela opcional (table) será usada para armazenar o próximo - registro. Isso permite o uso de uma única tabela para várias chamadas, o que - pode melhorar o desempenho geral.
    - Não existe garantia sobre os tipos dos resultados: eles podem ou não ser convertidos pelo driver - para os tipos Lua adequados. Na implementação atual, os drivers PostgreSQL e MySQL - retornam todos os valores como strings, enquanto os drivers ODBC e Oracle convertem esses valores - em tipos Lua.
    - Retorna: dados, como descrito acima, ou nil se não existem mais registros. - Note que esse método pode retornar nil como um resultado válido. -
    - -
    cur:getcolnames()
    -
    Retorna: uma tabela com os nomes das colunas. -
    - -
    cur:getcoltypes()
    -
    Retorna: uma tabela com os tipos das colunas. -
    -
    - -

    - -

    PostgreSQL

    - -

    Além das funcionalidades básicas oferecidas por todos os drivers, -o driver Postgres oferece as seguintes funcionalidades adicionais:

    - -
    -
    env:connect(sourcename[,username[,password[,hostname[,port]]]])
    -
    No driver PostgreSQL este método tem mais dois parâmetros opcionais que indicam - o hostname e a port a serem utilizados na conexão. - Além disso, o primeiro parâmetro também pode conter todas as informações - de conexão, como é dito na documentação - para a função PQconnectdb no manual do PostgreSQL - (ex. environment:connect("dbname=<name> user=<username>"))
    - Veja também: ambiente
    - Retorna: uma conexão -
    - -
    cur:numrows()
    -
    Veja também: cursores
    - Retorna: o número de registros no resultado da busca. -
    -
    - - -

    MySQL

    - -

    Além das funcionalidades básicas oferecidas por todos os drivers, -o driver MySQL ainda oferece as seguintes funcionalidades adicionais:

    - -
    -
    env:connect(sourcename[,username[,password[,hostname[,port]]]])
    -
    No driver MySQL, esse método tem mais dois parâmetros opcionais que indicam o - hostname e a port a serem utilizados na conexão. - Veja também: ambiente
    - Retorna: uma conexão -
    - -
    cur:numrows()
    -
    Veja também: cursores
    - Retorna: o número de registros no resultado da busca. -
    -
    - -

    Nota: Este driver é compatível com as versões 4.0, 4.1 e 5.0 da -API MySQL. Apenas as versões a partir de 4.1 oferecem suporte para transações, através de tabelas -BDB ou INNODB. Com a versão 4.0 ou sem um desses tipos de tabelas, os métodos -commit, rollback e setautocommit não funcionam.

    - -

    Oracle

    - -

    Além das funcionalidades básicas oferecidas por todos os drivers, -o driver Oracle ainda oferece uma funcionalidade adicional:

    - -
    -
    cur:numrows()
    -
    Veja também: cursores
    - Retorna: o número de registros no resultado da pesquisa. -
    -
    - -

    SQLite3

    - -

    Além das funcionalidades básicas oferecidas por todos os drivers, -o driver para SQLite3 ainda oferece uma funcionalidade adicional:

    - -
    env:connect(sourcename[,locktimeout])
    -
    No driver para SQLite3, este método tem mais um parâmetro opcional que indica - a quantidade de milissegundos para esperar por uma trava de escrita no banco de dados, se ela não for obtida de imediato.
    - Veja também: ambiente
    - Retorna: uma conexão
    - - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    - $Id: manual.html,v 1.11 2008/06/11 00:26:13 jasonsantos Exp $ -

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/us/examples.html b/3rdparty/luasql-2.2.0/doc/us/examples.html deleted file mode 100644 index 264364633c..0000000000 --- a/3rdparty/luasql-2.2.0/doc/us/examples.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - LuaSQL: Database connectivity for the Lua programming language - - - - - -
    - -
    - -
    LuaSQL
    -
    Database connectivity for the Lua programming language
    -
    - -
    - - - -
    - -

    Examples

    - -

    Here is an example of the basic use of the library. -After that, another example shows how to create an -iterator over the result of a SELECT -query.

    - - -

    Basic use

    -
    --- load driver
    -require "luasql.postgres"
    --- create environment object
    -env = assert (luasql.postgres())
    --- connect to data source
    -con = assert (env:connect("luasql-test"))
    --- reset our table
    -res = con:execute"DROP TABLE people"
    -res = assert (con:execute[[
    -  CREATE TABLE people(
    -    name  varchar(50),
    -    email varchar(50)
    -  )
    -]])
    --- add a few elements
    -list = {
    -  { name="Jose das Couves", email="jose@couves.com", },
    -  { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", },
    -  { name="Maria das Dores", email="maria@dores.com", },
    -}
    -for i, p in pairs (list) do
    -  res = assert (con:execute(string.format([[
    -    INSERT INTO people
    -    VALUES ('%s', '%s')]], p.name, p.email)
    -  ))
    -end
    --- retrieve a cursor
    -cur = assert (con:execute"SELECT name, email from people")
    --- print all rows, the rows will be indexed by field names
    -row = cur:fetch ({}, "a")
    -while row do
    -  print(string.format("Name: %s, E-mail: %s", row.name, row.email))
    -  -- reusing the table of results
    -  row = cur:fetch (row, "a")
    -end
    --- close everything
    -cur:close()
    -con:close()
    -env:close()
    -
    - -

    And the output of this script should be:

    - -
    -Name: Jose das Couves, E-mail: jose@couves.com
    -Name: Manoel Joaquim, E-mail: manoel.joaquim@cafundo.com
    -Name: Maria das Dores, E-mail: maria@dores.com
    -
    - - -

    Iterator use

    -

    It may be useful to offer an iterator for the resulting rows:

    - -
    -function rows (connection, sql_statement)
    -  local cursor = assert (connection:execute (sql_statement))
    -  return function ()
    -    return cursor:fetch()
    -  end
    -end
    -
    - -

    Here is how the iterator is used:

    - -
    -require "luasql.mysql"
    -env = assert (luasql.mysql())
    -con = assert (env:connect"my_db")
    -for id, name, address in rows (con, "select * from contacts") do
    -  print (string.format ("%s: %s", name, address))
    -end
    -
    - -

    The above implementation relies on the garbage collector to close -the cursor. It could be improved to give better error messages -(including the SQL statement) -or to explicitly close the cursor -(by checking whether there are no more rows).

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: examples.html,v 1.16 2008/06/11 00:26:13 jasonsantos Exp $

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/us/history.html b/3rdparty/luasql-2.2.0/doc/us/history.html deleted file mode 100644 index 3f25f1f506..0000000000 --- a/3rdparty/luasql-2.2.0/doc/us/history.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - LuaSQL: Database connectivity for the Lua programming language - - - - - -
    - -
    - -
    LuaSQL
    -
    Database connectivity for the Lua programming language
    -
    - -
    - - - -
    - -

    History

    - -
    -
    LuaSQL 2.2.0 [??/??/200?]
    -
    -
      -
    • Added Firebird driver
    • -
    • Added LuaRocks specifications
    • -
    • escape method added to some drivers
    • -
    • getlastautoid method added to MySQL driver
    • -
    • fetch method now closes the cursor when there is no more rows to retrieve
    • -
    • Uniformization of method's return values on all drivers
    • -
    -
    - -
    LuaSQL 2.1.1 [29/Oct/2007]
    -
    -
      -
    • Fixed a bug in the SQLite3 error handling (patch by David Burgess)
    • -
    • Fixed bug - [#1770] - for SQLite 3 (found by Enrico Tassi, patch by Marc Nijdam)
    • -
    • Fixed bug - [#1834] - for SQLite 3 (found by Savin Zlobec, patch by Marc Nijdam)
    • -
    -
    - -
    LuaSQL 2.1.0 [29/Aug/2007]
    -
    -
      -
    • Added support for SQLite 3
    • -
    • Bug correction: freeing PGresults in the Postgres driver (thanks to Michael Broughton)
    • -
    • Corrected memory leak when no cursor created (thanks to Klaus Ripke)
    • -
    • Corrected bug avoiding duplicate access to stack
    • -
    -
    - -
    LuaSQL 2.0.2 [26/Jun/2006]
    -
    -
      -
    • numrows method added to MySQL driver.
    • -
    • Added a config for the makefile.
    • -
    • Added configuration for the UnixODBC driver.
    • -
    • Bug fixes to the SQLite driver (bug found by Mike Petersen).
    • -
    • Bug fixes to the JDBC, OCI8 and ADO drivers.
    • -
    • Improved tests.
    • -
    • Updated documentation.
    • -
    -
    - -
    LuaSQL 2.0.1 [02/Jun/2005]
    -
    -
      -
    • Bug fixes to the ODBC driver.
    • -
    -
    - -
    LuaSQL 2.0.0 [22/Mar/2005]
    -
    -
      -
    • Added ADO driver and some bug fixes to the ODBC driver.
    • -
    -
    - -
    LuaSQL 2.0 Beta 3 [23/Dec/2004]
    -
    -
      -
    • Minor bug fixes.
    • -
    -
    - -
    LuaSQL 2.0 Beta 2 [26/Nov/2004]
    -
    -
      -
    • Bug fixes
    • -
    • New SQLite and JDBC drivers
    • -
    • LuaSQL now follows the package model - for Lua 5.1 (see Installation section for more details).
    • -
    -
    - -
    LuaSQL 2.0 Beta [10/Nov/2003]
    -
    - -

    Changes from previous versions

    - -

    Version 2.x has some design changes and implementation improvements compared to version 1.0:

    - -
      -
    • New fetch method: more eficient and more flexible
    • -
    • New setautocommit method
    • -
    • Lua 5.0 and 5.1 compatible
    • -
    • Dynamically loadable or statically linked
    • -
    • New drivers for Oracle and MySQL databases
    • -
    - -

     

    -

     

    -

     

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: history.html,v 1.20 2008/06/11 00:26:13 jasonsantos Exp $

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/us/index.html b/3rdparty/luasql-2.2.0/doc/us/index.html deleted file mode 100644 index f9e2f318af..0000000000 --- a/3rdparty/luasql-2.2.0/doc/us/index.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - LuaSQL: Database connectivity for the Lua programming language - - - - - -
    - -
    - -
    LuaSQL
    -
    Database connectivity for the Lua programming language
    -
    - -
    - - - -
    - -

    Overview

    - -

    -LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to: -

    - -
      -
    • Connect to ODBC, ADO, Oracle, MySQL, SQLite, Firebird and PostgreSQL databases;
    • -
    • Execute arbitrary SQL statements;
    • -
    • Retrieve results in a row-by-row cursor fashion.
    • -
    - -

    -LuaSQL is free software and uses the same license -as Lua 5.1. -

    - -

    Status

    - -

    -LuaSQL version 2.2.0 (for Lua 5.1) is now available for download. -For more details on the features list please check the product -history. -

    - -

    Download

    -

    -Source code for LuaSQL can be downloaded from the LuaForge page. If you are using -LuaBinaries a Windows binary -version of LuaSQL can be found at the same LuaForge page. -

    - -

    Credits

    - -

    LuaSQL 2.x

    -

    -Version 2.2 started a distributed development, with all project discussions happenign through the Kepler's mailing list. -New developers: Hisham Muhammad, Ignacio Burgueño, Luis Eduardo Jason Santos, Marc Nijdam, Mauricio Bomfim and Scott Morgan. -

    -Version 2.1 and 2.0 were redesigned by Roberto Ierusalimschy, André Carregal -and Tomás Guisasola as part of the -Kepler Project. -The implementation was coded by -Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas and -Danilo Tuler, with many contributions from Michael Broughton, Tiago Dionizio, Leonardo Godinho, Pedro Maia, Klaus Ripke, Michael Roth and others.

    - -

    LuaSQL 1.0

    - -

    LuaSQL was originally designed by Pedro Miller Rabinovitch and Roberto Ierusalimschy. -The first implementation was compatible with Lua 4.0a. -Many modifications were made but not distributed by Diego Nehab (ODBC), -Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).

    - -

    LuaSQL development was sponsored by -Fábrica Digital, FINEP and CNPq.

    - -

    Contact us

    - -

    For more information please contact us. -Comments are welcome!

    - -

    You can also reach other Kepler developers and users on the Kepler Project -mailing list.

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: index.html,v 1.27 2008/06/11 00:26:13 jasonsantos Exp $

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/doc/us/license.html b/3rdparty/luasql-2.2.0/doc/us/license.html deleted file mode 100644 index ad398fffdf..0000000000 --- a/3rdparty/luasql-2.2.0/doc/us/license.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - LuaSQL License - - - - - -
    - -
    - -
    LuaSQL
    -
    Database connectivity for the Lua programming language
    -
    - -
    - - -
    -

    License

    - -

    LuaSQL is free software: -it can be used for both academic and commercial purposes at absolutely no cost. -There are no royalties or GNU-like "copyleft" restrictions. -LuaSQL qualifies as -Open Source -software. -Its licenses are compatible with -GPL. -LuaSQL is not in the public domain and the -Kepler Project -keep its copyright. -The legal details are below.

    - -

    The spirit of the license is that -you are free to use LuaSQL for any purpose at no cost without having to ask us. -The only requirement is that if you do use LuaSQL, -then you should give us credit by including the appropriate copyright notice -somewhere in your product or its documentation.

    - -

    The LuaSQL library is designed and implemented by the -Kepler Project team. -The implementation is not derived from licensed software.

    - -
    -

    Copyright © 2003-2007 The Kepler Project.

    - -

    Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

    - -

    The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software.

    - -

    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.

    - -
    -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: license.html,v 1.17 2008/06/11 00:26:13 jasonsantos Exp $

    -
    - -
    - - diff --git a/3rdparty/luasql-2.2.0/doc/us/luasql.png b/3rdparty/luasql-2.2.0/doc/us/luasql.png deleted file mode 100644 index 6d322142dc..0000000000 Binary files a/3rdparty/luasql-2.2.0/doc/us/luasql.png and /dev/null differ diff --git a/3rdparty/luasql-2.2.0/doc/us/manual.html b/3rdparty/luasql-2.2.0/doc/us/manual.html deleted file mode 100644 index c654bbdd6e..0000000000 --- a/3rdparty/luasql-2.2.0/doc/us/manual.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - LuaSQL: Database connectivity for the Lua programming language - - - - - -
    - -
    - -
    LuaSQL
    -
    Database connectivity for the Lua programming language
    -
    - -
    - - - -
    - -

    Introduction

    -

    LuaSQL is a simple interface from Lua to a number of database management systems. -It includes a set of drivers to some popular databases -(currently PostgreSQL, ODBC, MySQL, SQLite, Oracle, and ADO; - Interbase and Sybase are in our plans). -LuaSQL defines a simple object-oriented API. -All drivers should implement this common API, -but each one is free to offer extensions.

    - -

    LuaSQL defines one single global variable, -a table called luasql. -This table is used to store the initialization methods of the -loaded drivers. -These methods are used to create an -environment object -which is used to create a -connection object. -A connection object can execute SQL statements and eventually -create a -cursor object -which is used to retrieve data. -

    -

    -LuaSQL is free software and uses the same -license -as Lua 5.1. -

    - - -

    Compiling

    - -

    LuaSQL is distributed as a set of C source files: -a pair of common source and header files (luasql.h and luasql.c); -and one source file for each driver. -Each driver should be compiled with the luasql.c file to generate a library. -This library can be linked to the application or dynamically loaded. -The initialization function is luaopen_luasqldrivername and it is a Lua -open-library compatible function. -

    - -

    Installation

    - -

    All LuaSQL drivers follow the -package model -for Lua 5.1 and therefore should be "installed" in your -package.cpath.

    - -

    Windows users can use the compiled versions of LuaSQL available at -LuaForge

    - -

    In order to use LuaSQL with ADO, make sure that you have - LuaCOM 1.3 - for Lua 5.1 installed.

    - -

    Error handling

    -

    -LuaSQL is just an abstraction layer that communicates between Lua -and a database system. -Therefore errors can occur on both levels, that is, -inside the database client or inside LuaSQL driver. -

    -

    -Errors such as malformed SQL statements, unknown table names etc. -are called database errors and -will be reported by the function/method returning nil followed -by the error message provided by the database system. -Errors such as wrong parameters, absent connection, invalid objects etc., -called API errors, -are usually program errors and so will raise a Lua error. -

    -

    -This behavior will be followed by all functions/methods -described in this document unless otherwise stated. -

    - -

    Drivers

    - -

    -A LuaSQL driver allows the use of the LuaSQL API with a database management system -that corresponds to the driver. To use a driver you have to load it in the -luasql table. The example below -

    - -
    -require "luasql.odbc"
    -
    - -

    -loads the ODBC driver in the luasql table. Note that you can have more than one -driver loaded at the same time doing something like: -

    - -
    -require "luasql.odbc"
    -require "luasql.oci8"
    -
    - -

    -This example also shows that the driver name not always correspond to the -Database name, but to the driver name in the file system. Since it refers to -the OCI8 API, the Oracle driver has the name oci8 instead of -oracle. -

    - -

    -Some drivers, such as the MySQL, have libraries for a number of database versions that -use the same file name (mysql). In this case it is not possible to -load more than one version of the MySQL driver in the luasql table. -

    - -

    Environment Objects

    - -

    An environment object is created by calling the driver's initialization -function that is stored in the luasql table, indexed with the same -name as the driver (odbc, postgres etc). For example, -

    - -
    -env = luasql.odbc()
    -
    - -

    will try to create an environment object using the ODBC driver.

    - -

    Methods

    - -
    - -
    env:close()
    -
    Closes the environment env. - Only successful if all connections pertaining to it were closed first.
    - Returns: true in case of success; false when - the object is already closed.
    - -
    env:connect(sourcename[,username[,password]])
    -
    Connects to a data source specified in sourcename using - username and password if they are supplied.
    - The sourcename may vary according to each driver. - Some use a simple database name, like PostgreSQL, MySQL and SQLite; - the ODBC driver expects the name of the DSN; - the Oracle driver expects the service name; - See also: PostgreSQL, - and MySQL extensions.
    - Returns: a connection object.
    - -
    - - -

    Connection Objects

    - -

    A connection object contains specific attributes and parameters of a -single data source connection. -A connection object is created by calling the -environment:connect -method.

    - -

    Methods

    - -
    - -
    conn:close()
    -
    Closes the connection conn. - Only successful if all cursors pertaining to it have been closed and the connection is still open.
    - Returns: true in case of success and false in case of failure.
    - - -
    conn:commit()
    -
    Commits the current transaction. - This feature might not work on database systems that do not implement - transactions.
    - Returns: true in case of success and false when - the operation could not be performed or when it is not implemented.
    - - -
    conn:execute(statement)
    -
    Executes the given SQL statement.
    - Returns: a cursor object - if there are results, or the number of rows affected by the command otherwise.
    - - -
    conn:rollback()
    -
    Rolls back the current transaction. - This feature might not work on database systems that do not implement - transactions.
    - Returns: true in case of success and false when - the operation could not be performed or when it is not implemented.
    - - -
    conn:setautocommit(boolean)
    -
    Turns on or off the "auto commit" mode. - This feature might not work on database systems that do not implement - transactions. - On database systems that do not have the concept of "auto commit mode", - but do implement transactions, this mechanism is implemented by the driver. -
    - Returns: true in case of success and false when - the operation could not be performed or when it is not implemented.
    - -
    - - -

    Cursor Objects

    - -

    A cursor object contains methods to retrieve data resulting from an -executed statement. A cursor object is created by using the -connection:execute -function. -See also PostgreSQL -and Oracle extensions.

    - -

    Methods

    - -
    - -
    cur:close()
    -
    Closes this cursor.
    - Returns: true in case of success and false when - the object is already closed.
    - - -
    cur:fetch([table[,modestring]])
    -
    Retrieves the next row of results.
    - If fetch is called without parameters, - the results will be returned directly to the caller. - If fetch is called with a table, the results will be copied - into the table and the changed table will be returned. - In this case, an optional modestring parameter can be used. - It is just a string indicating how the resulting table should be constructed. - The mode string can contain: -
    -
    "n"
    the resulting table will have numerical indices (default)
    -
    "a"
    the resulting table will have alphanumerical indices
    -
    -
    - The numerical indices are the positions of the fields in the SELECT - statement; - the alphanumerical indices are the names of the fields.
    - The optional table parameter is a table that should be - used to store the next row. - This allows the use of a unique table for many fetches, which - can improve the overall performance.
    - A call to fetch after the last row has already being returned - will close the corresponding cursor. - There is no guarantee about the types of the results: they may or may not be converted to adequate Lua types by the driver. - In the current implementation, - the PostgreSQL and MySQL drivers return all values as strings - while the ODBC and Oracle drivers convert them to Lua types.
    - Returns: data, as above, or nil if there are no more rows. - Note that this method could return nil as a valid result.
    - - -
    cur:getcolnames()
    -
    Returns: a list (table) of column names.
    - - -
    cur:getcoltypes()
    -
    Returns: a list (table) of column types.
    - -
    - -

    - -

    PostgreSQL Extensions

    - -

    Besides the basic functionality provided by all drivers, -the Postgres driver also offers these extra features:

    - -
    -
    env:connect(sourcename[,username[,password[,hostname[,port]]]])
    -
    In the PostgreSQL driver, this method adds two optional parameters - that indicate the hostname and port to connect. - Also, the first parameter can contain all connection information, - as stated in the documentation for PQconnectdb function - in the PostgreSQL manual - (e.g. environment:connect("dbname=<name> user=<username>"))
    - See also: environment objects
    - Returns: a connection object
    - -
    conn:escape(str)
    -
    Escape especial characters in the given string according to the - connection's character set.
    - See also: Official documentation of function PQescapeStringConn
    - Returns: the escaped string. -
    - -
    cur:numrows()
    -
    See also: cursor objects
    - Returns: the number of rows in the query result.
    -
    - - -

    MySQL Extensions

    - -

    Besides the basic functionality provided by all drivers, -the MySQL driver also offers these extra features:

    - -
    -
    env:connect(sourcename[,username[,password[,hostname[,port]]]])
    -
    In the MySQL driver, this method adds two optional parameters - that indicate the hostname and port to connect.
    - See also: environment objects
    - Returns: a connection object
    - -
    conn:escape(str)
    -
    Escape especial characters in the given string according to the - connection's character set.
    - See also: Official documentation of function mysql_real_escape_string
    - Returns: the escaped string. -
    - - -
    conn:getlastautoid()
    -
    Obtains the value generated for an AUTO_INCREMENT column by the previous - INSERT or UPDATE statement.
    - See also: Official documentation of function mysql_insert_id for versions 4.0, 5.1 and 6.0
    - Returns: the number of the last value generated for an AUTO_INCREMENT column. -
    - -
    cur:numrows()
    -
    See also: cursor objects
    - Returns: the number of rows in the query result.
    -
    - -

    Notes:

    - -

    This driver is compatible with versions 4.0, 4.1 and 5.0 of the -MySQL API. Only from version 4.1 MySQL provides support for transactions by using -BDB or INNODB tables. -Therefore, with version 4.0 or without one of these types of tables, the -methods commit, rollback and -setautocommit will not work.

    - -

    If you are using LuaSQL 2.0, cur:numrows() -is available only in version 2.0.2 or later.

    - - -

    Oracle Extensions

    - -

    Besides the basic functionality provided by all drivers, -the Oracle driver also offers this extra feature:

    - -
    -
    cur:numrows()
    -
    See also: cursor objects
    - Returns: the number of rows in the query result.
    -
    - -

    SQLite3 Extensions

    - -

    Besides the basic functionality provided by all drivers, -the SQLite3 driver also offers this extra feature:

    - -
    env:connect(sourcename[,locktimeout])
    -
    In the SQLite3 driver, this method adds an optional parameter - that indicate the amount of milisseconds to wait for a write lock if one cannot be obtained immediately.
    - See also: environment objects
    - Returns: a connection object
    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: manual.html,v 1.28 2008/06/11 00:26:13 jasonsantos Exp $

    -
    - -
    - - - diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-1.rockspec deleted file mode 100644 index a67e175571..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-1.rockspec +++ /dev/null @@ -1,37 +0,0 @@ -package = "LuaSQL-MySQL" -version = "2.2.0rc1-1" -source = { - url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", -} -description = { - summary = "Database connectivity for Lua (MySQL driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - MYSQL = { - header = "mysql/mysql.h" - } -} -build = { - type = "make", - variables = { - T="mysql", - LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -lmysqlclient -lz -lcrypt -lnsl -lm", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(MYSQL_INCDIR)/mysql" - }, - build_variables = { - DRIVER_LIBS="", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-2.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-2.rockspec deleted file mode 100644 index aab71676b4..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-2.2.0rc1-2.rockspec +++ /dev/null @@ -1,43 +0,0 @@ -package = "LuaSQL-MySQL" -version = "2.2.0rc1-2" -source = { - url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", -} -description = { - summary = "Database connectivity for Lua (MySQL driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - MYSQL = { - header = "mysql/mysql.h" - }, - OPENSSL = { - header = "openssl/crypto.h" - }, - ZLIB = { - header = "zlib.h" - } -} -build = { - type = "make", - variables = { - T="mysql", - LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -L$(MYSQL_LIBDIR)/mysql -lmysqlclient -L$(ZLIB_LIBDIR) -lz -L$(OPENSSL_LIBDIR) -lcrypt -lnsl -lm", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(MYSQL_INCDIR)/mysql -I$(OPENSSL_INCDIR)/openssl -I$(ZLIB_INCDIR)" - }, - build_variables = { - DRIVER_LIBS="", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-cvs-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-cvs-1.rockspec deleted file mode 100644 index 37a9c6b68e..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-mysql-cvs-1.rockspec +++ /dev/null @@ -1,34 +0,0 @@ -package = "LuaSQL-MySQL" -version = "cvs-1" -source = { - url = "git://github.com/keplerproject/luasql.git" -} -description = { - summary = "Database connectivity for Lua (MySQL driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - MYSQL = { - header = "mysql.h" - } -} -build = { - type = "builtin", - modules = { - ["luasql.mysql"] = { - sources = { "src/luasql.c", "src/ls_mysql.c" }, - libraries = { "mysqlclient" }, - incdirs = { "$(MYSQL_INCDIR)" }, - libdirs = { "$(MYSQL_LIBDIR)" } - } - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-odbc-cvs-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-odbc-cvs-1.rockspec deleted file mode 100644 index 99a45fe385..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-odbc-cvs-1.rockspec +++ /dev/null @@ -1,37 +0,0 @@ -package = "LuaSQL-ODBC" -version = "cvs-1" -source = { - url = "git://github.com/keplerproject/luasql.git" -} -description = { - summary = "Database connectivity for Lua (ODBC driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - ODBC = { - header = "sql.h" - } -} -build = { - type = "make", - variables = { - T="odbc", - LIB_OPTION = "$(LIBFLAG) -L$(ODBC_LIBDIR) -lodbc", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(ODBC_INCDIR) -DUNIXODBC" - }, - build_variables = { - DRIVER_LIBS = "", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-postgres-cvs-2.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-postgres-cvs-2.rockspec deleted file mode 100644 index 24b0de3799..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-postgres-cvs-2.rockspec +++ /dev/null @@ -1,37 +0,0 @@ -package = "LuaSQL-Postgres" -version = "cvs-2" -source = { - url = "git://github.com/keplerproject/luasql.git" -} -description = { - summary = "Database connectivity for Lua (Postgres driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - POSTGRES = { - header = "pg_config.h" - } -} -build = { - type = "make", - variables = { - T="postgres", - LIB_OPTION = "$(LIBFLAG) -L$(POSTGRES_LIBDIR) -lpq", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(POSTGRES_INCDIR) -I$(POSTGRES_INCDIR)/postgresql" - }, - build_variables = { - DRIVER_LIBS="", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-2.2.0rc1-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-2.2.0rc1-1.rockspec deleted file mode 100644 index a7f8586cad..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-2.2.0rc1-1.rockspec +++ /dev/null @@ -1,37 +0,0 @@ -package = "LuaSQL-SQLite" -version = "2.2.0rc1-1" -source = { - url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", -} -description = { - summary = "Database connectivity for Lua (SQLite driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - SQLITE = { - header = "sqlite.h" - } -} -build = { - type = "make", - variables = { - T="sqlite", - LIB_OPTION = "$(LIBFLAG) -L$(SQLITE_LIBDIR) -lsqlite", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(SQLITE_INCDIR)" - }, - build_variables = { - DRIVER_LIBS="", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-cvs-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-cvs-1.rockspec deleted file mode 100644 index c8e915abcd..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite-cvs-1.rockspec +++ /dev/null @@ -1,34 +0,0 @@ -package = "LuaSQL-SQLite" -version = "cvs-1" -source = { - url = "git://github.com/keplerproject/luasql.git" -} -description = { - summary = "Database connectivity for Lua (SQLite driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - SQLITE = { - header = "sqlite.h" - } -} -build = { - type = "builtin", - modules = { - ["luasql.sqlite"] = { - sources = { "src/luasql.c", "src/ls_sqlite.c" }, - libraries = { "sqlite" }, - incdirs = { "$(SQLITE_INCDIR)" }, - libdirs = { "$(SQLITE_LIBDIR)" } - } - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0-1.rockspec deleted file mode 100644 index 0221f180ef..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0-1.rockspec +++ /dev/null @@ -1,34 +0,0 @@ -package = "LuaSQL-SQLite3" -version = "2.2.0-1" -source = { - url = "http://cloud.github.com/downloads/keplerproject/luasql/luasql-2.2.0.tar.gz" -} -description = { - summary = "Database connectivity for Lua (SQLite3 driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - SQLITE = { - header = "sqlite3.h" - } -} -build = { - type = "builtin", - modules = { - ["luasql.sqlite3"] = { - sources = { "src/luasql.c", "src/ls_sqlite3.c" }, - libraries = { "sqlite3" }, - incdirs = { "$(SQLITE_INCDIR)" }, - libdirs = { "$(SQLITE_LIBDIR)" } - } - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0rc1-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0rc1-1.rockspec deleted file mode 100644 index 0ed5251cb0..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-2.2.0rc1-1.rockspec +++ /dev/null @@ -1,45 +0,0 @@ -package = "LuaSQL-SQLite3" -version = "2.2.0rc1-1" -source = { - url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", -} -description = { - summary = "Database connectivity for Lua (SQLite3 driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - SQLITE = { - header = "sqlite3.h" - } -} -build = { - type = "make", - variables = { - T="sqlite3", - LIB_OPTION = "$(LIBFLAG) -L$(SQLITE_LIBDIR) -lsqlite3", - CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(SQLITE_INCDIR)" - }, - build_variables = { - DRIVER_LIBS="", - }, - install_variables = { - LUA_LIBDIR = "$(LIBDIR)", - }, - platforms = { - win32 = { - variables = { - LIB_OPTION = "$(SQLITE_LIB) $(LUA_LIBDIR)\\lua5.1.lib", - CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR) /I$(SQLITE_INCDIR)" - } - } - } -} diff --git a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-cvs-1.rockspec b/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-cvs-1.rockspec deleted file mode 100644 index a90b6e2c26..0000000000 --- a/3rdparty/luasql-2.2.0/rockspec/luasql-sqlite3-cvs-1.rockspec +++ /dev/null @@ -1,34 +0,0 @@ -package = "LuaSQL-SQLite3" -version = "cvs-1" -source = { - url = "git://github.com/keplerproject/luasql.git" -} -description = { - summary = "Database connectivity for Lua (SQLite3 driver)", - detailed = [[ - LuaSQL is a simple interface from Lua to a DBMS. It enables a - Lua program to connect to databases, execute arbitrary SQL statements - and retrieve results in a row-by-row cursor fashion. - ]], - license = "MIT/X11", - homepage = "http://www.keplerproject.org/luasql/" -} -dependencies = { - "lua >= 5.1" -} -external_dependencies = { - SQLITE = { - header = "sqlite3.h" - } -} -build = { - type = "builtin", - modules = { - ["luasql.sqlite3"] = { - sources = { "src/luasql.c", "src/ls_sqlite3.c" }, - libraries = { "sqlite3" }, - incdirs = { "$(SQLITE_INCDIR)" }, - libdirs = { "$(SQLITE_LIBDIR)" } - } - } -} diff --git a/3rdparty/luasql-2.2.0/src/ado/ado.lua b/3rdparty/luasql-2.2.0/src/ado/ado.lua deleted file mode 100644 index 9a98dbf536..0000000000 --- a/3rdparty/luasql-2.2.0/src/ado/ado.lua +++ /dev/null @@ -1,369 +0,0 @@ ---------------------------------------------------------------------- --- ADO driver implemented using LuaCOM ---------------------------------------------------------------------- - -require"luacom" - ---------------------------------------------------------------------- --- luasql table name ---------------------------------------------------------------------- -local libName = "luasql" - -local Private = {} - -luasql = type(_G[libName]) == "table" and _G[libName] or {} - -local ADOTypes = {} - -do - local conn = luacom.CreateObject("ADODB.Connection") - local typeinfo = luacom.GetTypeInfo(conn) - local typelib = typeinfo:GetTypeLib() - local enums = typelib:ExportEnumerations() - for k, v in pairs(enums.DataTypeEnum) do - ADOTypes[k] = v - ADOTypes[v] = k - end -end - -local metatable = { - __metatable = "LuaSQL: you're not allowed to get this metatable" -} - -luasql._COPYRIGHT = "Copyright (C) 2003-2006 Kepler Project" -luasql._DESCRIPTION = "LuaSQL is a simple interface from Lua to a DBMS" -luasql._VERSION = "LuaSQL 2.1.1" - ---------------------------------------------------------------------- --- function that returns an ADO environment ---------------------------------------------------------------------- -function luasql.ado() - local isClosed = false - local openConns = {} - openConns.n = 0 - - local env = {} - - setmetatable(env, metatable) - - env.ADOTypes = ADOTypes - - local function closeConn(con) - - if not openConns[con] then - return false - end - - openConns[con] = nil - openConns.n = openConns.n - 1 - - return true - end - - function env:close() - if not self then error("You must provide a self parameter") end - - if isClosed or openConns.n ~= 0 then - return false - end - - isClosed = true - - return true - end - - function env:connect(sourcestr, user, pass, opts) - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Environment closed") - end - - if type(sourcestr) ~= "string" then - error("Sourcename must be a string") - end - - local conn = luacom.CreateObject("ADODB.Connection") - local ok, errmsg = pcall(conn.Open, conn, sourcestr, user, pass, opts) - - if not ok then - return nil, errmsg - end - - if conn.State == 0 then - return nil, "Invalid sourcename" - end - - openConns[conn] = true - openConns.n = openConns.n + 1 - - local ok, errmsg = pcall(conn.BeginTrans, conn) - - return Private.createConnection(conn, closeConn) - end - - return env -end - - ---------------------------------------------------------------------- --- creates an ADO connection ---------------------------------------------------------------------- -function Private.createConnection(conObj, closeFunc) - - local openCursors = {} - openCursors.n = 0 - local isClosed = false - - local con = {} - - setmetatable(con, metatable) - - local autocommit = true - - local function closeCursor(cursor) - - if not openCursors[cursor] then - return false - end - - openCursors[cursor] = nil - openCursors.n = openCursors.n - 1 - end - - function con:close() - if not self then error("You must provide a self parameter") end - - if isClosed or openCursors.n ~= 0 then - return false - end - - isClosed = true - local cond, err = pcall(conObj.RollbackTrans, conObj) - conObj:Close() - closeFunc(conObj) - - return true - end - - function con:commit() - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Connection closed") - end - - local cond, err = pcall(conObj.CommitTrans, conObj) - if not cond then - return false, err - end - - local cond, err = pcall(conObj.BeginTrans, conObj) - if not cond then - return false, err - end - - return true - end - - function con:execute(sql) - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Connection closed") - end - - local cond, res, upcount = pcall(conObj.Execute, conObj, sql) - if not cond then - return nil, res - end - - if not upcount then upcount = 0 end - - if autocommit then - local cond, err = con:commit() - if not cond then - return nil, err - end - end - - if res and res.State ~= 0 then - res = Private.createCursor(res, con, closeCursor) - openCursors[res] = true - openCursors.n = openCursors.n + 1 - else - res = upcount - end - - return res - end - - function con:rollback() - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Connection closed") - end - - local cond, err = pcall(conObj.RollbackTrans, conObj) - if not cond then - return false, err - end - - local cond, err = pcall(conObj.BeginTrans, conObj) - if not cond then - return false, err - end - - return true - end - - function con:setautocommit(bool) - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Connection closed") - end - - local cond, err = pcall(conObj.CommitTrans, conObj) - if not cond then - return false, err - end - - autocommit = bool - - local cond, err = pcall(conObj.BeginTrans, conObj) - if not cond then - return false, err - end - - return true - end - - return con -end - ---------------------------------------------------------------------- --- creates an ADO cursor (recordset) ---------------------------------------------------------------------- -function Private.createCursor(rs, con, closeFunc) - - local isClosed = false - local cursor = rs - local res = {} - local col_names = nil - local col_types = nil - - setmetatable(res, metatable) - - function res:close() - if not self then error("You must provide a self parameter") end - - if isClosed then - return false - end - - rs:Close() - closeFunc(res, con) - - isClosed = true - - return true - end - - function res:fetch(tb, modestring) - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Cursor closed") - end - - local arg_tb = tb - - if cursor.EOF then - return nil, "End of cursor reached" - end - - if tb == nil or type(tb) ~= "table" then - tb = {} - end - - if modestring == nil or type(modestring) ~= "string" then - modestring = "n" - end - - for i = 0, cursor.Fields.Count-1 do - local fields = cursor.Fields - local cond, field = pcall(fields.Item, fields, i) - if not cond then - return nil, field - end - if modestring == "n" or modestring == "an" or modestring == "na" then - tb[i+1] = field.Value - end - if modestring == "a" or modestring == "an" or modestring == "na" then - tb[field.Name] = field.Value - end - end - local cond, err = pcall(cursor.MoveNext, cursor) - if not cond then - return nil, err - end - - if modestring == "n" and not arg_tb then - return unpack(tb) - else - return tb - end - end - - function res:getcolnames() - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Cursor closed") - end - - if col_names then return col_names end - - col_names = {} - local tb = col_names - - for i = 0, cursor.Fields.Count-1 do - local fields = cursor.Fields - local cond, field = pcall(fields.Item, fields, i) - if not cond then - return nil, field - end - tb[i+1] = field.Name - end - - return tb - end - - function res:getcoltypes() - if not self then error("You must provide a self parameter") end - - if isClosed then - error("Cursor closed") - end - - if col_types then return col_types end - - col_types = {} - local tb = col_types - - for i = 0, cursor.Fields.Count-1 do - local fields = cursor.Fields - local cond, field = pcall(fields.Item, fields, i) - if not cond then - return nil, field - end - tb[i+1] = ADOTypes[field.Type] - end - - return tb - end - - return res -end diff --git a/3rdparty/luasql-2.2.0/src/firebird.def b/3rdparty/luasql-2.2.0/src/firebird.def deleted file mode 100644 index 64da2e4f92..0000000000 --- a/3rdparty/luasql-2.2.0/src/firebird.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_firebird diff --git a/3rdparty/luasql-2.2.0/src/jdbc/Makefile b/3rdparty/luasql-2.2.0/src/jdbc/Makefile deleted file mode 100644 index 455f73aa85..0000000000 --- a/3rdparty/luasql-2.2.0/src/jdbc/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# JDBC -JDK= $(JAVA_HOME) -#source dir -JDBC_SRC= src/java -#lib dir -JDBC_LIB= lib -#build dir -JDBC_BUILD= bin -#java compiler -JAVAC= $(JAVA_HOME)/bin/javac -JAR= $(JAVA_HOME)/bin/jar -#luajava jar name -LUAJAVA_JAR= luajava-1.0b4.jar -#compilation options -COMPILEOPT= -d $(JDBC_BUILD) -classpath $(JDBC_LIB)/$(LUAJAVA_JAR) -#package name -ALLPACKAGES= org/keplerproject/luasql/jdbc -SUBDIRS= addprefix $(JDBC_SRC), $(ALLPACKAGES) -SOURCEDIRS= $(JDBC_SRC)/$(ALLPACKAGES) -SOURCEFILES = $(addsuffix /*.java, $(SOURCEDIRS)) -JARSDIR= . -PACKAGENAME= luasql - - -jdbc_driver: - rm -rf $(JDBC_BUILD) - mkdir $(JDBC_BUILD) - for i in $(SUBDIRS); \ - do ( $(JAVAC) $(COMPILEOPT) $(SOURCEFILES) ) done - $(JAR) -cvf $(JARSDIR)/$(PACKAGENAME).jar -C $(JDBC_BUILD) . - -clean: - rm -rf $(JDBC_BUILD) - rm -f $(JARSDIR)/$(PACKAGENAME).jar - diff --git a/3rdparty/luasql-2.2.0/src/jdbc/Makefile.win b/3rdparty/luasql-2.2.0/src/jdbc/Makefile.win deleted file mode 100644 index 8a7ea0f9b0..0000000000 --- a/3rdparty/luasql-2.2.0/src/jdbc/Makefile.win +++ /dev/null @@ -1,35 +0,0 @@ -# JDBC -JDK= $(JAVA_HOME) -#source dir -JDBC_SRC= src\java -#lib dir -JDBC_LIB= lib -#build dir -JDBC_BUILD= bin -#java compiler -JAVAC= $(JAVA_HOME)\bin\javac.exe -JAR= $(JAVA_HOME)\bin\jar.exe -#luajava jar name -LUAJAVA_JAR= luajava-1.0b4.jar -#compilation options -COMPILEOPT= -d $(JDBC_BUILD) -classpath $(JDBC_LIB)\$(LUAJAVA_JAR) -#package name -ALLPACKAGES= org/keplerproject/luasql/jdbc -SUBDIRS= addprefix $(JDBC_SRC), $(ALLPACKAGES) -SOURCEDIRS= $(JDBC_SRC)/$(ALLPACKAGES) -SOURCEFILES = $(addsuffix /*.java, $(SOURCEDIRS)) -JARSDIR= . -PACKAGENAME= luasql - - -jdbc_driver: - rm -rf $(JDBC_BUILD) - mkdir $(JDBC_BUILD) - for i in $(SUBDIRS); \ - do ( $(JAVAC) $(COMPILEOPT) $(SOURCEFILES) ) done - $(JAR) -cvf $(JARSDIR)/$(PACKAGENAME).jar -C $(JDBC_BUILD) . - -clean: - rm -rf $(JDBC_BUILD) - rm -f $(JARSDIR)/$(PACKAGENAME).jar - diff --git a/3rdparty/luasql-2.2.0/src/jdbc/build.xml b/3rdparty/luasql-2.2.0/src/jdbc/build.xml deleted file mode 100644 index 50d8efa1fe..0000000000 --- a/3rdparty/luasql-2.2.0/src/jdbc/build.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3rdparty/luasql-2.2.0/src/jdbc/src/java/org/keplerproject/luasql/jdbc/LuaSQLCursor.java b/3rdparty/luasql-2.2.0/src/jdbc/src/java/org/keplerproject/luasql/jdbc/LuaSQLCursor.java deleted file mode 100644 index 22f6141337..0000000000 --- a/3rdparty/luasql-2.2.0/src/jdbc/src/java/org/keplerproject/luasql/jdbc/LuaSQLCursor.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.keplerproject.luasql.jdbc; - -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.sql.Types; - -import org.keplerproject.luajava.JavaFunction; -import org.keplerproject.luajava.LuaException; -import org.keplerproject.luajava.LuaObject; -import org.keplerproject.luajava.LuaState; - -/** - * LuaSQL JDBC cursor. Is implemented in Java because it's more efficient. - * The fetch method was slow in Lua, due to many accesses to Java. - * - * @author Thiago Ponte - */ -public class LuaSQLCursor -{ - private LuaState L; - private ResultSet rs; - - /** - * Function that open the Lib. - */ - static public int open(LuaState L) throws LuaException - { - L.pushJavaFunction(new JavaFunction(L){ - - /** - * Creates a LuaSQLCursor and returns it. - */ - public int execute() throws LuaException - { - ResultSet rs = (ResultSet) L.getObjectFromUserdata(2); - - L.pushJavaObject(new LuaSQLCursor(L, rs)); - - return 1; - } - }); - - return 1; - } - - protected LuaSQLCursor(LuaState L, ResultSet rs) - { - this.L = L; - this.rs = rs; - } - - /** - * - * @param table the results will be copied into the table and this table will be returned. - * @param modeString the results will be copied into the table and this table will be returned
    - * "n" the resulting table will have numerical indices (default)
    - * "a" the resulting table will have alphanumerical indices - * @return the parameter table - */ - public LuaObject fetch(LuaObject table, String modeString) - { - try - { - if (!rs.next()) - return null; - - table.push(); - - ResultSetMetaData md = rs.getMetaData(); - int columnCount = md.getColumnCount(); - for (int i = 1; i <= columnCount; i++) - { - int type = md.getColumnType(i); - -/* if ("a".equalsIgnoreCase(modeString)) - L.pushString(md.getColumnName(i)); - else - L.pushNumber(i);*/ - - switch (type) - { - case Types.INTEGER: case Types.BIGINT: case Types.SMALLINT: - case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: - case Types.NUMERIC: case Types.REAL: case Types.TINYINT: - - L.pushNumber(rs.getDouble(i)); - break; - - case Types.CHAR: case Types.VARCHAR: - case Types.LONGVARCHAR: case Types.CLOB: - - L.pushString(rs.getString(i)); - break; - - case Types.BINARY: case Types.VARBINARY: - case Types.LONGVARBINARY: case Types.BLOB: - - L.pushString(rs.getBytes(i)); - break; - - case Types.BIT: case Types.BOOLEAN: - - L.pushBoolean(rs.getBoolean(i)? 1 : 0); - break; - - case Types.DATE: case Types.TIME: case Types.TIMESTAMP: - - L.pushString(rs.getDate(i).toString()); - break; - - case Types.NULL: - - L.pushNil(); - break; - - default: - - L.pushString(rs.getString(i)); - break; - } - - if (modeString.contains("a")) - { - L.pushString(md.getColumnName(i)); - L.pushValue(-2); - L.setTable(-4); - } - if (modeString.contains("n")) - { - L.pushNumber(i); - L.pushValue(-2); - L.setTable(-4); - } - - L.pop(1); - } - - L.pop(1); - - return table; - } - catch (SQLException e) - { - return table; - } - } - /** - * Gets the name of the columns. - * - * @return a list of column names. - */ - public LuaObject getcolnames() throws SQLException - { - L.newTable(); - LuaObject table = L.getLuaObject(-1); - - ResultSetMetaData md = rs.getMetaData(); - - for (int i = 1; i <= md.getColumnCount(); i++) - { - String name = md.getColumnName(i); - - L.pushNumber(i); - L.pushString(name); - L.setTable(-3); - } - L.pop(1); - - return table; - } - - /** - * Gets the types of the columns - * - * @return a list of column types. - */ - public LuaObject getcoltypes() throws SQLException - { - L.newTable(); - LuaObject table = L.getLuaObject(-1); - - ResultSetMetaData md = rs.getMetaData(); - - for (int i = 1; i <= md.getColumnCount(); i++) - { - String name = md.getColumnTypeName(i); - - L.pushNumber(i); - L.pushString(name); - L.setTable(-3); - } - L.pop(1); - - return table; - } -} diff --git a/3rdparty/luasql-2.2.0/src/jdbc/src/lua/jdbc.lua b/3rdparty/luasql-2.2.0/src/jdbc/src/lua/jdbc.lua deleted file mode 100644 index 613d137dd4..0000000000 --- a/3rdparty/luasql-2.2.0/src/jdbc/src/lua/jdbc.lua +++ /dev/null @@ -1,345 +0,0 @@ ---------------------------------------------------------------------- --- LuaSQL JDBC driver implementation --- @author Thiago Ponte ---------------------------------------------------------------------- - ---------------------------------------------------------------------- --- luasql table name ---------------------------------------------------------------------- -local libName = "luasql" - -local LUASQL_PREFIX = "LuaSQL: " - -local Private = {} - -luasql = type(_G[libName]) == "table" and _G[libName] or {} - -Private.createJavaCursor = luajava.loadLib("org.keplerproject.luasql.jdbc.LuaSQLCursor", "open") - -luasql._COPYRIGHT = "Copyright (C) 2003-2006 Kepler Project" -luasql._DESCRIPTION = "LuaSQL is a simple interface from Lua to a DBMS" -luasql._VERSION = "LuaSQL 2.0.2" - ---------------------------------------------------------------------- --- function that returns a jdbc environment ---------------------------------------------------------------------- -function luasql.jdbc(driver) - - if driver == nil then - return nil, "Error. Argument #1 must be the jdbc driver class." - end - - local cond, err = pcall(luajava.bindClass, driver) - if not cond then - return nil, err - end - - return Private.createEnv() -end - ---------------------------------------------------------------------- --- creates a jdbc environment ---------------------------------------------------------------------- -function Private.createEnv() - - local isClosed = false - local openConns = {} - openConns.n = 0 - - local env = {} - - local function closeConn(con) - - if not openConns[con] then - return false - end - - openConns[con] = nil - openConns.n = openConns.n - 1 - - return true - end - - function env:close() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."environment expected") - end - - if isClosed or openConns.n ~= 0 then - return false - end - - isClosed = true - - return true - end - - function env:connect(sourcename, username, password) - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."environment expected") - end - - if isClosed then - error(LUASQL_PREFIX.."environment is closed") - --return nil, "Environment closed." - end - if sourcename == nil then - return nil, "Invalid sourcename." - end - - local driverManager = luajava.bindClass("java.sql.DriverManager") - - local cond, con - if username == nil and password == nil then - cond, con = pcall(driverManager.getConnection, driverManager, sourcename) - else - cond, con = pcall(driverManager.getConnection, driverManager, sourcename, username or '', password or '') - end - - if not cond then - return nil, con - end - - openConns[con] = true - openConns.n = openConns.n + 1 - - return Private.createConnection(con, closeConn) - end - - -- For compatibility with other drivers - setmetatable(env, {__metatable = LUASQL_PREFIX.."you're not allowed to get this metatable"}) - - return env -end - - ---------------------------------------------------------------------- --- creates a jdbc connection ---------------------------------------------------------------------- -function Private.createConnection(conObj, closeFunc) - - local openCursors = {} - openCursors.n = 0 - - local con = {} - - local function closeCursor(cursor) - - if not openCursors[cursor] then - return false - end - - openCursors[cursor] = nil - openCursors.n = openCursors.n - 1 - end - - function con:close() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."connection expected") - end - - if conObj:isClosed() or openCursors.n ~= 0 then - return false - end - - conObj:close() - closeFunc(conObj) - - return true - end - - function con:commit() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."connection expected") - end - - local cond, err = pcall(conObj.commit, conObj) - if not cond then - return nil, err - end - end - - function con:execute(sql) - - if conObj:isClosed() then - error(LUASQL_PREFIX.."connection is closed") - end - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."connection expected") - end - - local st = conObj:createStatement() - - local cond, isRS = pcall(st.execute, st, sql) - if not cond then - return nil, isRS - end - - local res; - if isRS then - res = Private.createCursor(st:getResultSet(), st, closeCursor, con) - openCursors[res] = true - openCursors.n = openCursors.n + 1 - else - res = st:getUpdateCount() - st:close(); - end - - return res - end - - function con:rollback() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."connection expected") - end - - local cond, err = pcall(conObj.rollback, conObj) - if not cond then - return nil, err - end - end - - function con:setautocommit(bool) - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."connection expected") - end - - local cond, err = pcall(conObj.setAutoCommit, conObj, bool) - if not cond then - return nil, err - end - end - - -- For compatibility with other drivers - setmetatable(con, {__metatable = LUASQL_PREFIX.."you're not allowed to get this metatable"}) - - return con -end - ---------------------------------------------------------------------- --- creates a jdbc cursor ---------------------------------------------------------------------- -function Private.createCursor(rs, st, closeFunc, con) - - local isClosed = false - local cursor = Private.createJavaCursor(rs) - local res = {} - local names - local types - - res._con = con - - function res:close() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."cursor expected") - end - - if isClosed then - return false - end - - rs:close() - st:close() - closeFunc(res) - - isClosed = true - - return true - end - - function res:fetch(tb, modestring) - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."cursor expected") - end - - if tb == nil or type(tb) ~= "table" then - tb = {} - local cond, tb = pcall(cursor.fetch, cursor, tb, "n") - if not cond then - error(LUASQ_PREFIX.."error fetching result") - end - - if tb then - return unpack(tb) - else - return nil - end - end - - if modestring == nil or type(modestring) ~= "string" then - modestring = "n" - end - - local cond, tb = pcall(cursor.fetch, cursor, tb, modestring) - if not cond then - return nil, tb - end - - return tb - end - - function res:getcolnames() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."cursor expected") - end - - if names then - return names - end - - local cond, tb = pcall (cursor.getcolnames, cursor) - if not cond then - return cond, tb - end - - names = tb - - return tb - end - - function res:getcoltypes() - - -- For compatibility with other drivers - if type(self) ~= "table" then - error(LUASQL_PREFIX.."cursor expected") - end - - if types then - return types - end - - local cond, tb = pcall(cursor.getcoltypes, cursor) - if not cond then - return nil, tb - end - - types = tb - - return tb - end - - -- For compatibility with other drivers - setmetatable(res, {__metatable = LUASQL_PREFIX.."you're not allowed to get this metatable"}) - - return res -end diff --git a/3rdparty/luasql-2.2.0/src/ls_firebird.c b/3rdparty/luasql-2.2.0/src/ls_firebird.c deleted file mode 100644 index b761e50697..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_firebird.c +++ /dev/null @@ -1,1052 +0,0 @@ -/* -** LuaSQL, Firebird driver -** Authors: Scott Morgan -** ls_firebird.c -*/ - -#include /* The Firebird API*/ -#include /* For managing time values */ -#include -#include - -/* Lua API */ -#include -#include - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_FIREBIRD "Firebird environment" -#define LUASQL_CONNECTION_FIREBIRD "Firebird connection" -#define LUASQL_CURSOR_FIREBIRD "Firebird cursor" - -typedef struct { - short closed; - ISC_STATUS status_vector[20]; /* for error results */ - int lock; /* lock count for open connections */ -} env_data; - -typedef struct { - short closed; - env_data* env; /* the DB enviroment this is in */ - isc_db_handle db; /* the database handle */ - char dpb_buffer[256];/* holds the database paramet buffer */ - short dpb_length; /* the used amount of the dpb */ - isc_tr_handle transaction; /* the transaction handle */ - int lock; /* lock count for open cursors */ - int autocommit; /* should each statement be commited */ -} conn_data; - -typedef struct { - short closed; - env_data* env; /* the DB enviroment this is in */ - conn_data* conn; /* the DB connection this cursor is from */ - isc_stmt_handle stmt; /* the statement handle */ - XSQLDA *out_sqlda; /* the cursor data array */ -} cur_data; - -/* How many fields to pre-alloc to the cursor */ -#define CURSOR_PREALLOC 10 - -/* Macro to ease code reading */ -#define CHECK_DB_ERROR( X ) ( (X)[0] == 1 && (X)[1] ) - -/* Use the new interpret API if available */ -#undef FB_INTERPRET -#if FB_API_VER >= 20 - #define FB_INTERPRET(BUF, LEN, VECTOR) fb_interpret(BUF, LEN, VECTOR) -#else - #define FB_INTERPRET(BUF, LEN, VECTOR) isc_interpret(BUF, VECTOR) -#endif - -/* -** Returns a standard database error message -*/ -static int return_db_error(lua_State *L, const ISC_STATUS *pvector) -{ - char errmsg[512]; - - lua_pushnil(L); - FB_INTERPRET(errmsg, 512, &pvector); - lua_pushstring(L, errmsg); - while(FB_INTERPRET(errmsg, 512, &pvector)) { - lua_pushstring(L, "\n * "); - lua_pushstring(L, errmsg); - lua_concat(L, 3); - } - - return 2; -} - -/* -** Registers a given C object in the registry to avoid GC -*/ -static void lua_registerobj(lua_State *L, int index, void *obj) -{ - lua_pushvalue(L, index); - lua_pushlightuserdata(L, obj); - lua_pushvalue(L, -2); - lua_settable(L, LUA_REGISTRYINDEX); - lua_pop(L, 1); -} - -/* -** Unregisters a given C object from the registry -*/ -static void lua_unregisterobj(lua_State *L, void *obj) -{ - lua_pushlightuserdata(L, obj); - lua_pushnil(L); - lua_settable(L, LUA_REGISTRYINDEX); -} - -/* -** Free's up the memory alloc'd to the cursor data -*/ -static void free_cur(cur_data* cur) -{ - int i; - XSQLVAR *var; - - /* free the field memory blocks */ - for (i=0, var = cur->out_sqlda->sqlvar; i < cur->out_sqlda->sqld; i++, var++) { - free(var->sqldata); - if(var->sqlind != NULL) - free(var->sqlind); - } - - /* free the data array */ - free(cur->out_sqlda); -} - -/* -** Check for valid environment. -*/ -static env_data *getenvironment (lua_State *L, int i) { - env_data *env = (env_data *)luaL_checkudata (L, i, LUASQL_ENVIRONMENT_FIREBIRD); - luaL_argcheck (L, env != NULL, i, "environment expected"); - luaL_argcheck (L, !env->closed, i, "environment is closed"); - return env; -} - -/* -** Check for valid connection. -*/ -static conn_data *getconnection (lua_State *L, int i) { - conn_data *conn = (conn_data *)luaL_checkudata (L, i, LUASQL_CONNECTION_FIREBIRD); - luaL_argcheck (L, conn != NULL, i, "connection expected"); - luaL_argcheck (L, !conn->closed, i, "connection is closed"); - return conn; -} - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor (lua_State *L, int i) { - cur_data *cur = (cur_data *)luaL_checkudata (L, i, LUASQL_CURSOR_FIREBIRD); - luaL_argcheck (L, cur != NULL, i, "cursor expected"); - luaL_argcheck (L, !cur->closed, i, "cursor is closed"); - return cur; -} - -/* -** Returns the statement type -*/ -static int get_statement_type(cur_data* cur) -{ - int length, type; - char type_item[] = { isc_info_sql_stmt_type }; - char res_buffer[88], *pres; - - pres = res_buffer; - - isc_dsql_sql_info( cur->env->status_vector, &cur->stmt, - sizeof(type_item), type_item, - sizeof(res_buffer), res_buffer ); - if (cur->env->status_vector[0] == 1 && cur->env->status_vector[1] > 0) - return -1; - - /* check the type of the statement */ - if (*pres == isc_info_sql_stmt_type) - { - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - type = isc_vax_integer(pres, length); - pres += length; - } else - return -2; /* should have had the isc_info_sql_stmt_type info */ - - return type; -} - -/* -** Return the number of rows affected by last operation -*/ -static int count_rows_affected(cur_data* cur) -{ - int length, type, res=0; - int del_count = 0, ins_count = 0, upd_count = 0, sel_count = 0; - char type_item[] = { isc_info_sql_stmt_type, isc_info_sql_records }; - char res_buffer[88], *pres; - - pres = res_buffer; - - isc_dsql_sql_info( cur->env->status_vector, &cur->stmt, - sizeof(type_item), type_item, - sizeof(res_buffer), res_buffer ); - if (cur->env->status_vector[0] == 1 && cur->env->status_vector[1] > 0) - return -1; - - /* check the type of the statement */ - if (*pres == isc_info_sql_stmt_type) - { - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - type = isc_vax_integer(pres, length); - pres += length; - } else - return -2; /* should have had the isc_info_sql_stmt_type info */ - - if(type > 4) - return 0; /* not a SELECT, INSERT, UPDATE or DELETE SQL statement */ - - if (*pres == isc_info_sql_records) - { - pres++; - length = isc_vax_integer(pres, 2); /* normally 29 bytes */ - pres += 2; - - while(*pres != 1) { - switch(*pres) { - case isc_info_req_select_count: - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - sel_count = isc_vax_integer(pres, length); - pres += length; - break; - case isc_info_req_insert_count: - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - ins_count = isc_vax_integer(pres, length); - pres += length; - break; - case isc_info_req_update_count: - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - upd_count = isc_vax_integer(pres, length); - pres += length; - break; - case isc_info_req_delete_count: - pres++; - length = isc_vax_integer(pres, 2); - pres += 2; - del_count = isc_vax_integer(pres, length); - pres += length; - break; - default: - pres++; - break; - } - } - } else - return -3; - - switch(type) { - case isc_info_sql_stmt_select: - res = sel_count; - break; - case isc_info_sql_stmt_delete: - res = del_count; - break; - case isc_info_sql_stmt_update: - res = upd_count; - break; - case isc_info_sql_stmt_insert: - res = ins_count; - break; - } - return res; -} - -/* -** Executes a SQL statement. -** Returns -** cursor object: if there are results or -** row count: number of rows affected by statement if no results -*/ -static int conn_execute (lua_State *L) { - conn_data *conn = getconnection(L,1); - const char *statement = luaL_checkstring(L, 2); - int dialect = (int)luaL_optnumber(L, 3, 3); - - XSQLVAR *var; - long dtype; - int i, n, count, stmt_type; - - cur_data cur; - - cur.closed = 0; - cur.env = conn->env; - cur.conn = conn; - cur.stmt = NULL; - - cur.out_sqlda = (XSQLDA *)malloc(XSQLDA_LENGTH(CURSOR_PREALLOC)); - cur.out_sqlda->version = SQLDA_VERSION1; - cur.out_sqlda->sqln = CURSOR_PREALLOC; - - /* create a statement to handle the query */ - isc_dsql_allocate_statement(conn->env->status_vector, &conn->db, &cur.stmt); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free(cur.out_sqlda); - return return_db_error(L, conn->env->status_vector); - } - - /* process the SQL ready to run the query */ - isc_dsql_prepare(conn->env->status_vector, &conn->transaction, &cur.stmt, 0, (char*)statement, dialect, cur.out_sqlda); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free(cur.out_sqlda); - return return_db_error(L, conn->env->status_vector); - } - - /* what type of SQL statement is it? */ - stmt_type = get_statement_type(&cur); - if(stmt_type < 0) { - free(cur.out_sqlda); - return return_db_error(L, conn->env->status_vector); - } - - /* an unsupported SQL statement (something like COMMIT) */ - if(stmt_type > 5) { - free(cur.out_sqlda); - return luasql_faildirect(L, "unsupported SQL statement"); - } - - /* resize the result set if needed */ - if (cur.out_sqlda->sqld > cur.out_sqlda->sqln) - { - n = cur.out_sqlda->sqld; - free(cur.out_sqlda); - cur.out_sqlda = (XSQLDA *)malloc(XSQLDA_LENGTH(n)); - cur.out_sqlda->sqln = n; - cur.out_sqlda->version = SQLDA_VERSION1; - isc_dsql_describe(conn->env->status_vector, &cur.stmt, 1, cur.out_sqlda); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free(cur.out_sqlda); - return return_db_error(L, conn->env->status_vector); - } - } - - /* prep the result set ready to handle the data */ - for (i=0, var = cur.out_sqlda->sqlvar; i < cur.out_sqlda->sqld; i++, var++) { - dtype = (var->sqltype & ~1); /* drop flag bit for now */ - switch(dtype) { - case SQL_VARYING: - var->sqldata = (char *)malloc(sizeof(char)*var->sqllen + 2); - break; - case SQL_TEXT: - var->sqldata = (char *)malloc(sizeof(char)*var->sqllen); - break; - case SQL_SHORT: - var->sqldata = (char *)malloc(sizeof(short)); - break; - case SQL_LONG: - var->sqldata = (char *)malloc(sizeof(long)); - break; - case SQL_INT64: - var->sqldata = (char *)malloc(sizeof(ISC_INT64)); - break; - case SQL_FLOAT: - var->sqldata = (char *)malloc(sizeof(float)); - break; - case SQL_DOUBLE: - var->sqldata = (char *)malloc(sizeof(double)); - break; - case SQL_TYPE_TIME: - var->sqldata = (char *)malloc(sizeof(ISC_TIME)); - break; - case SQL_TYPE_DATE: - var->sqldata = (char *)malloc(sizeof(ISC_DATE)); - break; - case SQL_TIMESTAMP: - var->sqldata = (char *)malloc(sizeof(ISC_TIMESTAMP)); - break; - case SQL_BLOB: - var->sqldata = (char *)malloc(sizeof(ISC_QUAD)); - break; - /* TODO : add extra data type handles here */ - } - - if (var->sqltype & 1) { - /* allocate variable to hold NULL status */ - var->sqlind = (short *)malloc(sizeof(short)); - } else { - var->sqlind = NULL; - } - } - - /* run the query */ - isc_dsql_execute(conn->env->status_vector, &conn->transaction, &cur.stmt, 1, NULL); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free_cur(&cur); - return return_db_error(L, conn->env->status_vector); - } - - /* if autocommit is set and it's a non SELECT query, commit change */ - if(conn->autocommit != 0 && stmt_type > 1) { - isc_commit_retaining(conn->env->status_vector, &conn->transaction); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free_cur(&cur); - return return_db_error(L, conn->env->status_vector); - } - } - - /* what do we return? a cursor or a count */ - if(cur.out_sqlda->sqld > 0) { /* a cursor */ - cur_data* user_cur; - /* open the cursor ready for fetch cycles */ - isc_dsql_set_cursor_name(cur.env->status_vector, &cur.stmt, "dyn_cursor", (unsigned short)NULL); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) { - free_cur(&cur); - return return_db_error(L, conn->env->status_vector); - } - - /* copy the cursor into a new lua userdata object */ - user_cur = (cur_data*)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_FIREBIRD); - - memcpy((void*)user_cur, (void*)&cur, sizeof(cur_data)); - - /* add cursor to the lock count */ - lua_registerobj(L, 1, conn); - ++conn->lock; - } else { /* a count */ - if( (count = count_rows_affected(&cur)) < 0 ) { - free(cur.out_sqlda); - return return_db_error(L, conn->env->status_vector); - } - - lua_pushnumber(L, count); - - /* totaly finnished with the cursor */ - isc_dsql_free_statement(conn->env->status_vector, &cur.stmt, DSQL_drop); - free(cur.out_sqlda); - } - - return 1; -} - -/* -** Commits the current transaction -*/ -static int conn_commit(lua_State *L) { - conn_data *conn = getconnection(L,1); - - isc_commit_retaining(conn->env->status_vector, &conn->transaction); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) - return return_db_error(L, conn->env->status_vector); - - lua_pushboolean(L, 1); - return 1; -} - -/* -** Rolls back the current transaction -** Lua Returns: -** 1 if rollback is sucsessful -** nil and error message otherwise. -*/ -static int conn_rollback(lua_State *L) { - conn_data *conn = getconnection(L,1); - - isc_rollback_retaining(conn->env->status_vector, &conn->transaction); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) - return return_db_error(L, conn->env->status_vector); - - lua_pushboolean(L, 1); - return 1; -} - -/* -** Sets the autocommit state of the connection -** Lua Returns: -** autocommit state (0:off, 1:on) -** nil and error message on error. -*/ -static int conn_setautocommit(lua_State *L) { - conn_data *conn = getconnection(L,1); - - if(lua_toboolean(L, 2)) - conn->autocommit = 1; - else - conn->autocommit = 0; - - lua_pushboolean(L, 1); - return 1; -} - -/* -** Closes a connection. -** Lua Returns: -** 1 if close was sucsessful, 0 if already closed -** nil and error message otherwise. -*/ -static int conn_close (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata(L,1,LUASQL_CONNECTION_FIREBIRD); - luaL_argcheck (L, conn != NULL, 1, "connection expected"); - - /* already closed */ - if(conn->closed != 0) { - lua_pushboolean(L, 0); - return 1; - } - - /* are all related cursors closed? */ - if(conn->lock > 0) - return luasql_faildirect(L, "there are still open cursors"); - - if(conn->autocommit != 0) - isc_commit_transaction(conn->env->status_vector, &conn->transaction); - else - isc_rollback_transaction(conn->env->status_vector, &conn->transaction); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) - return return_db_error(L, conn->env->status_vector); - - isc_detach_database(conn->env->status_vector, &conn->db); - if ( CHECK_DB_ERROR(conn->env->status_vector) ) - return return_db_error(L, conn->env->status_vector); - - conn->closed = 1; - --conn->env->lock; - - /* check environment can be GC'd */ - if(conn->env->lock == 0) - lua_unregisterobj(L, conn->env); - - lua_pushboolean(L, 1); - return 1; -} - -/* -** GCs an connection object -*/ -static int conn_gc (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata(L,1,LUASQL_CONNECTION_FIREBIRD); - - if(conn->closed == 0) { - if(conn->autocommit != 0) - isc_commit_transaction(conn->env->status_vector, &conn->transaction); - else - isc_rollback_transaction(conn->env->status_vector, &conn->transaction); - - isc_detach_database(conn->env->status_vector, &conn->db); - - conn->closed = 1; - --conn->env->lock; - - /* check environment can be GC'd */ - if(conn->env->lock == 0) - lua_unregisterobj(L, conn->env); - } - - return 0; -} - -/* -** Escapes a given string so that it can't break out of it's delimiting quotes -*/ -static int conn_escape(lua_State *L) { - size_t len; - const char *from = luaL_checklstring (L, 2, &len); - char *res = malloc(len*sizeof(char)*2+1); - char *to = res; - - if(res) { - while(*from != '\0') { - *(to++) = *from; - if(*from == '\'') - *(to++) = *from; - - from++; - } - *to = '\0'; - - lua_pushstring(L, res); - free(res); - return 1; - } - - luaL_error(L, "could not allocate escaped string"); - return 0; -} - -/* -** Pushes the indexed value onto the lua stack -*/ -static void push_column(lua_State *L, int i, cur_data *cur) { - int varcharlen; - struct tm timevar; - char timestr[256]; - ISC_STATUS blob_stat; - isc_blob_handle blob_handle = NULL; - ISC_QUAD blob_id; - luaL_Buffer b; - char *buffer; - unsigned short actual_seg_len; - - if( (cur->out_sqlda->sqlvar[i].sqlind != NULL) && - (*(cur->out_sqlda->sqlvar[i].sqlind) != 0) ) { - /* a null field? */ - lua_pushnil(L); - } else { - switch(cur->out_sqlda->sqlvar[i].sqltype & ~1) { - case SQL_VARYING: - varcharlen = (int)isc_vax_integer(cur->out_sqlda->sqlvar[i].sqldata, 2); - lua_pushlstring(L, cur->out_sqlda->sqlvar[i].sqldata+2, varcharlen); - break; - case SQL_TEXT: - lua_pushlstring(L, cur->out_sqlda->sqlvar[i].sqldata, cur->out_sqlda->sqlvar[i].sqllen); - break; - case SQL_SHORT: - lua_pushnumber(L, *(short*)(cur->out_sqlda->sqlvar[i].sqldata)); - break; - case SQL_LONG: - lua_pushnumber(L, *(long*)(cur->out_sqlda->sqlvar[i].sqldata)); - break; - case SQL_INT64: - lua_pushnumber(L, (lua_Number)*(ISC_INT64*)(cur->out_sqlda->sqlvar[i].sqldata)); - break; - case SQL_FLOAT: - lua_pushnumber(L, *(float*)(cur->out_sqlda->sqlvar[i].sqldata)); - break; - case SQL_DOUBLE: - lua_pushnumber(L, *(double*)(cur->out_sqlda->sqlvar[i].sqldata)); - break; - case SQL_TYPE_TIME: - isc_decode_sql_time((ISC_TIME*)(cur->out_sqlda->sqlvar[i].sqldata), &timevar); - strftime(timestr, 255, "%X", &timevar); - lua_pushstring(L, timestr); - break; - case SQL_TYPE_DATE: - isc_decode_sql_date((ISC_DATE*)(cur->out_sqlda->sqlvar[i].sqldata), &timevar); - strftime(timestr, 255, "%x", &timevar); - lua_pushstring(L, timestr); - break; - case SQL_TIMESTAMP: - isc_decode_timestamp((ISC_TIMESTAMP*)(cur->out_sqlda->sqlvar[i].sqldata), &timevar); - strftime(timestr, 255, "%x %X", &timevar); - lua_pushstring(L, timestr); - break; - case SQL_BLOB: - /* get the BLOB ID and open it */ - memcpy(&blob_id, cur->out_sqlda->sqlvar[i].sqldata, sizeof(ISC_QUAD)); - isc_open_blob2( cur->env->status_vector, - &cur->conn->db, &cur->conn->transaction, - &blob_handle, &blob_id, 0, NULL ); - /* fetch the blob data */ - luaL_buffinit(L, &b); - buffer = luaL_prepbuffer(&b); - - blob_stat = isc_get_segment( cur->env->status_vector, - &blob_handle, &actual_seg_len, - LUAL_BUFFERSIZE, buffer ); - while(blob_stat == 0 || cur->env->status_vector[1] == isc_segment) { - luaL_addsize(&b, actual_seg_len); - buffer = luaL_prepbuffer(&b); - blob_stat = isc_get_segment( cur->env->status_vector, - &blob_handle, &actual_seg_len, - LUAL_BUFFERSIZE, buffer ); - } - - /* finnished, close the BLOB */ - isc_close_blob(cur->env->status_vector, &blob_handle); - blob_handle = NULL; - - luaL_pushresult(&b); - break; - default: - lua_pushstring(L, ""); - break; - } - } -} - -/* -** Returns a row of data from the query -** Lua Returns: -** list of results or table of results depending on call -** nil and error message otherwise. -*/ -static int cur_fetch (lua_State *L) { - ISC_STATUS fetch_stat; - int i; - cur_data *cur = getcursor(L,1); - const char *opts = luaL_optstring (L, 3, "n"); - int num = strchr(opts, 'n') != NULL; - int alpha = strchr(opts, 'a') != NULL; - - if ((fetch_stat = isc_dsql_fetch(cur->env->status_vector, &cur->stmt, 1, cur->out_sqlda)) == 0) { - if (lua_istable (L, 2)) { - /* remove the option string */ - lua_settop(L, 2); - - /* loop through the columns */ - for (i = 0; i < cur->out_sqlda->sqld; i++) { - push_column(L, i, cur); - - if( num ) { - lua_pushnumber(L, i+1); - lua_pushvalue(L, -2); - lua_settable(L, 2); - } - - if( alpha ) { - lua_pushlstring(L, cur->out_sqlda->sqlvar[i].aliasname, cur->out_sqlda->sqlvar[i].aliasname_length); - lua_pushvalue(L, -2); - lua_settable(L, 2); - } - - lua_pop(L, 1); - } - - /* returning given table */ - return 1; - } else { - for (i = 0; i < cur->out_sqlda->sqld; i++) - push_column(L, i, cur); - - /* returning a list of values */ - return cur->out_sqlda->sqld; - } - } - - /* isc_dsql_fetch returns 100 if no more rows remain to be retrieved - so this can be ignored */ - if (fetch_stat != 100L) - return return_db_error(L, cur->env->status_vector); - - /* last row has been fetched, close cursor */ - isc_dsql_free_statement(cur->env->status_vector, &cur->stmt, DSQL_drop); - if ( CHECK_DB_ERROR(cur->env->status_vector) ) - return return_db_error(L, cur->env->status_vector); - - /* free the cursor data */ - free_cur(cur); - - cur->closed = 1; - - /* remove cursor from lock count */ - --cur->conn->lock; - - /* return sucsess */ - return 0; -} - -/* -** Returns a table of column names from the query -** Lua Returns: -** a table of column names -** nil and error message otherwise. -*/ -static int cur_colnames (lua_State *L) { - int i; - XSQLVAR *var; - cur_data *cur = getcursor(L,1); - - lua_newtable(L); - - for (i=1, var = cur->out_sqlda->sqlvar; i <= cur->out_sqlda->sqld; i++, var++) { - lua_pushnumber(L, i); - lua_pushlstring(L, var->aliasname, var->aliasname_length); - lua_settable(L, -3); - } - - return 1; -} - -/* -** Returns a table of column types from the query -** Lua Returns: -** a table of column types -** nil and error message otherwise. -*/ -static int cur_coltypes (lua_State *L) { - int i; - XSQLVAR *var; - cur_data *cur = getcursor(L,1); - - lua_newtable(L); - - for (i=1, var = cur->out_sqlda->sqlvar; i <= cur->out_sqlda->sqld; i++, var++) { - lua_pushnumber(L, i); - switch(var->sqltype & ~1) { - case SQL_VARYING: - case SQL_TEXT: - case SQL_TYPE_TIME: - case SQL_TYPE_DATE: - case SQL_TIMESTAMP: - case SQL_BLOB: - lua_pushstring(L, "string"); - break; - case SQL_SHORT: - case SQL_LONG: - case SQL_INT64: - case SQL_FLOAT: - case SQL_DOUBLE: - lua_pushstring(L, "number"); - break; - default: - lua_pushstring(L, "unknown"); - break; - } - lua_settable(L, -3); - } - - return 1; -} - -/* -** Closes a cursor object -** Lua Returns: -** 1 if close was sucsessful, 0 if already closed -** nil and error message otherwise. -*/ -static int cur_close (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata(L,1,LUASQL_CURSOR_FIREBIRD); - luaL_argcheck (L, cur != NULL, 1, "cursor expected"); - - if(cur->closed == 0) { - isc_dsql_free_statement(cur->env->status_vector, &cur->stmt, DSQL_drop); - if ( CHECK_DB_ERROR(cur->env->status_vector) ) - return return_db_error(L, cur->env->status_vector); - - /* free the cursor data */ - free_cur(cur); - - /* remove cursor from lock count */ - cur->closed = 1; - --cur->conn->lock; - - /* check if connection can be unregistered */ - if(cur->conn->lock == 0) - lua_unregisterobj(L, cur->conn); - - /* return sucsess */ - lua_pushboolean(L, 1); - return 1; - } - - lua_pushboolean(L, 0); - return 1; -} - -/* -** GCs a cursor object -*/ -static int cur_gc (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata(L,1,LUASQL_CURSOR_FIREBIRD); - luaL_argcheck (L, cur != NULL, 1, "cursor expected"); - - if(cur->closed == 0) { - isc_dsql_free_statement(cur->env->status_vector, &cur->stmt, DSQL_drop); - - /* free the cursor data */ - free_cur(cur); - - /* remove cursor from lock count */ - cur->closed = 1; - --cur->conn->lock; - - /* check if connection can be unregistered */ - if(cur->conn->lock == 0) - lua_unregisterobj(L, cur->conn); - } - - return 0; -} - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) { - int i; - env_data *env; - - env = (env_data *)lua_newuserdata (L, sizeof (env_data)); - luasql_setmeta (L, LUASQL_ENVIRONMENT_FIREBIRD); - /* fill in structure */ - for(i=0; i<20; i++) - env->status_vector[i] = 0; - env->closed = 0; - env->lock = 0; - - return 1; -} - -/* -** Creates and returns a connection object -** Lua Input: source, user, pass -** source: data source -** user, pass: data source authentication information -** Lua Returns: -** connection object if successfull -** nil and error message otherwise. -*/ -static int env_connect (lua_State *L) { - char *dpb; - int i; - static char isc_tpb[] = { isc_tpb_version3, - isc_tpb_write }; - conn_data conn; - conn_data* res_conn; - - env_data *env = (env_data *) getenvironment (L, 1); - const char *sourcename = luaL_checkstring (L, 2); - const char *username = luaL_optstring (L, 3, ""); - const char *password = luaL_optstring (L, 4, ""); - - conn.env = env; - conn.db = 0L; - conn.transaction = 0L; - conn.lock = 0; - conn.autocommit = 0; - - /* Construct a database parameter buffer. */ - dpb = conn.dpb_buffer; - *dpb++ = isc_dpb_version1; - *dpb++ = isc_dpb_num_buffers; - *dpb++ = 1; - *dpb++ = 90; - - /* add the user name and password */ - *dpb++ = isc_dpb_user_name; - *dpb++ = (char)strlen(username); - for(i=0; i<(int)strlen(username); i++) - *dpb++ = username[i]; - *dpb++ = isc_dpb_password; - *dpb++ = (char)strlen(password); - for(i=0; i<(int)strlen(password); i++) - *dpb++ = password[i]; - - /* the length of the dpb */ - conn.dpb_length = (short)(dpb - conn.dpb_buffer); - - /* do the job */ - isc_attach_database(env->status_vector, (short)strlen(sourcename), (char*)sourcename, &conn.db, - conn.dpb_length, conn.dpb_buffer); - - /* an error? */ - if ( CHECK_DB_ERROR(conn.env->status_vector) ) - return return_db_error(L, conn.env->status_vector); - - /* open up the transaction handle */ - isc_start_transaction( env->status_vector, &conn.transaction, 1, - &conn.db, (unsigned short)sizeof(isc_tpb), - isc_tpb ); - - /* return NULL on error */ - if ( CHECK_DB_ERROR(conn.env->status_vector) ) - return return_db_error(L, conn.env->status_vector); - - /* create the lua object and add the connection to the lock */ - res_conn = (conn_data*)lua_newuserdata(L, sizeof(conn_data)); - luasql_setmeta (L, LUASQL_CONNECTION_FIREBIRD); - memcpy(res_conn, &conn, sizeof(conn_data)); - res_conn->closed = 0; /* connect now officially open */ - - /* register the connection */ - lua_registerobj(L, 1, env); - ++env->lock; - - return 1; -} - -/* -** Closes an environment object -** Lua Returns: -** 1 if close was sucsessful, 0 if already closed -** nil and error message otherwise. -*/ -static int env_close (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_FIREBIRD); - luaL_argcheck (L, env != NULL, 1, "environment expected"); - - /* already closed? */ - if(env->closed == 1) { - lua_pushboolean(L, 0); - return 1; - } - - /* check the lock */ - if(env->lock > 0) - return luasql_faildirect(L, "there are still open connections"); - - /* unregister */ - lua_unregisterobj(L, env); - - /* mark as closed */ - env->closed = 1; - - lua_pushboolean(L, 1); - return 1; -} - -/* -** GCs an environment object -*/ -static int env_gc (lua_State *L) { - /* nothing to be done for the FB envronment */ - return 0; -} - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) { - struct luaL_reg environment_methods[] = { - {"__gc", env_gc}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_gc}, - {"close", conn_close}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {"escape", conn_escape}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_gc}, - {"close", cur_close}, - {"fetch", cur_fetch}, - {"getcoltypes", cur_coltypes}, - {"getcolnames", cur_colnames}, - {NULL, NULL}, - }; - luasql_createmeta (L, LUASQL_ENVIRONMENT_FIREBIRD, environment_methods); - luasql_createmeta (L, LUASQL_CONNECTION_FIREBIRD, connection_methods); - luasql_createmeta (L, LUASQL_CURSOR_FIREBIRD, cursor_methods); - lua_pop (L, 3); -} - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_firebird (lua_State *L) { - struct luaL_reg driver[] = { - {"firebird", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_mysql.c b/3rdparty/luasql-2.2.0/src/ls_mysql.c deleted file mode 100644 index bc66692604..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_mysql.c +++ /dev/null @@ -1,576 +0,0 @@ -/* -** LuaSQL, MySQL driver -** Authors: Eduardo Quintao -** See Copyright Notice in license.html -** $Id: ls_mysql.c,v 1.31 2009/02/07 23:16:23 tomas Exp $ -*/ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#define NO_CLIENT_LONG_LONG -#endif - -#include "mysql.h" - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_MYSQL "MySQL environment" -#define LUASQL_CONNECTION_MYSQL "MySQL connection" -#define LUASQL_CURSOR_MYSQL "MySQL cursor" - -/* For compat with old version 4.0 */ -#if (MYSQL_VERSION_ID < 40100) -#define MYSQL_TYPE_VAR_STRING FIELD_TYPE_VAR_STRING -#define MYSQL_TYPE_STRING FIELD_TYPE_STRING -#define MYSQL_TYPE_DECIMAL FIELD_TYPE_DECIMAL -#define MYSQL_TYPE_SHORT FIELD_TYPE_SHORT -#define MYSQL_TYPE_LONG FIELD_TYPE_LONG -#define MYSQL_TYPE_FLOAT FIELD_TYPE_FLOAT -#define MYSQL_TYPE_DOUBLE FIELD_TYPE_DOUBLE -#define MYSQL_TYPE_LONGLONG FIELD_TYPE_LONGLONG -#define MYSQL_TYPE_INT24 FIELD_TYPE_INT24 -#define MYSQL_TYPE_YEAR FIELD_TYPE_YEAR -#define MYSQL_TYPE_TINY FIELD_TYPE_TINY -#define MYSQL_TYPE_TINY_BLOB FIELD_TYPE_TINY_BLOB -#define MYSQL_TYPE_MEDIUM_BLOB FIELD_TYPE_MEDIUM_BLOB -#define MYSQL_TYPE_LONG_BLOB FIELD_TYPE_LONG_BLOB -#define MYSQL_TYPE_BLOB FIELD_TYPE_BLOB -#define MYSQL_TYPE_DATE FIELD_TYPE_DATE -#define MYSQL_TYPE_NEWDATE FIELD_TYPE_NEWDATE -#define MYSQL_TYPE_DATETIME FIELD_TYPE_DATETIME -#define MYSQL_TYPE_TIME FIELD_TYPE_TIME -#define MYSQL_TYPE_TIMESTAMP FIELD_TYPE_TIMESTAMP -#define MYSQL_TYPE_ENUM FIELD_TYPE_ENUM -#define MYSQL_TYPE_SET FIELD_TYPE_SET -#define MYSQL_TYPE_NULL FIELD_TYPE_NULL - -#define mysql_commit(_) ((void)_) -#define mysql_rollback(_) ((void)_) -#define mysql_autocommit(_,__) ((void)_) - -#endif - -typedef struct { - short closed; -} env_data; - -typedef struct { - short closed; - int env; /* reference to environment */ - MYSQL *my_conn; -} conn_data; - -typedef struct { - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int colnames, coltypes; /* reference to column information tables */ - MYSQL_RES *my_res; -} cur_data; - -LUASQL_API int luaopen_luasql_mysql (lua_State *L); - - -/* -** Check for valid environment. -*/ -static env_data *getenvironment (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_MYSQL); - luaL_argcheck (L, env != NULL, 1, "environment expected"); - luaL_argcheck (L, !env->closed, 1, "environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_MYSQL); - luaL_argcheck (L, conn != NULL, 1, "connection expected"); - luaL_argcheck (L, !conn->closed, 1, "connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_MYSQL); - luaL_argcheck (L, cur != NULL, 1, "cursor expected"); - luaL_argcheck (L, !cur->closed, 1, "cursor is closed"); - return cur; -} - - -/* -** Push the value of #i field of #tuple row. -*/ -static void pushvalue (lua_State *L, void *row, long int len) { - if (row == NULL) - lua_pushnil (L); - else - lua_pushlstring (L, row, len); -} - - -/* -** Get the internal database type of the given column. -*/ -static char *getcolumntype (enum enum_field_types type) { - - switch (type) { - case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: - return "string"; - case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_LONG: - case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_LONGLONG: - case MYSQL_TYPE_INT24: case MYSQL_TYPE_YEAR: case MYSQL_TYPE_TINY: - return "number"; - case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: - case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_BLOB: - return "binary"; - case MYSQL_TYPE_DATE: case MYSQL_TYPE_NEWDATE: - return "date"; - case MYSQL_TYPE_DATETIME: - return "datetime"; - case MYSQL_TYPE_TIME: - return "time"; - case MYSQL_TYPE_TIMESTAMP: - return "timestamp"; - case MYSQL_TYPE_ENUM: case MYSQL_TYPE_SET: - return "set"; - case MYSQL_TYPE_NULL: - return "null"; - default: - return "undefined"; - } -} - - -/* -** Creates the lists of fields names and fields types. -*/ -static void create_colinfo (lua_State *L, cur_data *cur) { - MYSQL_FIELD *fields; - char typename[50]; - int i; - fields = mysql_fetch_fields(cur->my_res); - lua_newtable (L); /* names */ - lua_newtable (L); /* types */ - for (i = 1; i <= cur->numcols; i++) { - lua_pushstring (L, fields[i-1].name); - lua_rawseti (L, -3, i); - sprintf (typename, "%.20s(%ld)", getcolumntype (fields[i-1].type), fields[i-1].length); - lua_pushstring(L, typename); - lua_rawseti (L, -2, i); - } - /* Stores the references in the cursor structure */ - cur->coltypes = luaL_ref (L, LUA_REGISTRYINDEX); - cur->colnames = luaL_ref (L, LUA_REGISTRYINDEX); -} - - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = getcursor (L); - MYSQL_RES *res = cur->my_res; - unsigned long *lengths; - MYSQL_ROW row = mysql_fetch_row(res); - if (row == NULL) { - lua_pushnil(L); /* no more results */ - return 1; - } - lengths = mysql_fetch_lengths(res); - - if (lua_istable (L, 2)) { - const char *opts = luaL_optstring (L, 3, "n"); - if (strchr (opts, 'n') != NULL) { - /* Copy values to numerical indices */ - int i; - for (i = 0; i < cur->numcols; i++) { - pushvalue (L, row[i], lengths[i]); - lua_rawseti (L, 2, i+1); - } - } - if (strchr (opts, 'a') != NULL) { - int i; - /* Check if colnames exists */ - if (cur->colnames == LUA_NOREF) - create_colinfo(L, cur); - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->colnames);/* Push colnames*/ - - /* Copy values to alphanumerical indices */ - for (i = 0; i < cur->numcols; i++) { - lua_rawgeti(L, -1, i+1); /* push the field name */ - - /* Actually push the value */ - pushvalue (L, row[i], lengths[i]); - lua_rawset (L, 2); - } - /* lua_pop(L, 1); Pops colnames table. Not needed */ - } - lua_pushvalue(L, 2); - return 1; /* return table */ - } - else { - int i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 0; i < cur->numcols; i++) - pushvalue (L, row[i], lengths[i]); - return cur->numcols; /* return #numcols values */ - } -} - - -/* -** Close the cursor on top of the stack. -** Return 1 -*/ -static int cur_close (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_MYSQL); - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean (L, 0); - return 1; - } - - /* Nullify structure fields. */ - cur->closed = 1; - mysql_free_result(cur->my_res); - luaL_unref (L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref (L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref (L, LUA_REGISTRYINDEX, cur->coltypes); - - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Pushes a column information table on top of the stack. -** If the table isn't built yet, call the creator function and stores -** a reference to it on the cursor structure. -*/ -static void _pushtable (lua_State *L, cur_data *cur, size_t off) { - int *ref = (int *)((char *)cur + off); - - /* If colnames or coltypes do not exist, create both. */ - if (*ref == LUA_NOREF) - create_colinfo(L, cur); - - /* Pushes the right table (colnames or coltypes) */ - lua_rawgeti (L, LUA_REGISTRYINDEX, *ref); -} -#define pushtable(L,c,m) (_pushtable(L,c,offsetof(cur_data,m))) - - -/* -** Return the list of field names. -*/ -static int cur_getcolnames (lua_State *L) { - pushtable (L, getcursor(L), colnames); - return 1; -} - - -/* -** Return the list of field types. -*/ -static int cur_getcoltypes (lua_State *L) { - pushtable (L, getcursor(L), coltypes); - return 1; -} - - -/* -** Push the number of rows. -*/ -static int cur_numrows (lua_State *L) { - lua_pushnumber (L, (lua_Number)mysql_num_rows (getcursor(L)->my_res)); - return 1; -} - - -/* -** Create a new Cursor object and push it on top of the stack. -*/ -static int create_cursor (lua_State *L, int conn, MYSQL_RES *result, int cols) { - cur_data *cur = (cur_data *)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_MYSQL); - - /* fill in structure */ - cur->closed = 0; - cur->conn = LUA_NOREF; - cur->numcols = cols; - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->my_res = result; - lua_pushvalue (L, conn); - cur->conn = luaL_ref (L, LUA_REGISTRYINDEX); - - return 1; -} - - -/* -** Close a Connection object. -*/ -static int conn_close (lua_State *L) { - conn_data *conn=(conn_data *)luaL_checkudata(L, 1, LUASQL_CONNECTION_MYSQL); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) { - lua_pushboolean (L, 0); - return 1; - } - - /* Nullify structure fields. */ - conn->closed = 1; - luaL_unref (L, LUA_REGISTRYINDEX, conn->env); - mysql_close (conn->my_conn); - lua_pushboolean (L, 1); - return 1; -} - - -static int escape_string (lua_State *L) { - size_t size, new_size; - conn_data *conn = getconnection (L); - const char *from = luaL_checklstring(L, 2, &size); - char *to; - to = (char*)malloc(sizeof(char) * (2 * size + 1)); - if(to) { - new_size = mysql_real_escape_string(conn->my_conn, to, from, size); - lua_pushlstring(L, to, new_size); - free(to); - return 1; - } - luaL_error(L, "could not allocate escaped string"); - return 0; -} - -/* -** Execute an SQL statement. -** Return a Cursor object if the statement is a query, otherwise -** return the number of tuples affected by the statement. -*/ -static int conn_execute (lua_State *L) { - conn_data *conn = getconnection (L); - size_t st_len; - const char *statement = luaL_checklstring (L, 2, &st_len); - if (mysql_real_query(conn->my_conn, statement, st_len)) - /* error executing query */ - return luasql_failmsg(L, "error executing query. MySQL: ", mysql_error(conn->my_conn)); - else - { - MYSQL_RES *res = mysql_store_result(conn->my_conn); - unsigned int num_cols = mysql_field_count(conn->my_conn); - - if (res) { /* tuples returned */ - return create_cursor (L, 1, res, num_cols); - } - else { /* mysql_use_result() returned nothing; should it have? */ - if(num_cols == 0) { /* no tuples returned */ - /* query does not return data (it was not a SELECT) */ - lua_pushnumber(L, mysql_affected_rows(conn->my_conn)); - return 1; - } - else /* mysql_use_result() should have returned data */ - return luasql_failmsg(L, "error retrieving result. MySQL: ", mysql_error(conn->my_conn)); - } - } -} - - -/* -** Commit the current transaction. -*/ -static int conn_commit (lua_State *L) { - conn_data *conn = getconnection (L); - lua_pushboolean(L, !mysql_commit(conn->my_conn)); - return 1; -} - - -/* -** Rollback the current transaction. -*/ -static int conn_rollback (lua_State *L) { - conn_data *conn = getconnection (L); - lua_pushboolean(L, !mysql_rollback(conn->my_conn)); - return 1; -} - - -/* -** Set "auto commit" property of the connection. Modes ON/OFF -*/ -static int conn_setautocommit (lua_State *L) { - conn_data *conn = getconnection (L); - if (lua_toboolean (L, 2)) { - mysql_autocommit(conn->my_conn, 1); /* Set it ON */ - } - else { - mysql_autocommit(conn->my_conn, 0); - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Get Last auto-increment id generated -*/ -static int conn_getlastautoid (lua_State *L) { - conn_data *conn = getconnection(L); - lua_pushnumber(L, mysql_insert_id(conn->my_conn)); - return 1; -} - -/* -** Create a new Connection object and push it on top of the stack. -*/ -static int create_connection (lua_State *L, int env, MYSQL *const my_conn) { - conn_data *conn = (conn_data *)lua_newuserdata(L, sizeof(conn_data)); - luasql_setmeta (L, LUASQL_CONNECTION_MYSQL); - - /* fill in structure */ - conn->closed = 0; - conn->env = LUA_NOREF; - conn->my_conn = my_conn; - lua_pushvalue (L, env); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - return 1; -} - - -/* -** Connects to a data source. -** param: one string for each connection parameter, said -** datasource, username, password, host and port. -*/ -static int env_connect (lua_State *L) { - const char *sourcename = luaL_checkstring(L, 2); - const char *username = luaL_optstring(L, 3, NULL); - const char *password = luaL_optstring(L, 4, NULL); - const char *host = luaL_optstring(L, 5, NULL); - const int port = luaL_optint(L, 6, 0); - MYSQL *conn; - getenvironment(L); /* validade environment */ - - /* Try to init the connection object. */ - conn = mysql_init(NULL); - if (conn == NULL) - return luasql_faildirect(L, "error connecting: Out of memory."); - - if (!mysql_real_connect(conn, host, username, password, - sourcename, port, NULL, 0)) - { - char error_msg[100]; - strncpy (error_msg, mysql_error(conn), 99); - mysql_close (conn); /* Close conn if connect failed */ - return luasql_failmsg (L, "error connecting to database. MySQL: ", error_msg); - } - return create_connection(L, 1, conn); -} - - -/* -** Close environment object. -*/ -static int env_close (lua_State *L) { - env_data *env= (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_MYSQL); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean (L, 0); - return 1; - } - - env->closed = 1; - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) { - struct luaL_reg environment_methods[] = { - {"__gc", env_close}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_close}, - {"close", conn_close}, - {"escape", escape_string}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {"getlastautoid", conn_getlastautoid}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_close}, - {"close", cur_close}, - {"getcolnames", cur_getcolnames}, - {"getcoltypes", cur_getcoltypes}, - {"fetch", cur_fetch}, - {"numrows", cur_numrows}, - {NULL, NULL}, - }; - luasql_createmeta (L, LUASQL_ENVIRONMENT_MYSQL, environment_methods); - luasql_createmeta (L, LUASQL_CONNECTION_MYSQL, connection_methods); - luasql_createmeta (L, LUASQL_CURSOR_MYSQL, cursor_methods); - lua_pop (L, 3); -} - - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) { - env_data *env = (env_data *)lua_newuserdata(L, sizeof(env_data)); - luasql_setmeta (L, LUASQL_ENVIRONMENT_MYSQL); - - /* fill in structure */ - env->closed = 0; - return 1; -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_mysql (lua_State *L) { - struct luaL_reg driver[] = { - {"mysql", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - lua_pushliteral (L, "_MYSQLVERSION"); - lua_pushliteral (L, MYSQL_SERVER_VERSION); - lua_settable (L, -3); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_oci8.c b/3rdparty/luasql-2.2.0/src/ls_oci8.c deleted file mode 100644 index 64e42dac5f..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_oci8.c +++ /dev/null @@ -1,861 +0,0 @@ -/* -** LuaSQL, Oracle driver -** Authors: Tomas Guisasola, Leonardo Godinho -** See Copyright Notice in license.html -** $Id: ls_oci8.c,v 1.31 2009/02/07 23:16:23 tomas Exp $ -*/ - -#include -#include -#include -#include -#include - -#include "oci.h" -#include "oratypes.h" -#include "ociapr.h" -#include "ocidem.h" - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_OCI8 "Oracle environment" -#define LUASQL_CONNECTION_OCI8 "Oracle connection" -#define LUASQL_CURSOR_OCI8 "Oracle cursor" - - -typedef struct { - short closed; - int conn_counter; - OCIEnv *envhp; - OCIError *errhp; /* !!! */ -} env_data; - - -typedef struct { - short closed; - short loggedon; - short auto_commit; /* 0 for manual commit */ - int cur_counter; - int env; /* reference to environment */ - OCISvcCtx *svchp; /* service handle */ - OCIError *errhp; /* !!! */ -} conn_data; - - -typedef union { - int i; - char *s; - double d; -} column_value; - - -typedef struct { - ub2 type; /* database type */ - text *name; /* column name */ - ub4 namelen; /* column name length */ - ub2 max; /* maximum size */ - sb2 null; /* is null? */ - OCIDefine *define; /* define handle */ - column_value val; -} column_data; - - -typedef struct { - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int colnames, coltypes; /* reference to column info tables */ - int curr_tuple; /* next tuple to be read */ - char *text; /* text of SQL statement */ - OCIStmt *stmthp; /* statement handle */ - OCIError *errhp; /* !!! */ - column_data *cols; /* array of columns */ -} cur_data; - - -int checkerr (lua_State *L, sword status, OCIError *errhp); -#define ASSERT(L,exp,err) {sword s = exp; if (s) return checkerr (L, s, err);} -LUASQL_API int luaopen_luasql_oci8 (lua_State *L); - - -/* -** Check for valid environment. -*/ -static env_data *getenvironment (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_OCI8); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - luaL_argcheck (L, !env->closed, 1, LUASQL_PREFIX"environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_OCI8); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - luaL_argcheck (L, !conn->closed, 1, LUASQL_PREFIX"connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_OCI8); - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - luaL_argcheck (L, !cur->closed, 1, LUASQL_PREFIX"cursor is closed"); - return cur; -} - - -/* -** Push nil plus an error message. -*/ -int checkerr (lua_State *L, sword status, OCIError *errhp) { - lua_pushnil (L); - switch (status) { - case OCI_SUCCESS: - lua_pushnil (L); /* !!!!!!!!!!!!! */ - break; - case OCI_SUCCESS_WITH_INFO: - lua_pushstring (L, LUASQL_PREFIX"Success with info!"); - break; - case OCI_NEED_DATA: - lua_pushstring (L, LUASQL_PREFIX"OCI_NEED_DATA"); - break; - case OCI_NO_DATA: - lua_pushstring (L, LUASQL_PREFIX"OCI_NODATA"); - break; - case OCI_ERROR: { - text errbuf[512]; - sb4 errcode = 0; - OCIErrorGet (errhp, (ub4) 1, (text *) NULL, &errcode, - errbuf, (ub4) sizeof (errbuf), OCI_HTYPE_ERROR); - lua_pushstring (L, LUASQL_PREFIX); - lua_pushstring (L, errbuf); - lua_concat (L, 2); - break; - } - case OCI_INVALID_HANDLE: - lua_pushstring (L, LUASQL_PREFIX"OCI_INVALID_HANDLE"); - break; - case OCI_STILL_EXECUTING: - lua_pushstring (L, LUASQL_PREFIX"OCI_STILL_EXECUTE"); - break; - case OCI_CONTINUE: - lua_pushstring (L, LUASQL_PREFIX"OCI_CONTINUE"); - break; - } - return 2; -} - - -/* -** Copy the column name to the column structure and convert it to lower case. -*/ -static void copy_column_name (column_data *col, text *name) { - unsigned int i; - col->name = (text *)malloc (col->namelen); - memcpy (col->name, name, col->namelen); - for (i = 0; i < col->namelen; i++) - col->name[i] = tolower (col->name[i]); -} - - -/* -** Alloc buffers for column values. -*/ -static int alloc_column_buffer (lua_State *L, cur_data *cur, int i) { - /* column index ranges from 1 to numcols */ - /* C array index ranges from 0 to numcols-1 */ - column_data *col = &(cur->cols[i-1]); - OCIParam *param; - text *name; - - ASSERT (L, OCIParamGet (cur->stmthp, OCI_HTYPE_STMT, cur->errhp, - (dvoid **)¶m, i), cur->errhp); - ASSERT (L, OCIAttrGet (param, OCI_DTYPE_PARAM, - (dvoid *)&(name), (ub4 *)&(col->namelen), - OCI_ATTR_NAME, cur->errhp), cur->errhp); - copy_column_name (col, name); - ASSERT (L, OCIAttrGet (param, OCI_DTYPE_PARAM, - (dvoid *)&(col->type), (ub4 *)0, OCI_ATTR_DATA_TYPE, - cur->errhp), cur->errhp); - - switch (col->type) { - case SQLT_CHR: - case SQLT_STR: - case SQLT_VCS: - case SQLT_AFC: - case SQLT_AVC: - ASSERT (L, OCIAttrGet (param, OCI_DTYPE_PARAM, - (dvoid *)&(col->max), 0, OCI_ATTR_DATA_SIZE, - cur->errhp), cur->errhp); - col->val.s = calloc (col->max + 1, sizeof(col->val.s)); - ASSERT (L, OCIDefineByPos (cur->stmthp, &(col->define), - cur->errhp, (ub4)i, col->val.s, col->max+1, - SQLT_STR /*col->type*/, (dvoid *)&(col->null), (ub2 *)0, - (ub2 *)0, (ub4) OCI_DEFAULT), cur->errhp); - break; - case SQLT_NUM: - case SQLT_FLT: - case SQLT_INT: - /* case SQLT_UIN: */ - ASSERT (L, OCIDefineByPos (cur->stmthp, &(col->define), - cur->errhp, (ub4)i, &(col->val.d), sizeof(col->val.d), - SQLT_FLT, (dvoid *)&(col->null), (ub2 *)0, - (ub2 *)0, (ub4) OCI_DEFAULT), cur->errhp); - break; - case SQLT_CLOB: { - env_data *env; - conn_data *conn; - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = (conn_data *)lua_touserdata (L, -1); - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - env = (env_data *)lua_touserdata (L, -1); - lua_pop (L, 2); - ASSERT (L, OCIDescriptorAlloc (env->envhp, (dvoid *)&(col->val.s), - OCI_DTYPE_LOB, (size_t)0, (dvoid **)0), cur->errhp); - ASSERT (L, OCIDefineByPos (cur->stmthp, &(col->define), - cur->errhp, (ub4)i, &(col->val.s), (sb4)sizeof(dvoid *), - SQLT_CLOB, (dvoid *)&(col->null), (ub2 *)0, (ub2 *)0, - OCI_DEFAULT), cur->errhp); - break; - } - default: - luaL_error (L, LUASQL_PREFIX"invalid type %d #%d", col->type, i); - break; - } - return 0; -} - - -/* -** Deallocate column buffers. -*/ -static int free_column_buffers (lua_State *L, cur_data *cur, int i) { - /* column index ranges from 1 to numcols */ - /* C array index ranges from 0 to numcols-1 */ - column_data *col = &(cur->cols[i-1]); - free (col->name); - switch (col->type) { - case SQLT_INT: - case SQLT_FLT: - case SQLT_NUM: - break; - case SQLT_CHR: - case SQLT_STR: - case SQLT_VCS: - case SQLT_AFC: - case SQLT_AVC: - free(col->val.s); - break; - case SQLT_CLOB: - ASSERT (L, OCIDescriptorFree (col->val.s, - OCI_DTYPE_LOB), cur->errhp); - break; - default: - luaL_error (L, LUASQL_PREFIX"unknown type"); - /*printf("free_buffers(): Unknow Type: %d count: %d\n",cols.item[count].type, count );*/ - break; - } - return 0; -} - - -/* -** Push a value on top of the stack. -*/ -static int pushvalue (lua_State *L, cur_data *cur, int i) { - /* column index ranges from 1 to numcols */ - /* C array index ranges from 0 to numcols-1 */ - column_data *col = &(cur->cols[i-1]); - if (col->null) { - /* Oracle NULL => Lua nil */ - lua_pushnil (L); - return 1; - } - switch (col->type) { - case SQLT_NUM: - case SQLT_INT: - case SQLT_FLT: - lua_pushnumber (L, col->val.d); - break; - case SQLT_CHR: - case SQLT_STR: - case SQLT_VCS: - case SQLT_AFC: - case SQLT_AVC: - lua_pushstring (L, (char *)(col->val.s)); - break; - case SQLT_CLOB: { - ub4 lob_len; - conn_data *conn; - env_data *env; - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = lua_touserdata (L, -1); - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - env = lua_touserdata (L, -1); - lua_pop (L, 2); - ASSERT (L, OCILobGetLength (conn->svchp, cur->errhp, - (OCILobLocator *)col->val.s, &lob_len), cur->errhp); - if (lob_len > 0) { - char *lob_buffer=malloc(lob_len); - ub4 amount = lob_len; - - ASSERT(L, OCILobRead(conn->svchp, cur->errhp, - (OCILobLocator *) col->val.s, &amount, (ub4) 1, - (dvoid *) lob_buffer, (ub4) lob_len, (dvoid *)0, - (sb4 (*) (dvoid *, CONST dvoid *, ub4, ub1)) 0, - (ub2) 0, (ub1) SQLCS_IMPLICIT), cur->errhp); - lua_pushlstring (L, lob_buffer, amount); - free(lob_buffer); - } else { - lua_pushstring (L, ""); - } - break; - } - default: - luaL_error (L, LUASQL_PREFIX"unexpected error"); - } - return 1; -} - - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = getcursor (L); - sword status = OCIStmtFetch (cur->stmthp, cur->errhp, 1, - OCI_FETCH_NEXT, OCI_DEFAULT); - - if (status == OCI_NO_DATA) { - /* No more rows */ - lua_pushnil (L); - return 1; - } else if (status != OCI_SUCCESS) { - /* Error */ - return checkerr (L, status, cur->errhp); - } - - if (lua_istable (L, 2)) { - int i; - const char *opts = luaL_optstring (L, 3, "n"); - if (strchr (opts, 'n') != NULL) - /* Copy values to numerical indices */ - for (i = 1; i <= cur->numcols; i++) { - int ret = pushvalue (L, cur, i); - if (ret != 1) - return ret; - lua_rawseti (L, 2, i); - } - if (strchr (opts, 'a') != NULL) - /* Copy values to alphanumerical indices */ - for (i = 1; i <= cur->numcols; i++) { - column_data *col = &(cur->cols[i-1]); - int ret; - lua_pushlstring (L, col->name, col->namelen); - if ((ret = pushvalue (L, cur, i)) != 1) - return ret; - lua_rawset (L, 2); - } - lua_pushvalue(L, 2); - return 1; /* return table */ - } - else { - int i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 1; i <= cur->numcols; i++) { - int ret = pushvalue (L, cur, i); - if (ret != 1) - return ret; - } - return cur->numcols; /* return #numcols values */ - } -} - - -/* -** Close the cursor on top of the stack. -** Return 1 -*/ -static int cur_close (lua_State *L) { - int i; - conn_data *conn; - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_OCI8); - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean (L, 0); - return 1; - } - - /* Deallocate buffers. */ - for (i = 1; i <= cur->numcols; i++) { - int ret = free_column_buffers (L, cur, i); - if (ret) - return ret; - } - free (cur->cols); - free (cur->text); - - /* Nullify structure fields. */ - cur->closed = 1; - if (cur->stmthp) - OCIHandleFree ((dvoid *)cur->stmthp, OCI_HTYPE_STMT); - if (cur->errhp) - OCIHandleFree ((dvoid *)cur->errhp, OCI_HTYPE_ERROR); - /* Decrement cursor counter on connection object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = lua_touserdata (L, -1); - conn->cur_counter--; - luaL_unref (L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref (L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref (L, LUA_REGISTRYINDEX, cur->coltypes); - - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Return the list of field names as a table on top of the stack. -*/ -static int cur_getcolnames (lua_State *L) { - cur_data *cur = getcursor (L); - if (cur->colnames != LUA_NOREF) - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->colnames); - else { - int i; - lua_newtable (L); - for (i = 1; i <= cur->numcols; i++) { - column_data *col = &(cur->cols[i-1]); - lua_pushlstring (L, col->name, col->namelen); - lua_rawseti (L, -2, i); - } - lua_pushvalue (L, -1); - cur->colnames = luaL_ref (L, LUA_REGISTRYINDEX); - } - return 1; -} - - -/* -** -*/ -static char *getcolumntype (column_data *col) { - switch (col->type) { - case SQLT_CHR: - case SQLT_STR: - case SQLT_VCS: - case SQLT_AFC: - case SQLT_AVC: - return "string"; - case SQLT_NUM: - case SQLT_FLT: - case SQLT_INT: - /* case SQLT_UIN: */ - return "number"; - case SQLT_CLOB: - return "string"; - default: - return ""; - } -} - - -/* -** Return the list of field types as a table on top of the stack. -*/ -static int cur_getcoltypes (lua_State *L) { - cur_data *cur = getcursor (L); - if (cur->coltypes != LUA_NOREF) - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->coltypes); - else { - int i; - lua_newtable (L); - for (i = 1; i <= cur->numcols; i++) { - column_data *col = &(cur->cols[i-1]); - lua_pushnumber (L, i); - lua_pushstring (L, getcolumntype (col)); - lua_rawset (L, -3); - } - lua_pushvalue (L, -1); - cur->coltypes = luaL_ref (L, LUA_REGISTRYINDEX); - } - return 1; -} - - -/* -** Push the number of rows. -*/ -static int cur_numrows (lua_State *L) { - int n; - cur_data *cur = getcursor (L); - ASSERT (L, OCIAttrGet ((dvoid *) cur->stmthp, OCI_HTYPE_STMT, (dvoid *)&n, - (ub4)0, OCI_ATTR_NUM_ROWS, cur->errhp), cur->errhp); - lua_pushnumber (L, n); - return 1; -} - - -/* -** Close a Connection object. -*/ -static int conn_close (lua_State *L) { - env_data *env; - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_OCI8); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) { - lua_pushboolean (L, 0); - return 1; - } - if (conn->cur_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open cursors"); - - /* Nullify structure fields. */ - conn->closed = 1; - if (conn->svchp) { - if (conn->loggedon) - OCILogoff (conn->svchp, conn->errhp); - else - OCIHandleFree ((dvoid *)conn->svchp, OCI_HTYPE_SVCCTX); - } - if (conn->errhp) - OCIHandleFree ((dvoid *)conn->errhp, OCI_HTYPE_ERROR); - /* Decrement connection counter on environment object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - env = lua_touserdata (L, -1); - env->conn_counter--; - luaL_unref (L, LUA_REGISTRYINDEX, conn->env); - - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Create a new Cursor object and push it on top of the stack. -*/ -static int create_cursor (lua_State *L, int o, conn_data *conn, OCIStmt *stmt, const char *text) { - int i; - env_data *env; - cur_data *cur = (cur_data *)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_OCI8); - - conn->cur_counter++; - /* fill in structure */ - cur->closed = 0; - cur->numcols = 0; - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->curr_tuple = 0; - cur->stmthp = stmt; - cur->errhp = NULL; - cur->cols = NULL; - cur->text = strdup (text); - lua_pushvalue (L, o); - cur->conn = luaL_ref (L, LUA_REGISTRYINDEX); - - /* error handler */ - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - env = lua_touserdata (L, -1); - lua_pop (L, 1); - ASSERT (L, OCIHandleAlloc((dvoid *) env->envhp, - (dvoid **) &(cur->errhp), (ub4) OCI_HTYPE_ERROR, (size_t) 0, - (dvoid **) 0), conn->errhp); - /* get number of columns */ - ASSERT (L, OCIAttrGet ((dvoid *)stmt, (ub4)OCI_HTYPE_STMT, - (dvoid *)&cur->numcols, (ub4 *)0, (ub4)OCI_ATTR_PARAM_COUNT, - cur->errhp), cur->errhp); - cur->cols = (column_data *)malloc (sizeof(column_data) * cur->numcols); - /* define output variables */ - /* Oracle and Lua column indices ranges from 1 to numcols */ - /* C array indices ranges from 0 to numcols-1 */ - for (i = 1; i <= cur->numcols; i++) { - int ret = alloc_column_buffer (L, cur, i); - if (ret) - return ret; - } - - return 1; -} - - -/* -** Execute an SQL statement. -** Return a Cursor object if the statement is a query, otherwise -** return the number of tuples affected by the statement. -*/ -static int conn_execute (lua_State *L) { - env_data *env; - conn_data *conn = getconnection (L); - const char *statement = luaL_checkstring (L, 2); - sword status; - ub4 prefetch = 0; - ub4 iters; - ub4 mode; - ub2 type; - OCIStmt *stmthp; - - /* get environment */ - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - if (!lua_isuserdata (L, -1)) - luaL_error(L,LUASQL_PREFIX"invalid environment in connection!"); - env = (env_data *)lua_touserdata (L, -1); - /* statement handle */ - ASSERT (L, OCIHandleAlloc ((dvoid *)env->envhp, (dvoid **)&stmthp, - OCI_HTYPE_STMT, (size_t)0, (dvoid **)0), conn->errhp); - ASSERT (L, OCIAttrSet ((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT, - (dvoid *)&prefetch, (ub4)0, (ub4)OCI_ATTR_PREFETCH_ROWS, - conn->errhp), conn->errhp); - ASSERT (L, OCIStmtPrepare (stmthp, conn->errhp, (text *)statement, - (ub4) strlen(statement), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT), - conn->errhp); - /* statement type */ - ASSERT (L, OCIAttrGet ((dvoid *)stmthp, (ub4) OCI_HTYPE_STMT, - (dvoid *)&type, (ub4 *)0, (ub4)OCI_ATTR_STMT_TYPE, conn->errhp), - conn->errhp); - if (type == OCI_STMT_SELECT) - iters = 0; - else - iters = 1; - if (conn->auto_commit) - mode = OCI_COMMIT_ON_SUCCESS; - else - mode = OCI_DEFAULT; - /* execute statement */ - status = OCIStmtExecute (conn->svchp, stmthp, conn->errhp, iters, - (ub4)0, (CONST OCISnapshot *)NULL, (OCISnapshot *)NULL, mode); - if (status && (status != OCI_NO_DATA)) { - OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT); - return checkerr (L, status, conn->errhp); - } - if (type == OCI_STMT_SELECT) { - /* create cursor */ - return create_cursor (L, 1, conn, stmthp, statement); - } else { - /* return number of rows */ - int rows_affected; - ASSERT (L, OCIAttrGet ((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT, - (dvoid *)&rows_affected, (ub4 *)0, - (ub4)OCI_ATTR_ROW_COUNT, conn->errhp), conn->errhp); - OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT); - lua_pushnumber (L, rows_affected); - return 1; - } -} - - -/* -** Commit the current transaction. -*/ -static int conn_commit (lua_State *L) { - conn_data *conn = getconnection (L); - ASSERT (L, OCITransCommit (conn->svchp, conn->errhp, OCI_DEFAULT), - conn->errhp); -/* - if (conn->auto_commit == 0) - ASSERT (L, OCITransStart (conn->svchp, conn->errhp... -*/ - return 0; -} - - -/* -** Rollback the current transaction. -*/ -static int conn_rollback (lua_State *L) { - conn_data *conn = getconnection (L); - ASSERT (L, OCITransRollback (conn->svchp, conn->errhp, OCI_DEFAULT), - conn->errhp); -/* - if (conn->auto_commit == 0) - sql_begin(conn); -*/ - return 0; -} - - -/* -** Set "auto commit" property of the connection. -** If 'true', then rollback current transaction. -** If 'false', then start a new transaction. -*/ -static int conn_setautocommit (lua_State *L) { - conn_data *conn = getconnection (L); - if (lua_toboolean (L, 2)) { - conn->auto_commit = 1; - /* Undo active transaction. */ - ASSERT (L, OCITransRollback (conn->svchp, conn->errhp, - OCI_DEFAULT), conn->errhp); - } - else { - conn->auto_commit = 0; - /* sql_begin(conn);*/ - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Connects to a data source. -*/ -static int env_connect (lua_State *L) { - env_data *env = getenvironment (L); - const char *sourcename = luaL_checkstring(L, 2); - const char *username = luaL_optstring(L, 3, NULL); - const char *password = luaL_optstring(L, 4, NULL); - /* Sizes of strings */ - size_t snlen = strlen(sourcename); - size_t userlen = (username) ? strlen(username) : 0; - size_t passlen = (password) ? strlen(password) : 0; - /* Alloc connection object */ - conn_data *conn = (conn_data *)lua_newuserdata(L, sizeof(conn_data)); - - /* fill in structure */ - luasql_setmeta (L, LUASQL_CONNECTION_OCI8); - conn->env = LUA_NOREF; - conn->closed = 1; - conn->auto_commit = 1; - conn->cur_counter = 0; - conn->loggedon = 0; - conn->svchp = NULL; - conn->errhp = NULL; - lua_pushvalue (L, 1); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - - /* error handler */ - ASSERT (L, OCIHandleAlloc((dvoid *) env->envhp, - (dvoid **) &(conn->errhp), /* !!! */ - (ub4) OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0), env->errhp); - /* service handler */ - /*ASSERT (L, OCIHandleAlloc((dvoid *) env->envhp, - (dvoid **) &(conn->svchp), - (ub4) OCI_HTYPE_SVCCTX, (size_t) 0, (dvoid **) 0), conn->errhp); -*/ - /* login */ - ASSERT (L, OCILogon(env->envhp, conn->errhp, &(conn->svchp), - (CONST text*)username, userlen, - (CONST text*)password, passlen, - (CONST text*)sourcename, snlen), conn->errhp); - conn->closed = 0; - env->conn_counter++; - conn->loggedon = 1; - - return 1; -} - - -/* -** Close environment object. -*/ -static int env_close (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_OCI8); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean (L, 0); - return 1; - } - if (env->conn_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open connections"); - - env->closed = 1; - /* desalocar: env->errhp e env->envhp */ - if (env->envhp) - OCIHandleFree ((dvoid *)env->envhp, OCI_HTYPE_ENV); - if (env->errhp) - OCIHandleFree ((dvoid *)env->errhp, OCI_HTYPE_ERROR); - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) { - env_data *env = (env_data *)lua_newuserdata(L, sizeof(env_data)); - luasql_setmeta (L, LUASQL_ENVIRONMENT_OCI8); - /* fill in structure */ - env->closed = 0; - env->conn_counter = 0; - env->envhp = NULL; - env->errhp = NULL; -/* maybe OCI_SHARED and OCI_THREADED ??? */ - if (OCIEnvCreate ( &(env->envhp), (ub4)OCI_DEFAULT, (dvoid *)0, - (dvoid * (*)(dvoid *, size_t)) 0, - (dvoid * (*)(dvoid *, dvoid *, size_t)) 0, - (void (*)(dvoid *, dvoid *)) 0, - (size_t) 0, - (dvoid **) 0)) - luasql_faildirect (L, "couldn't create environment"); - /* error handler */ - ASSERT (L, OCIHandleAlloc((dvoid *) env->envhp, - (dvoid **) &(env->errhp), /* !!! */ - (ub4) OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0), env->errhp); - return 1; -} - - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) { - struct luaL_reg environment_methods[] = { - {"__gc", env_close}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_close}, - {"close", conn_close}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_close}, - {"close", cur_close}, - {"getcolnames", cur_getcolnames}, - {"getcoltypes", cur_getcoltypes}, - {"fetch", cur_fetch}, - {"numrows", cur_numrows}, - {NULL, NULL}, - }; - luasql_createmeta (L, LUASQL_ENVIRONMENT_OCI8, environment_methods); - luasql_createmeta (L, LUASQL_CONNECTION_OCI8, connection_methods); - luasql_createmeta (L, LUASQL_CURSOR_OCI8, cursor_methods); - lua_pop (L, 3); -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_oci8 (lua_State *L) { - struct luaL_reg driver[] = { - {"oci8", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_odbc.c b/3rdparty/luasql-2.2.0/src/ls_odbc.c deleted file mode 100644 index e64a45fa7f..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_odbc.c +++ /dev/null @@ -1,712 +0,0 @@ -/* -** LuaSQL, ODBC driver -** Authors: Pedro Rabinovitch, Roberto Ierusalimschy, Diego Nehab, -** Tomas Guisasola -** See Copyright Notice in license.html -** $Id: ls_odbc.c,v 1.39 2009/02/07 23:16:23 tomas Exp $ -*/ - -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#include -#include -#elif defined(INFORMIX) -#include "infxcli.h" -#elif defined(UNIXODBC) -#include "sql.h" -#include "sqltypes.h" -#include "sqlext.h" -#endif - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_ODBC "ODBC environment" -#define LUASQL_CONNECTION_ODBC "ODBC connection" -#define LUASQL_CURSOR_ODBC "ODBC cursor" - - -typedef struct { - short closed; - int conn_counter; - SQLHENV henv; /* environment handle */ -} env_data; - - -typedef struct { - short closed; - int cur_counter; - int env; /* reference to environment */ - SQLHDBC hdbc; /* database connection handle */ -} conn_data; - - -typedef struct { - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int coltypes, colnames; /* reference to column information tables */ - SQLHSTMT hstmt; /* statement handle */ -} cur_data; - - -/* we are lazy */ -#define hENV SQL_HANDLE_ENV -#define hSTMT SQL_HANDLE_STMT -#define hDBC SQL_HANDLE_DBC -#define error(a) ((a) != SQL_SUCCESS && (a) != SQL_SUCCESS_WITH_INFO) - - -LUASQL_API int luaopen_luasql_odbc (lua_State *L); - -/* -** Check for valid environment. -*/ -static env_data *getenvironment (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_ODBC); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - luaL_argcheck (L, !env->closed, 1, LUASQL_PREFIX"environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_ODBC); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - luaL_argcheck (L, !conn->closed, 1, LUASQL_PREFIX"connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor (lua_State *L) { - cur_data *cursor = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_ODBC); - luaL_argcheck (L, cursor != NULL, 1, LUASQL_PREFIX"cursor expected"); - luaL_argcheck (L, !cursor->closed, 1, LUASQL_PREFIX"cursor is closed"); - return cursor; -} - - -/* -** Pushes true and returns 1 -*/ -static int pass(lua_State *L) { - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Fails with error message from ODBC -** Inputs: -** type: type of handle used in operation -** handle: handle used in operation -*/ -static int fail(lua_State *L, const SQLSMALLINT type, const SQLHANDLE handle) { - SQLCHAR State[6]; - SQLINTEGER NativeError; - SQLSMALLINT MsgSize, i; - SQLRETURN ret; - char Msg[SQL_MAX_MESSAGE_LENGTH]; - luaL_Buffer b; - lua_pushnil(L); - - luaL_buffinit(L, &b); - i = 1; - while (1) { - ret = SQLGetDiagRec(type, handle, i, State, &NativeError, Msg, - sizeof(Msg), &MsgSize); - if (ret == SQL_NO_DATA) break; - luaL_addlstring(&b, Msg, MsgSize); - luaL_putchar(&b, '\n'); - i++; - } - luaL_pushresult(&b); - return 2; -} - -/* -** Returns the name of an equivalent lua type for a SQL type. -*/ -static const char *sqltypetolua (const SQLSMALLINT type) { - switch (type) { - case SQL_UNKNOWN_TYPE: case SQL_CHAR: case SQL_VARCHAR: - case SQL_TYPE_DATE: case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP: - case SQL_DATE: case SQL_INTERVAL: case SQL_TIMESTAMP: - case SQL_LONGVARCHAR: - return "string"; - case SQL_BIGINT: case SQL_TINYINT: case SQL_NUMERIC: - case SQL_DECIMAL: case SQL_INTEGER: case SQL_SMALLINT: - case SQL_FLOAT: case SQL_REAL: case SQL_DOUBLE: - return "number"; - case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: - return "binary"; /* !!!!!! nao seria string? */ - case SQL_BIT: - return "boolean"; - default: - assert(0); - return NULL; - } -} - - -/* -** Retrieves data from the i_th column in the current row -** Input -** types: index in stack of column types table -** hstmt: statement handle -** i: column number -** Returns: -** 0 if successfull, non-zero otherwise; -*/ -static int push_column(lua_State *L, int coltypes, const SQLHSTMT hstmt, - SQLUSMALLINT i) { - const char *tname; - char type; - /* get column type from types table */ - lua_rawgeti (L, LUA_REGISTRYINDEX, coltypes); - lua_rawgeti (L, -1, i); /* typename of the column */ - tname = lua_tostring(L, -1); - if (!tname) - return luasql_faildirect(L, "invalid type in table."); - type = tname[1]; - lua_pop(L, 2); /* pops type name and coltypes table */ - - /* deal with data according to type */ - switch (type) { - /* nUmber */ - case 'u': { - double num; - SQLINTEGER got; - SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_DOUBLE, &num, 0, &got); - if (error(rc)) - return fail(L, hSTMT, hstmt); - if (got == SQL_NULL_DATA) - lua_pushnil(L); - else - lua_pushnumber(L, num); - return 0; - } - /* bOol */ - case 'o': { - char b; - SQLINTEGER got; - SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_BIT, &b, 0, &got); - if (error(rc)) - return fail(L, hSTMT, hstmt); - if (got == SQL_NULL_DATA) - lua_pushnil(L); - else - lua_pushboolean(L, b); - return 0; - } - /* sTring */ - case 't': - /* bInary */ - case 'i': { - SQLSMALLINT stype = (type == 't') ? SQL_C_CHAR : SQL_C_BINARY; - SQLINTEGER got; - char *buffer; - luaL_Buffer b; - SQLRETURN rc; - luaL_buffinit(L, &b); - buffer = luaL_prepbuffer(&b); - rc = SQLGetData(hstmt, i, stype, buffer, LUAL_BUFFERSIZE, &got); - if (got == SQL_NULL_DATA) { - lua_pushnil(L); - return 0; - } - /* concat intermediary chunks */ - while (rc == SQL_SUCCESS_WITH_INFO) { - if (got >= LUAL_BUFFERSIZE || got == SQL_NO_TOTAL) { - got = LUAL_BUFFERSIZE; - /* get rid of null termination in string block */ - if (stype == SQL_C_CHAR) got--; - } - luaL_addsize(&b, got); - buffer = luaL_prepbuffer(&b); - rc = SQLGetData(hstmt, i, stype, buffer, - LUAL_BUFFERSIZE, &got); - } - /* concat last chunk */ - if (rc == SQL_SUCCESS) { - if (got >= LUAL_BUFFERSIZE || got == SQL_NO_TOTAL) { - got = LUAL_BUFFERSIZE; - /* get rid of null termination in string block */ - if (stype == SQL_C_CHAR) got--; - } - luaL_addsize(&b, got); - } - if (rc == SQL_ERROR) return fail(L, hSTMT, hstmt); - /* return everything we got */ - luaL_pushresult(&b); - return 0; - } - } - return 0; -} - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = (cur_data *) getcursor (L); - SQLHSTMT hstmt = cur->hstmt; - int ret; - SQLRETURN rc = SQLFetch(cur->hstmt); - if (rc == SQL_NO_DATA) { - lua_pushnil(L); - return 1; - } else if (error(rc)) return fail(L, hSTMT, hstmt); - - if (lua_istable (L, 2)) { - SQLUSMALLINT i; - const char *opts = luaL_optstring (L, 3, "n"); - int num = strchr (opts, 'n') != NULL; - int alpha = strchr (opts, 'a') != NULL; - for (i = 1; i <= cur->numcols; i++) { - ret = push_column (L, cur->coltypes, hstmt, i); - if (ret) - return ret; - if (alpha) { - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->colnames); - lua_rawgeti (L, -1, i); /* gets column name */ - lua_pushvalue (L, -3); /* duplicates column value */ - lua_rawset (L, 2); /* table[name] = value */ - lua_pop (L, 1); /* pops colnames table */ - } - if (num) - lua_rawseti (L, 2, i); - else - lua_pop (L, 1); /* pops value */ - } - lua_pushvalue (L, 2); - return 1; /* return table */ - } - else { - SQLUSMALLINT i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 1; i <= cur->numcols; i++) { - ret = push_column (L, cur->coltypes, hstmt, i); - if (ret) - return ret; - } - return cur->numcols; - } -} - -/* -** Closes a cursor. -*/ -static int cur_close (lua_State *L) { - conn_data *conn; - cur_data *cur = (cur_data *) luaL_checkudata (L, 1, LUASQL_CURSOR_ODBC); - SQLRETURN ret; - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean (L, 0); - return 1; - } - - /* Nullify structure fields. */ - cur->closed = 1; - ret = SQLCloseCursor(cur->hstmt); - if (error(ret)) - return fail(L, hSTMT, cur->hstmt); - ret = SQLFreeHandle(hSTMT, cur->hstmt); - if (error(ret)) - return fail(L, hSTMT, cur->hstmt); - /* Decrement cursor counter on connection object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = lua_touserdata (L, -1); - conn->cur_counter--; - luaL_unref (L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref (L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref (L, LUA_REGISTRYINDEX, cur->coltypes); - return pass(L); -} - - -/* -** Returns the table with column names. -*/ -static int cur_colnames (lua_State *L) { - cur_data *cur = (cur_data *) getcursor (L); - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->colnames); - return 1; -} - - -/* -** Returns the table with column types. -*/ -static int cur_coltypes (lua_State *L) { - cur_data *cur = (cur_data *) getcursor (L); - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->coltypes); - return 1; -} - - -/* -** Creates two tables with the names and the types of the columns. -*/ -static void create_colinfo (lua_State *L, cur_data *cur) { - SQLCHAR buffer[256]; - SQLSMALLINT namelen, datatype, i; - SQLRETURN ret; - int types, names; - - lua_newtable(L); - types = lua_gettop (L); - lua_newtable(L); - names = lua_gettop (L); - for (i = 1; i <= cur->numcols; i++) { - ret = SQLDescribeCol(cur->hstmt, i, buffer, sizeof(buffer), - &namelen, &datatype, NULL, NULL, NULL); - /*if (ret == SQL_ERROR) return fail(L, hSTMT, cur->hstmt);*/ - lua_pushstring (L, buffer); - lua_rawseti (L, names, i); - lua_pushstring(L, sqltypetolua(datatype)); - lua_rawseti (L, types, i); - } - cur->colnames = luaL_ref (L, LUA_REGISTRYINDEX); - cur->coltypes = luaL_ref (L, LUA_REGISTRYINDEX); -} - - -/* -** Creates a cursor table and leave it on the top of the stack. -*/ -static int create_cursor (lua_State *L, int o, conn_data *conn, - const SQLHSTMT hstmt, const SQLSMALLINT numcols) { - cur_data *cur = (cur_data *) lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_ODBC); - - conn->cur_counter++; - /* fill in structure */ - cur->closed = 0; - cur->conn = LUA_NOREF; - cur->numcols = numcols; - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->hstmt = hstmt; - lua_pushvalue (L, o); - cur->conn = luaL_ref (L, LUA_REGISTRYINDEX); - - /* make and store column information table */ - create_colinfo (L, cur); - - return 1; -} - - -/* -** Closes a connection. -*/ -static int conn_close (lua_State *L) { - SQLRETURN ret; - env_data *env; - conn_data *conn = (conn_data *)luaL_checkudata(L,1,LUASQL_CONNECTION_ODBC); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) { - lua_pushboolean (L, 0); - return 1; - } - if (conn->cur_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open cursors"); - - /* Decrement connection counter on environment object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env); - env = lua_touserdata (L, -1); - env->conn_counter--; - /* Nullify structure fields. */ - conn->closed = 1; - luaL_unref (L, LUA_REGISTRYINDEX, conn->env); - ret = SQLDisconnect(conn->hdbc); - if (error(ret)) - return fail(L, hDBC, conn->hdbc); - ret = SQLFreeHandle(hDBC, conn->hdbc); - if (error(ret)) - return fail(L, hDBC, conn->hdbc); - return pass(L); -} - - -/* -** Executes a SQL statement. -** Returns -** cursor object: if there are results or -** row count: number of rows affected by statement if no results -*/ -static int conn_execute (lua_State *L) { - conn_data *conn = (conn_data *) getconnection (L); - const char *statement = luaL_checkstring(L, 2); - SQLHDBC hdbc = conn->hdbc; - SQLHSTMT hstmt; - SQLSMALLINT numcols; - SQLRETURN ret; - ret = SQLAllocHandle(hSTMT, hdbc, &hstmt); - if (error(ret)) - return fail(L, hDBC, hdbc); - - ret = SQLPrepare(hstmt, (char *) statement, SQL_NTS); - if (error(ret)) { - ret = fail(L, hSTMT, hstmt); - SQLFreeHandle(hSTMT, hstmt); - return ret; - } - - /* execute the statement */ - ret = SQLExecute (hstmt); - if (error(ret)) { - ret = fail(L, hSTMT, hstmt); - SQLFreeHandle(hSTMT, hstmt); - return ret; - } - - /* determine the number of results */ - ret = SQLNumResultCols (hstmt, &numcols); - if (error(ret)) { - ret = fail(L, hSTMT, hstmt); - SQLFreeHandle(hSTMT, hstmt); - return ret; - } - - if (numcols > 0) - /* if there is a results table (e.g., SELECT) */ - return create_cursor (L, 1, conn, hstmt, numcols); - else { - /* if action has no results (e.g., UPDATE) */ - SQLINTEGER numrows; - ret = SQLRowCount(hstmt, &numrows); - if (error(ret)) { - ret = fail(L, hSTMT, hstmt); - SQLFreeHandle(hSTMT, hstmt); - return ret; - } - lua_pushnumber(L, numrows); - SQLFreeHandle(hSTMT, hstmt); - return 1; - } -} - -/* -** Rolls back a transaction. -*/ -static int conn_commit (lua_State *L) { - conn_data *conn = (conn_data *) getconnection (L); - SQLRETURN ret = SQLEndTran(hDBC, conn->hdbc, SQL_COMMIT); - if (error(ret)) - return fail(L, hSTMT, conn->hdbc); - else - return pass(L); -} - -/* -** Rollback the current transaction. -*/ -static int conn_rollback (lua_State *L) { - conn_data *conn = (conn_data *) getconnection (L); - SQLRETURN ret = SQLEndTran(hDBC, conn->hdbc, SQL_ROLLBACK); - if (error(ret)) - return fail(L, hSTMT, conn->hdbc); - else - return pass(L); -} - -/* -** Sets the auto commit mode -*/ -static int conn_setautocommit (lua_State *L) { - conn_data *conn = (conn_data *) getconnection (L); - SQLRETURN ret; - if (lua_toboolean (L, 2)) { - ret = SQLSetConnectAttr(conn->hdbc, SQL_ATTR_AUTOCOMMIT, - (SQLPOINTER) SQL_AUTOCOMMIT_ON, 0); - } else { - ret = SQLSetConnectAttr(conn->hdbc, SQL_ATTR_AUTOCOMMIT, - (SQLPOINTER) SQL_AUTOCOMMIT_OFF, 0); - } - if (error(ret)) - return fail(L, hSTMT, conn->hdbc); - else - return pass(L); -} - - -/* -** Create a new Connection object and push it on top of the stack. -*/ -static int create_connection (lua_State *L, int o, env_data *env, SQLHDBC hdbc) { - conn_data *conn = (conn_data *) lua_newuserdata(L, sizeof(conn_data)); - /* set auto commit mode */ - SQLRETURN ret = SQLSetConnectAttr(hdbc, SQL_ATTR_AUTOCOMMIT, - (SQLPOINTER) SQL_AUTOCOMMIT_ON, 0); - if (error(ret)) - return fail(L, hDBC, hdbc); - - luasql_setmeta (L, LUASQL_CONNECTION_ODBC); - - /* fill in structure */ - conn->closed = 0; - conn->cur_counter = 0; - conn->env = LUA_NOREF; - conn->hdbc = hdbc; - lua_pushvalue (L, o); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - env->conn_counter++; - return 1; -} - - -/* -** Creates and returns a connection object -** Lua Input: source [, user [, pass]] -** source: data source -** user, pass: data source authentication information -** Lua Returns: -** connection object if successfull -** nil and error message otherwise. -*/ -static int env_connect (lua_State *L) { - env_data *env = (env_data *) getenvironment (L); - const char *sourcename = luaL_checkstring (L, 2); - const char *username = luaL_optstring (L, 3, NULL); - const char *password = luaL_optstring (L, 4, NULL); - SQLHDBC hdbc; - SQLRETURN ret; - - /* tries to allocate connection handle */ - ret = SQLAllocHandle (hDBC, env->henv, &hdbc); - if (error(ret)) - return luasql_faildirect (L, "connection allocation error."); - - /* tries to connect handle */ - ret = SQLConnect (hdbc, (char *) sourcename, SQL_NTS, - (char *) username, SQL_NTS, (char *) password, SQL_NTS); - if (error(ret)) { - ret = fail(L, hDBC, hdbc); - SQLFreeHandle(hDBC, hdbc); - return ret; - } - - /* success, return connection object */ - return create_connection (L, 1, env, hdbc); -} - -/* -** Closes an environment object -*/ -static int env_close (lua_State *L) { - SQLRETURN ret; - env_data *env = (env_data *)luaL_checkudata(L, 1, LUASQL_ENVIRONMENT_ODBC); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean (L, 0); - return 1; - } - if (env->conn_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open connections"); - - env->closed = 1; - ret = SQLFreeHandle (hENV, env->henv); - if (error(ret)) { - int ret = fail(L, hENV, env->henv); - env->henv = NULL; - return ret; - } - return pass(L); -} - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) { - struct luaL_reg environment_methods[] = { - {"__gc", env_close}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_close}, - {"close", conn_close}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_close}, - {"close", cur_close}, - {"fetch", cur_fetch}, - {"getcoltypes", cur_coltypes}, - {"getcolnames", cur_colnames}, - {NULL, NULL}, - }; - luasql_createmeta (L, LUASQL_ENVIRONMENT_ODBC, environment_methods); - luasql_createmeta (L, LUASQL_CONNECTION_ODBC, connection_methods); - luasql_createmeta (L, LUASQL_CURSOR_ODBC, cursor_methods); - lua_pop (L, 3); -} - - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) { - env_data *env; - SQLHENV henv; - SQLRETURN ret = SQLAllocHandle(hENV, SQL_NULL_HANDLE, &henv); - if (error(ret)) - return luasql_faildirect(L, "error creating environment."); - - ret = SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, - (void*)SQL_OV_ODBC3, 0); - if (error(ret)) { - ret = luasql_faildirect (L, "error setting SQL version."); - SQLFreeHandle (hENV, henv); - return ret; - } - - env = (env_data *)lua_newuserdata (L, sizeof (env_data)); - luasql_setmeta (L, LUASQL_ENVIRONMENT_ODBC); - /* fill in structure */ - env->closed = 0; - env->conn_counter = 0; - env->henv = henv; - return 1; -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_odbc (lua_State *L) { - struct luaL_reg driver[] = { - {"odbc", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_postgres.c b/3rdparty/luasql-2.2.0/src/ls_postgres.c deleted file mode 100644 index 39f1bb688d..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_postgres.c +++ /dev/null @@ -1,611 +0,0 @@ -/* -** LuaSQL, PostgreSQL driver -** Authors: Pedro Rabinovitch, Roberto Ierusalimschy, Carlos Cassino -** Tomas Guisasola, Eduardo Quintao -** See Copyright Notice in license.html -** $Id: ls_postgres.c,v 1.11 2009/02/07 23:16:23 tomas Exp $ -*/ - -#include -#include -#include -#include -#include - -#include "libpq-fe.h" - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_PG "PostgreSQL environment" -#define LUASQL_CONNECTION_PG "PostgreSQL connection" -#define LUASQL_CURSOR_PG "PostgreSQL cursor" - -typedef struct { - short closed; -} env_data; - - -typedef struct { - short closed; - int env; /* reference to environment */ - int auto_commit; /* 0 for manual commit */ - PGconn *pg_conn; -} conn_data; - - -typedef struct { - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int colnames, coltypes; /* reference to column information tables */ - int curr_tuple; /* next tuple to be read */ - PGresult *pg_res; -} cur_data; - - -typedef void (*creator) (lua_State *L, cur_data *cur); - - -LUASQL_API int luaopen_luasql_postgres(lua_State *L); - - -/* -** Check for valid environment. -*/ -static env_data *getenvironment (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_PG); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - luaL_argcheck (L, !env->closed, 1, LUASQL_PREFIX"environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_PG); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - luaL_argcheck (L, !conn->closed, 1, LUASQL_PREFIX"connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_PG); - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - luaL_argcheck (L, !cur->closed, 1, LUASQL_PREFIX"cursor is closed"); - return cur; -} - - -/* -** Push the value of #i field of #tuple row. -*/ -static void pushvalue (lua_State *L, PGresult *res, int tuple, int i) { - if (PQgetisnull (res, tuple, i-1)) - lua_pushnil (L); - else - lua_pushstring (L, PQgetvalue (res, tuple, i-1)); -} - - -/* -** Closes the cursor and nullify all structure fields. -*/ -static void cur_nullify (lua_State *L, cur_data *cur) { - /* Nullify structure fields. */ - cur->closed = 1; - PQclear(cur->pg_res); - luaL_unref (L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref (L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref (L, LUA_REGISTRYINDEX, cur->coltypes); -} - - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = getcursor (L); - PGresult *res = cur->pg_res; - int tuple = cur->curr_tuple; - - if (tuple >= PQntuples(cur->pg_res)) { - cur_nullify (L, cur); - lua_pushnil(L); /* no more results */ - return 1; - } - - cur->curr_tuple++; - if (lua_istable (L, 2)) { - int i; - const char *opts = luaL_optstring (L, 3, "n"); - if (strchr (opts, 'n') != NULL) - /* Copy values to numerical indices */ - for (i = 1; i <= cur->numcols; i++) { - pushvalue (L, res, tuple, i); - lua_rawseti (L, 2, i); - } - if (strchr (opts, 'a') != NULL) - /* Copy values to alphanumerical indices */ - for (i = 1; i <= cur->numcols; i++) { - lua_pushstring (L, PQfname (res, i-1)); - pushvalue (L, res, tuple, i); - lua_rawset (L, 2); - } - lua_pushvalue(L, 2); - return 1; /* return table */ - } - else { - int i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 1; i <= cur->numcols; i++) - pushvalue (L, res, tuple, i); - return cur->numcols; /* return #numcols values */ - } -} - - -/* -** Cursor object collector function -*/ -static int cur_gc (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_PG); - if (cur != NULL && !(cur->closed)) - cur_nullify (L, cur); - return 0; -} - - -/* -** Closes the cursor on top of the stack. -** Returns true in case of success, or false in case the cursor was -** already closed. -** Throws an error if the argument is not a cursor. -*/ -static int cur_close (lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_PG); - luaL_argcheck (L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean (L, 0); - return 1; - } - cur_nullify (L, cur); /* == cur_gc (L); */ - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Get the internal database type of the given column. -*/ -static char *getcolumntype (PGconn *conn, PGresult *result, int i, char *buff) { - Oid codigo = PQftype (result, i); - char stmt[100]; - PGresult *res; - - sprintf (stmt, "select typname from pg_type where oid = %d", codigo); - res = PQexec(conn, stmt); - strcpy (buff, "undefined"); - - if (PQresultStatus (res) == PGRES_TUPLES_OK) { - if (PQntuples(res) > 0) { - char *name = PQgetvalue(res, 0, 0); - if (strcmp (name, "bpchar")==0 || strcmp (name, "varchar")==0) { - int modifier = PQfmod (result, i) - 4; - sprintf (buff, "%.20s (%d)", name, modifier); - } - else - strncpy (buff, name, 20); - } - } - PQclear(res); - return buff; -} - - -/* -** Creates the list of fields names and pushes it on top of the stack. -*/ -static void create_colnames (lua_State *L, cur_data *cur) { - PGresult *result = cur->pg_res; - int i; - lua_newtable (L); - for (i = 1; i <= cur->numcols; i++) { - lua_pushstring (L, PQfname (result, i-1)); - lua_rawseti (L, -2, i); - } -} - - -/* -** Creates the list of fields types and pushes it on top of the stack. -*/ -static void create_coltypes (lua_State *L, cur_data *cur) { - PGresult *result = cur->pg_res; - conn_data *conn; - char typename[100]; - int i; - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - if (!lua_isuserdata (L, -1)) - luaL_error (L, LUASQL_PREFIX"invalid connection"); - conn = (conn_data *)lua_touserdata (L, -1); - lua_newtable (L); - for (i = 1; i <= cur->numcols; i++) { - lua_pushstring(L, getcolumntype (conn->pg_conn, result, i-1, typename)); - lua_rawseti (L, -2, i); - } -} - - -/* -** Pushes a column information table on top of the stack. -** If the table isn't built yet, call the creator function and stores -** a reference to it on the cursor structure. -*/ -static void _pushtable (lua_State *L, cur_data *cur, size_t off, creator func) { - int *ref = (int *)((char *)cur + off); - if (*ref != LUA_NOREF) - lua_rawgeti (L, LUA_REGISTRYINDEX, *ref); - else { - func (L, cur); - /* Stores a reference to it on the cursor structure */ - lua_pushvalue (L, -1); - *ref = luaL_ref (L, LUA_REGISTRYINDEX); - } -} -#define pushtable(L,c,m,f) (_pushtable(L,c,offsetof(cur_data,m),f)) - - -/* -** Return the list of field names. -*/ -static int cur_getcolnames (lua_State *L) { - pushtable (L, getcursor(L), colnames, create_colnames); - return 1; -} - - -/* -** Return the list of field types. -*/ -static int cur_getcoltypes (lua_State *L) { - pushtable (L, getcursor(L), coltypes, create_coltypes); - return 1; -} - - -/* -** Push the number of rows. -*/ -static int cur_numrows (lua_State *L) { - lua_pushnumber (L, PQntuples (getcursor(L)->pg_res)); - return 1; -} - - -/* -** Create a new Cursor object and push it on top of the stack. -*/ -static int create_cursor (lua_State *L, int conn, PGresult *result) { - cur_data *cur = (cur_data *)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_PG); - - /* fill in structure */ - cur->closed = 0; - cur->conn = LUA_NOREF; - cur->numcols = PQnfields(result); - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->curr_tuple = 0; - cur->pg_res = result; - lua_pushvalue (L, conn); - cur->conn = luaL_ref (L, LUA_REGISTRYINDEX); - - return 1; -} - - -static void sql_commit(conn_data *conn) { - PQclear(PQexec(conn->pg_conn, "COMMIT")); -} - - -static void sql_begin(conn_data *conn) { - PQclear(PQexec(conn->pg_conn, "BEGIN")); -} - - -static void sql_rollback(conn_data *conn) { - PQclear(PQexec(conn->pg_conn, "ROLLBACK")); -} - - -/* -** Connection object collector function -*/ -static int conn_gc (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_PG); - if (conn != NULL && !(conn->closed)) { - /* Nullify structure fields. */ - conn->closed = 1; - luaL_unref (L, LUA_REGISTRYINDEX, conn->env); - PQfinish (conn->pg_conn); - } - return 0; -} - - -/* -** Closes the connection on top of the stack. -** Returns true in case of success, or false in case the connection was -** already closed. -** Throws an error if the argument is not a connection. -*/ -static int conn_close (lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_PG); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) { - lua_pushboolean (L, 0); - return 1; - } - conn_gc (L); - lua_pushboolean (L, 1); - return 1; -} - - -/* -** Escapes a string for use within an SQL statement. -** Returns a string with the escaped string. -*/ -static int conn_escape (lua_State *L) { - conn_data *conn = getconnection (L); - size_t len; - const char *from = luaL_checklstring (L, 2, &len); - char to[len*sizeof(char)*2+1]; - int error; - len = PQescapeStringConn (conn->pg_conn, to, from, len, &error); - if (error == 0) { /* success ! */ - lua_pushlstring (L, to, len); - return 1; - } else - return luasql_failmsg (L, "cannot escape string. PostgreSQL: ", PQerrorMessage (conn->pg_conn)); -} - - -/* -** Execute an SQL statement. -** Return a Cursor object if the statement is a query, otherwise -** return the number of tuples affected by the statement. -*/ -static int conn_execute (lua_State *L) { - conn_data *conn = getconnection (L); - const char *statement = luaL_checkstring (L, 2); - PGresult *res = PQexec(conn->pg_conn, statement); - if (res && PQresultStatus(res)==PGRES_COMMAND_OK) { - /* no tuples returned */ - lua_pushnumber(L, atof(PQcmdTuples(res))); - PQclear (res); - return 1; - } - else if (res && PQresultStatus(res)==PGRES_TUPLES_OK) - /* tuples returned */ - return create_cursor (L, 1, res); - else { - /* error */ - PQclear (res); - return luasql_failmsg(L, "error executing statement. PostgreSQL: ", PQerrorMessage(conn->pg_conn)); - } -} - - -/* -** Commit the current transaction. -*/ -static int conn_commit (lua_State *L) { - conn_data *conn = getconnection (L); - sql_commit(conn); - if (conn->auto_commit == 0) { - sql_begin(conn); - lua_pushboolean (L, 1); - } else - lua_pushboolean (L, 0); - return 1; -} - - -/* -** Rollback the current transaction. -*/ -static int conn_rollback (lua_State *L) { - conn_data *conn = getconnection (L); - sql_rollback(conn); - if (conn->auto_commit == 0) { - sql_begin(conn); - lua_pushboolean (L, 1); - } else - lua_pushboolean (L, 0); - return 1; -} - - -/* -** Set "auto commit" property of the connection. -** If 'true', then rollback current transaction. -** If 'false', then start a new transaction. -*/ -static int conn_setautocommit (lua_State *L) { - conn_data *conn = getconnection (L); - if (lua_toboolean (L, 2)) { - conn->auto_commit = 1; - sql_rollback(conn); /* Undo active transaction. */ - } - else { - conn->auto_commit = 0; - sql_begin(conn); - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Create a new Connection object and push it on top of the stack. -*/ -static int create_connection (lua_State *L, int env, PGconn *const pg_conn) { - conn_data *conn = (conn_data *)lua_newuserdata(L, sizeof(conn_data)); - luasql_setmeta (L, LUASQL_CONNECTION_PG); - - /* fill in structure */ - conn->closed = 0; - conn->env = LUA_NOREF; - conn->auto_commit = 1; - conn->pg_conn = pg_conn; - lua_pushvalue (L, env); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - return 1; -} - - -static void notice_processor (void *arg, const char *message) { - (void)arg; (void)message; - /* arg == NULL */ -} - - -/* -** Connects to a data source. -** This driver provides two ways to connect to a data source: -** (1) giving the connection parameters as a set of pairs separated -** by whitespaces in a string (first method parameter) -** (2) giving one string for each connection parameter, said -** datasource, username, password, host and port. -*/ -static int env_connect (lua_State *L) { - const char *sourcename = luaL_checkstring(L, 2); - PGconn *conn; - getenvironment (L); /* validate environment */ - if ((lua_gettop (L) == 2) && (strchr (sourcename, '=') != NULL)) - conn = PQconnectdb (sourcename); - else { - const char *username = luaL_optstring(L, 3, NULL); - const char *password = luaL_optstring(L, 4, NULL); - const char *pghost = luaL_optstring(L, 5, NULL); - const char *pgport = luaL_optstring(L, 6, NULL); - - conn = PQsetdbLogin(pghost, pgport, NULL, NULL, - sourcename, username, password); - } - - if (PQstatus(conn) == CONNECTION_BAD) - return luasql_failmsg(L, "error connecting to database. PostgreSQL: ", PQerrorMessage(conn)); - PQsetNoticeProcessor(conn, notice_processor, NULL); - return create_connection(L, 1, conn); -} - - -/* -** Environment object collector function. -*/ -static int env_gc (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_PG); - if (env != NULL && !(env->closed)) - env->closed = 1; - return 0; -} - - -/* -** Closes the environment on top of the stack. -** Returns true in case of success, or false in case the environment was -** already closed. -** Throws an error if the argument is not an environment. -*/ -static int env_close (lua_State *L) { - env_data *env = (env_data *)luaL_checkudata (L, 1, LUASQL_ENVIRONMENT_PG); - luaL_argcheck (L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean (L, 0); - return 1; - } - env_gc (L); - lua_pushboolean (L, 1); - return 1; -} - - - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) { - struct luaL_reg environment_methods[] = { - {"__gc", env_gc}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_gc}, - {"close", conn_close}, - {"escape", conn_escape}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_gc}, - {"close", cur_close}, - {"getcolnames", cur_getcolnames}, - {"getcoltypes", cur_getcoltypes}, - {"fetch", cur_fetch}, - {"numrows", cur_numrows}, - {NULL, NULL}, - }; - luasql_createmeta (L, LUASQL_ENVIRONMENT_PG, environment_methods); - luasql_createmeta (L, LUASQL_CONNECTION_PG, connection_methods); - luasql_createmeta (L, LUASQL_CURSOR_PG, cursor_methods); - lua_pop (L, 3); -} - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) { - env_data *env = (env_data *)lua_newuserdata(L, sizeof(env_data)); - luasql_setmeta (L, LUASQL_ENVIRONMENT_PG); - - /* fill in structure */ - env->closed = 0; - return 1; -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_postgres (lua_State *L) { - struct luaL_reg driver[] = { - {"postgres", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_sqlite.c b/3rdparty/luasql-2.2.0/src/ls_sqlite.c deleted file mode 100644 index 748767bdb1..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_sqlite.c +++ /dev/null @@ -1,579 +0,0 @@ -/* -** LuaSQL, SQLite driver -** Author: Tiago Dionizio, Eduardo Quintao -** See Copyright Notice in license.html -** $Id: ls_sqlite.c,v 1.13 2008/05/04 02:46:17 tomas Exp $ -*/ - -#include -#include -#include -#include - -#include "sqlite.h" - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_SQLITE "SQLite environment" -#define LUASQL_CONNECTION_SQLITE "SQLite connection" -#define LUASQL_CURSOR_SQLITE "SQLite cursor" - -typedef struct -{ - short closed; -} env_data; - - -typedef struct -{ - short closed; - int env; /* reference to environment */ - short auto_commit; /* 0 for manual commit */ - unsigned int cur_counter; - sqlite *sql_conn; -} conn_data; - - -typedef struct -{ - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int colnames, coltypes; /* reference to column information tables */ - sqlite_vm *sql_vm; -} cur_data; - -LUASQL_API int luaopen_luasql_sqlite(lua_State *L); - - -/* -** Check for valid environment. -*/ -static env_data *getenvironment(lua_State *L) { - env_data *env = (env_data *)luaL_checkudata(L, 1, LUASQL_ENVIRONMENT_SQLITE); - luaL_argcheck(L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - luaL_argcheck(L, !env->closed, 1, LUASQL_PREFIX"environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection(lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_SQLITE); - luaL_argcheck(L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - luaL_argcheck(L, !conn->closed, 1, LUASQL_PREFIX"connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor(lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_SQLITE); - luaL_argcheck(L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - luaL_argcheck(L, !cur->closed, 1, LUASQL_PREFIX"cursor is closed"); - return cur; -} - -/* -** Finalizes the vm -** Return nil + errmsg or nil in case of sucess -*/ -static int finalize(lua_State *L, cur_data *cur) { - char *errmsg; - if (sqlite_finalize(cur->sql_vm, &errmsg) != SQLITE_OK) - { - cur->sql_vm = NULL; - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; - } - lua_pushnil(L); - return 1; -} - - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = getcursor(L); - sqlite_vm *vm = cur->sql_vm; - const char **row = NULL; - int res; - - if (vm == NULL) - return 0; - - res = sqlite_step(vm, NULL, &row, NULL); - - /* no more results? */ - if (res == SQLITE_DONE) - return finalize(L, cur); - - if (res != SQLITE_ROW) - return finalize(L, cur); - - if (lua_istable (L, 2)) - { - int i; - const char *opts = luaL_optstring(L, 3, "n"); - - if (strchr(opts, 'n') != NULL) - { - /* Copy values to numerical indices */ - for (i = 0; i < cur->numcols;) - { - lua_pushstring(L, row[i]); - lua_rawseti(L, 2, ++i); - } - } - if (strchr(opts, 'a') != NULL) - { - /* Copy values to alphanumerical indices */ - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->colnames); - - for (i = 0; i < cur->numcols; i++) - { - lua_rawgeti(L, -1, i+1); - lua_pushstring(L, row[i]); - lua_rawset (L, 2); - } - } - lua_pushvalue(L, 2); - return 1; /* return table */ - } - else - { - int i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 0; i < cur->numcols; ++i) - lua_pushstring(L, row[i]); - return cur->numcols; /* return #numcols values */ - } -} - - -/* -** Close the cursor on top of the stack. -** Return 1 -*/ -static int cur_close(lua_State *L) -{ - conn_data *conn; - cur_data *cur = (cur_data *)luaL_checkudata(L, 1, LUASQL_CURSOR_SQLITE); - luaL_argcheck(L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean(L, 0); - return 1; - } - - /* Nullify structure fields. */ - cur->closed = 1; - sqlite_finalize(cur->sql_vm, NULL); - - /* Decrement cursor counter on connection object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = lua_touserdata (L, -1); - conn->cur_counter--; - - luaL_unref(L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref(L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref(L, LUA_REGISTRYINDEX, cur->coltypes); - - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Return the list of field names. -*/ -static int cur_getcolnames(lua_State *L) -{ - cur_data *cur = getcursor(L); - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->colnames); - return 1; -} - - -/* -** Return the list of field types. -*/ -static int cur_getcoltypes(lua_State *L) -{ - cur_data *cur = getcursor(L); - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->coltypes); - return 1; -} - - -/* -** Create a new Cursor object and push it on top of the stack. -*/ -/* static int create_cursor(lua_State *L, int conn, sqlite_vm *sql_vm, - int numcols, const char **row, const char **col_info)*/ -static int create_cursor(lua_State *L, int o, conn_data *conn, - sqlite_vm *sql_vm, int numcols, const char **col_info) -{ - int i; - cur_data *cur = (cur_data*)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_SQLITE); - - /* increment cursor count for the connection creating this cursor */ - conn->cur_counter++; - - /* fill in structure */ - cur->closed = 0; - cur->conn = LUA_NOREF; - cur->numcols = numcols; - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->sql_vm = sql_vm; - - lua_pushvalue(L, o); - cur->conn = luaL_ref(L, LUA_REGISTRYINDEX); - - /* create table with column names */ - lua_newtable(L); - for (i = 0; i < numcols;) - { - lua_pushstring(L, col_info[i]); - lua_rawseti(L, -2, ++i); - } - cur->colnames = luaL_ref(L, LUA_REGISTRYINDEX); - - /* create table with column types */ - lua_newtable(L); - for (i = 0; i < numcols;) - { - lua_pushstring(L, col_info[numcols+i]); - lua_rawseti(L, -2, ++i); - } - cur->coltypes = luaL_ref(L, LUA_REGISTRYINDEX); - - return 1; -} - - -/* -** Close a Connection object. -*/ -static int conn_close(lua_State *L) -{ - conn_data *conn = (conn_data *)luaL_checkudata(L, 1, LUASQL_CONNECTION_SQLITE); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) { - lua_pushboolean(L, 0); - return 1; - } - - if (conn->cur_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open cursors"); - - /* Nullify structure fields. */ - conn->closed = 1; - luaL_unref(L, LUA_REGISTRYINDEX, conn->env); - sqlite_close(conn->sql_conn); - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Execute an SQL statement. -** Return a Cursor object if the statement is a query, otherwise -** return the number of tuples affected by the statement. -*/ -static int conn_execute(lua_State *L) -{ - conn_data *conn = getconnection(L); - const char *statement = luaL_checkstring(L, 2); - int res; - sqlite_vm *vm; - char *errmsg; - int numcols; - const char **col_info; - - res = sqlite_compile(conn->sql_conn, statement, NULL, &vm, &errmsg); - if (res != SQLITE_OK) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; - } - - /* process first result to retrive query information and type */ - res = sqlite_step(vm, &numcols, NULL, &col_info); - - /* real query? if empty, must have numcols!=0 */ - if ((res == SQLITE_ROW) || ((res == SQLITE_DONE) && numcols)) - { - sqlite_reset(vm, NULL); - return create_cursor(L, 1, conn, vm, numcols, col_info); - } - - if (res == SQLITE_DONE) /* and numcols==0, INSERT,UPDATE,DELETE statement */ - { - sqlite_finalize(vm, NULL); - /* return number of columns changed */ - lua_pushnumber(L, sqlite_changes(conn->sql_conn)); - return 1; - } - - /* error */ - sqlite_finalize(vm, &errmsg); - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; -} - - -/* -** Commit the current transaction. -*/ -static int conn_commit(lua_State *L) -{ - char *errmsg; - conn_data *conn = getconnection(L); - int res; - const char *sql = "COMMIT"; - - if (conn->auto_commit == 0) sql = "COMMIT;BEGIN"; - - res = sqlite_exec(conn->sql_conn, sql, NULL, NULL, &errmsg); - if (res != SQLITE_OK) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Rollback the current transaction. -*/ -static int conn_rollback(lua_State *L) -{ - char *errmsg; - conn_data *conn = getconnection(L); - int res; - const char *sql = "ROLLBACK"; - - if (conn->auto_commit == 0) sql = "ROLLBACK;BEGIN"; - - res = sqlite_exec(conn->sql_conn, sql, NULL, NULL, &errmsg); - if (res != SQLITE_OK) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Set "auto commit" property of the connection. -** If 'true', then rollback current transaction. -** If 'false', then start a new transaction. -*/ -static int conn_setautocommit(lua_State *L) -{ - conn_data *conn = getconnection(L); - if (lua_toboolean(L, 2)) - { - conn->auto_commit = 1; - /* undo active transaction - ignore errors */ - sqlite_exec(conn->sql_conn, "ROLLBACK", NULL, NULL, NULL); - } - else - { - char *errmsg; - int res; - conn->auto_commit = 0; - res = sqlite_exec(conn->sql_conn, "BEGIN", NULL, NULL, &errmsg); - if (res != SQLITE_OK) - { - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - lua_error(L); - } - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Create a new Connection object and push it on top of the stack. -*/ -static int create_connection(lua_State *L, int env, sqlite *sql_conn) -{ - conn_data *conn = (conn_data*)lua_newuserdata(L, sizeof(conn_data)); - luasql_setmeta(L, LUASQL_CONNECTION_SQLITE); - - /* fill in structure */ - conn->closed = 0; - conn->env = LUA_NOREF; - conn->auto_commit = 1; - conn->sql_conn = sql_conn; - conn->cur_counter = 0; - lua_pushvalue (L, env); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - return 1; -} - - -/* -** Connects to a data source. -*/ -static int env_connect(lua_State *L) -{ - const char *sourcename; - sqlite *conn; - char *errmsg; - getenvironment(L); /* validate environment */ - sourcename = luaL_checkstring(L, 2); - conn = sqlite_open(sourcename, 0, &errmsg); - if (conn == NULL) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite_freemem(errmsg); - lua_concat(L, 2); - return 2; - } - return create_connection(L, 1, conn); -} - - -/* -** Close environment object. -*/ -static int env_close (lua_State *L) -{ - env_data *env = (env_data *)luaL_checkudata(L, 1, LUASQL_ENVIRONMENT_SQLITE); - luaL_argcheck(L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean(L, 0); - return 1; - } - - env->closed = 1; - lua_pushboolean(L, 1); - return 1; -} - -static int conn_escape(lua_State *L) -{ - const char *from = luaL_checklstring (L, 2, 0); - char *escaped = sqlite_mprintf("%q", from); - if (escaped == NULL) - { - lua_pushnil(L); - } - else - { - lua_pushstring(L, escaped); - sqlite_freemem(escaped); - } - return 1; -} - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) -{ - struct luaL_reg environment_methods[] = { - {"__gc", env_close}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_close}, - {"close", conn_close}, - {"escape", conn_escape}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_close}, - {"close", cur_close}, - {"getcolnames", cur_getcolnames}, - {"getcoltypes", cur_getcoltypes}, - {"fetch", cur_fetch}, - {NULL, NULL}, - }; - luasql_createmeta(L, LUASQL_ENVIRONMENT_SQLITE, environment_methods); - luasql_createmeta(L, LUASQL_CONNECTION_SQLITE, connection_methods); - luasql_createmeta(L, LUASQL_CURSOR_SQLITE, cursor_methods); - lua_pop (L, 3); -} - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) -{ - env_data *env = (env_data *)lua_newuserdata(L, sizeof(env_data)); - luasql_setmeta(L, LUASQL_ENVIRONMENT_SQLITE); - - /* fill in structure */ - env->closed = 0; - return 1; -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_sqlite(lua_State *L) -{ - struct luaL_reg driver[] = { - {"sqlite", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/ls_sqlite3.c b/3rdparty/luasql-2.2.0/src/ls_sqlite3.c deleted file mode 100644 index 0ddd496a82..0000000000 --- a/3rdparty/luasql-2.2.0/src/ls_sqlite3.c +++ /dev/null @@ -1,622 +0,0 @@ -/* -** LuaSQL, SQLite driver -** Author: Tiago Dionizio, Eduardo Quintao -** See Copyright Notice in license.html - -** $Id: ls_sqlite3.c,v 1.15 2009/02/07 23:16:23 tomas Exp $ -*/ - -#include -#include -#include -#include - -#include "sqlite3.h" - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -#define LUASQL_ENVIRONMENT_SQLITE "SQLite3 environment" -#define LUASQL_CONNECTION_SQLITE "SQLite3 connection" -#define LUASQL_CURSOR_SQLITE "SQLite3 cursor" - -typedef struct -{ - short closed; -} env_data; - - -typedef struct -{ - short closed; - int env; /* reference to environment */ - short auto_commit; /* 0 for manual commit */ - unsigned int cur_counter; - sqlite3 *sql_conn; -} conn_data; - - -typedef struct -{ - short closed; - int conn; /* reference to connection */ - int numcols; /* number of columns */ - int colnames, coltypes; /* reference to column information tables */ - conn_data *conn_data; /* reference to connection for cursor */ - sqlite3_stmt *sql_vm; -} cur_data; - -LUASQL_API int luaopen_luasql_sqlite3(lua_State *L); - - -/* -** Check for valid environment. -*/ -static env_data *getenvironment(lua_State *L) { - env_data *env = (env_data *)luaL_checkudata(L, 1, LUASQL_ENVIRONMENT_SQLITE); - luaL_argcheck(L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - luaL_argcheck(L, !env->closed, 1, LUASQL_PREFIX"environment is closed"); - return env; -} - - -/* -** Check for valid connection. -*/ -static conn_data *getconnection(lua_State *L) { - conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_SQLITE); - luaL_argcheck(L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - luaL_argcheck(L, !conn->closed, 1, LUASQL_PREFIX"connection is closed"); - return conn; -} - - -/* -** Check for valid cursor. -*/ -static cur_data *getcursor(lua_State *L) { - cur_data *cur = (cur_data *)luaL_checkudata (L, 1, LUASQL_CURSOR_SQLITE); - luaL_argcheck(L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - luaL_argcheck(L, !cur->closed, 1, LUASQL_PREFIX"cursor is closed"); - return cur; -} - -/* -** Finalizes the vm -** Return nil + errmsg or nil in case of sucess -*/ -static int finalize(lua_State *L, cur_data *cur) { - const char *errmsg; - if (sqlite3_finalize(cur->sql_vm) != SQLITE_OK) - { - errmsg = sqlite3_errmsg(cur->conn_data->sql_conn); - cur->sql_vm = NULL; - return luasql_faildirect(L, errmsg); - } - cur->sql_vm = NULL; - lua_pushnil(L); - return 1; -} - - -static void push_column(lua_State *L, sqlite3_stmt *vm, int column) { - switch (sqlite3_column_type(vm, column)) { - case SQLITE_INTEGER: - lua_pushinteger(L, sqlite3_column_int64(vm, column)); - break; - case SQLITE_FLOAT: - lua_pushnumber(L, sqlite3_column_double(vm, column)); - break; - case SQLITE_TEXT: - lua_pushlstring(L, sqlite3_column_text(vm, column), - sqlite3_column_bytes(vm, column)); - break; - case SQLITE_BLOB: - lua_pushlstring(L, sqlite3_column_blob(vm, column), - sqlite3_column_bytes(vm, column)); - break; - case SQLITE_NULL: - lua_pushnil(L); - break; - default: - luaL_error(L, LUASQL_PREFIX"Unrecognized column type"); - break; - } -} - -/* -** Get another row of the given cursor. -*/ -static int cur_fetch (lua_State *L) { - cur_data *cur = getcursor(L); - sqlite3_stmt *vm = cur->sql_vm; - int res; - - if (vm == NULL) - return 0; - - res = sqlite3_step(vm); - - /* no more results? */ - if (res == SQLITE_DONE) - return finalize(L, cur); - - if (res != SQLITE_ROW) - return finalize(L, cur); - - if (lua_istable (L, 2)) - { - int i; - const char *opts = luaL_optstring(L, 3, "n"); - - if (strchr(opts, 'n') != NULL) - { - /* Copy values to numerical indices */ - for (i = 0; i < cur->numcols;) - { - push_column(L, vm, i); - lua_rawseti(L, 2, ++i); - } - } - if (strchr(opts, 'a') != NULL) - { - /* Copy values to alphanumerical indices */ - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->colnames); - - for (i = 0; i < cur->numcols; i++) - { - lua_rawgeti(L, -1, i+1); - push_column(L, vm, i); - lua_rawset (L, 2); - } - } - lua_pushvalue(L, 2); - return 1; /* return table */ - } - else - { - int i; - luaL_checkstack (L, cur->numcols, LUASQL_PREFIX"too many columns"); - for (i = 0; i < cur->numcols; ++i) - push_column(L, vm, i); - return cur->numcols; /* return #numcols values */ - } -} - - -/* -** Close the cursor on top of the stack. -** Return 1 -*/ -static int cur_close(lua_State *L) -{ - conn_data *conn; - cur_data *cur = (cur_data *)luaL_checkudata(L, 1, LUASQL_CURSOR_SQLITE); - luaL_argcheck(L, cur != NULL, 1, LUASQL_PREFIX"cursor expected"); - if (cur->closed) { - lua_pushboolean(L, 0); - return 1; - } - - /* Nullify structure fields. */ - cur->closed = 1; - sqlite3_finalize(cur->sql_vm); - /* Decrement cursor counter on connection object */ - lua_rawgeti (L, LUA_REGISTRYINDEX, cur->conn); - conn = lua_touserdata (L, -1); - conn->cur_counter--; - - luaL_unref(L, LUA_REGISTRYINDEX, cur->conn); - luaL_unref(L, LUA_REGISTRYINDEX, cur->colnames); - luaL_unref(L, LUA_REGISTRYINDEX, cur->coltypes); - - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Return the list of field names. -*/ -static int cur_getcolnames(lua_State *L) -{ - cur_data *cur = getcursor(L); - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->colnames); - return 1; -} - - -/* -** Return the list of field types. -*/ -static int cur_getcoltypes(lua_State *L) -{ - cur_data *cur = getcursor(L); - lua_rawgeti(L, LUA_REGISTRYINDEX, cur->coltypes); - return 1; -} - - -/* -** Create a new Cursor object and push it on top of the stack. -*/ -/* static int create_cursor(lua_State *L, int conn, sqlite3_stmt *sql_vm, - int numcols, const char **row, const char **col_info)*/ -static int create_cursor(lua_State *L, int o, conn_data *conn, - sqlite3_stmt *sql_vm, int numcols) -{ - int i; - cur_data *cur = (cur_data*)lua_newuserdata(L, sizeof(cur_data)); - luasql_setmeta (L, LUASQL_CURSOR_SQLITE); - - /* increment cursor count for the connection creating this cursor */ - conn->cur_counter++; - - /* fill in structure */ - cur->closed = 0; - cur->conn = LUA_NOREF; - cur->numcols = numcols; - cur->colnames = LUA_NOREF; - cur->coltypes = LUA_NOREF; - cur->sql_vm = sql_vm; - cur->conn_data = conn; - - lua_pushvalue(L, o); - cur->conn = luaL_ref(L, LUA_REGISTRYINDEX); - - /* create table with column names */ - lua_newtable(L); - for (i = 0; i < numcols;) - { - lua_pushstring(L, sqlite3_column_name(sql_vm, i)); - lua_rawseti(L, -2, ++i); - } - cur->colnames = luaL_ref(L, LUA_REGISTRYINDEX); - - /* create table with column types */ - lua_newtable(L); - for (i = 0; i < numcols;) - { - lua_pushstring(L, sqlite3_column_decltype(sql_vm, i)); - lua_rawseti(L, -2, ++i); - } - cur->coltypes = luaL_ref(L, LUA_REGISTRYINDEX); - - return 1; -} - - -/* -** Close a Connection object. -*/ -static int conn_close(lua_State *L) -{ - conn_data *conn = (conn_data *)luaL_checkudata(L, 1, LUASQL_CONNECTION_SQLITE); - luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected"); - if (conn->closed) - { - lua_pushboolean(L, 0); - return 1; - } - - if (conn->cur_counter > 0) - return luaL_error (L, LUASQL_PREFIX"there are open cursors"); - - /* Nullify structure fields. */ - conn->closed = 1; - luaL_unref(L, LUA_REGISTRYINDEX, conn->env); - sqlite3_close(conn->sql_conn); - lua_pushboolean(L, 1); - return 1; -} - -static int conn_escape(lua_State *L) -{ - const char *from = luaL_checklstring (L, 2, 0); - char *escaped = sqlite3_mprintf("%q", from); - if (escaped == NULL) - { - lua_pushnil(L); - } - else - { - lua_pushstring(L, escaped); - sqlite3_free(escaped); - } - return 1; -} - -/* -** Execute an SQL statement. -** Return a Cursor object if the statement is a query, otherwise -** return the number of tuples affected by the statement. -*/ -static int conn_execute(lua_State *L) -{ - conn_data *conn = getconnection(L); - const char *statement = luaL_checkstring(L, 2); - int res; - sqlite3_stmt *vm; - const char *errmsg; - int numcols; - const char *tail; - - res = sqlite3_prepare(conn->sql_conn, statement, -1, &vm, &tail); - if (res != SQLITE_OK) - { - errmsg = sqlite3_errmsg(conn->sql_conn); - return luasql_faildirect(L, errmsg); - } - - /* process first result to retrive query information and type */ - res = sqlite3_step(vm); - numcols = sqlite3_column_count(vm); - - /* real query? if empty, must have numcols!=0 */ - if ((res == SQLITE_ROW) || ((res == SQLITE_DONE) && numcols)) - { - sqlite3_reset(vm); - return create_cursor(L, 1, conn, vm, numcols); - } - - if (res == SQLITE_DONE) /* and numcols==0, INSERT,UPDATE,DELETE statement */ - { - sqlite3_finalize(vm); - /* return number of columns changed */ - lua_pushnumber(L, sqlite3_changes(conn->sql_conn)); - return 1; - } - - /* error */ - errmsg = sqlite3_errmsg(conn->sql_conn); - sqlite3_finalize(vm); - return luasql_faildirect(L, errmsg); -} - - -/* -** Commit the current transaction. -*/ -static int conn_commit(lua_State *L) -{ - char *errmsg; - conn_data *conn = getconnection(L); - int res; - const char *sql = "COMMIT"; - - if (conn->auto_commit == 0) sql = "COMMIT;BEGIN"; - - res = sqlite3_exec(conn->sql_conn, sql, NULL, NULL, &errmsg); - - if (res != SQLITE_OK) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite3_free(errmsg); - lua_concat(L, 2); - return 2; - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Rollback the current transaction. -*/ -static int conn_rollback(lua_State *L) -{ - char *errmsg; - conn_data *conn = getconnection(L); - int res; - const char *sql = "ROLLBACK"; - - if (conn->auto_commit == 0) sql = "ROLLBACK;BEGIN"; - - res = sqlite3_exec(conn->sql_conn, sql, NULL, NULL, &errmsg); - if (res != SQLITE_OK) - { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite3_free(errmsg); - lua_concat(L, 2); - return 2; - } - lua_pushboolean(L, 1); - return 1; -} - -static int conn_getlastautoid(lua_State *L) -{ - conn_data *conn = getconnection(L); - lua_pushnumber(L, sqlite3_last_insert_rowid(conn->sql_conn)); - return 1; -} - - -/* -** Set "auto commit" property of the connection. -** If 'true', then rollback current transaction. -** If 'false', then start a new transaction. -*/ -static int conn_setautocommit(lua_State *L) -{ - conn_data *conn = getconnection(L); - if (lua_toboolean(L, 2)) - { - conn->auto_commit = 1; - /* undo active transaction - ignore errors */ - sqlite3_exec(conn->sql_conn, "ROLLBACK", NULL, NULL, NULL); - } - else - { - char *errmsg; - int res; - conn->auto_commit = 0; - res = sqlite3_exec(conn->sql_conn, "BEGIN", NULL, NULL, &errmsg); - if (res != SQLITE_OK) - { - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, errmsg); - sqlite3_free(errmsg); - lua_concat(L, 2); - lua_error(L); - } - } - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Create a new Connection object and push it on top of the stack. -*/ -static int create_connection(lua_State *L, int env, sqlite3 *sql_conn) -{ - conn_data *conn = (conn_data*)lua_newuserdata(L, sizeof(conn_data)); - luasql_setmeta(L, LUASQL_CONNECTION_SQLITE); - - /* fill in structure */ - conn->closed = 0; - conn->env = LUA_NOREF; - conn->auto_commit = 1; - conn->sql_conn = sql_conn; - conn->cur_counter = 0; - lua_pushvalue (L, env); - conn->env = luaL_ref (L, LUA_REGISTRYINDEX); - return 1; -} - - -/* -** Connects to a data source. -*/ -static int env_connect(lua_State *L) -{ - const char *sourcename; - sqlite3 *conn; - const char *errmsg; - int res; - getenvironment(L); /* validate environment */ - - sourcename = luaL_checkstring(L, 2); - - res = sqlite3_open(sourcename, &conn); - if (res != SQLITE_OK) - { - errmsg = sqlite3_errmsg(conn); - luasql_faildirect(L, errmsg); - sqlite3_close(conn); - return 2; - } - - if (lua_isnumber(L, 3)) { - sqlite3_busy_timeout(conn, lua_tonumber(L,3)); // TODO: remove this - } - - return create_connection(L, 1, conn); -} - - -/* -** Close environment object. -*/ -static int env_close (lua_State *L) -{ - env_data *env = (env_data *)luaL_checkudata(L, 1, LUASQL_ENVIRONMENT_SQLITE); - luaL_argcheck(L, env != NULL, 1, LUASQL_PREFIX"environment expected"); - if (env->closed) { - lua_pushboolean(L, 0); - return 1; - } - - env->closed = 1; - lua_pushboolean(L, 1); - return 1; -} - - -/* -** Sets the timeout for a lock in the connection. -*/ -static int opts_settimeout (lua_State *L) -{ - conn_data *conn = getconnection(L); - int milisseconds = luaL_checknumber(L, 2); - lua_pushnumber(L, sqlite3_busy_timeout(conn, milisseconds)); - return 1; -} - -/* -** Create metatables for each class of object. -*/ -static void create_metatables (lua_State *L) -{ - struct luaL_reg environment_methods[] = { - {"__gc", env_close}, - {"close", env_close}, - {"connect", env_connect}, - {NULL, NULL}, - }; - struct luaL_reg connection_methods[] = { - {"__gc", conn_close}, - {"close", conn_close}, - {"escape", conn_escape}, - {"execute", conn_execute}, - {"commit", conn_commit}, - {"rollback", conn_rollback}, - {"setautocommit", conn_setautocommit}, - {"getlastautoid", conn_getlastautoid}, - {NULL, NULL}, - }; - struct luaL_reg cursor_methods[] = { - {"__gc", cur_close}, - {"close", cur_close}, - {"getcolnames", cur_getcolnames}, - {"getcoltypes", cur_getcoltypes}, - {"fetch", cur_fetch}, - {NULL, NULL}, - }; - luasql_createmeta(L, LUASQL_ENVIRONMENT_SQLITE, environment_methods); - luasql_createmeta(L, LUASQL_CONNECTION_SQLITE, connection_methods); - luasql_createmeta(L, LUASQL_CURSOR_SQLITE, cursor_methods); - lua_pop (L, 3); -} - -/* -** Creates an Environment and returns it. -*/ -static int create_environment (lua_State *L) -{ - env_data *env = (env_data *)lua_newuserdata(L, sizeof(env_data)); - luasql_setmeta(L, LUASQL_ENVIRONMENT_SQLITE); - - /* fill in structure */ - env->closed = 0; - return 1; -} - - -/* -** Creates the metatables for the objects and registers the -** driver open method. -*/ -LUASQL_API int luaopen_luasql_sqlite3(lua_State *L) -{ - struct luaL_reg driver[] = { - {"sqlite3", create_environment}, - {NULL, NULL}, - }; - create_metatables (L); - luaL_openlib (L, LUASQL_TABLENAME, driver, 0); - luasql_set_info (L); - return 1; -} diff --git a/3rdparty/luasql-2.2.0/src/luasql.c b/3rdparty/luasql-2.2.0/src/luasql.c deleted file mode 100644 index f3a790d3a2..0000000000 --- a/3rdparty/luasql-2.2.0/src/luasql.c +++ /dev/null @@ -1,110 +0,0 @@ -/* -** $Id: luasql.c,v 1.28 2009/02/11 12:08:50 tomas Exp $ -** See Copyright Notice in license.html -*/ - -#include - -#include "lua.h" -#include "lauxlib.h" -#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 -#include "compat-5.1.h" -#endif - - -#include "luasql.h" - -/* -** Typical database error situation -*/ -LUASQL_API int luasql_faildirect(lua_State *L, const char *err) { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, err); - lua_concat(L, 2); - return 2; -} - - -/* -** Database error with LuaSQL message -** @param err LuaSQL error message. -** @param m Driver error message. -*/ -LUASQL_API int luasql_failmsg(lua_State *L, const char *err, const char *m) { - lua_pushnil(L); - lua_pushliteral(L, LUASQL_PREFIX); - lua_pushstring(L, err); - lua_pushstring(L, m); - lua_concat(L, 3); - return 2; -} - - -/* -** Return the name of the object's metatable. -** This function is used by `tostring'. -*/ -static int luasql_tostring (lua_State *L) { - char buff[100]; - pseudo_data *obj = (pseudo_data *)lua_touserdata (L, 1); - if (obj->closed) - strcpy (buff, "closed"); - else - sprintf (buff, "%p", (void *)obj); - lua_pushfstring (L, "%s (%s)", lua_tostring(L,lua_upvalueindex(1)), buff); - return 1; -} - - -/* -** Create a metatable and leave it on top of the stack. -*/ -LUASQL_API int luasql_createmeta (lua_State *L, const char *name, const luaL_reg *methods) { - if (!luaL_newmetatable (L, name)) - return 0; - - /* define methods */ - luaL_openlib (L, NULL, methods, 0); - - /* define metamethods */ - lua_pushliteral (L, "__index"); - lua_pushvalue (L, -2); - lua_settable (L, -3); - - lua_pushliteral (L, "__tostring"); - lua_pushstring (L, name); - lua_pushcclosure (L, luasql_tostring, 1); - lua_settable (L, -3); - - lua_pushliteral (L, "__metatable"); - lua_pushliteral (L, LUASQL_PREFIX"you're not allowed to get this metatable"); - lua_settable (L, -3); - - return 1; -} - - -/* -** Define the metatable for the object on top of the stack -*/ -LUASQL_API void luasql_setmeta (lua_State *L, const char *name) { - luaL_getmetatable (L, name); - lua_setmetatable (L, -2); -} - - -/* -** Assumes the table is on top of the stack. -*/ -LUASQL_API void luasql_set_info (lua_State *L) { - lua_pushliteral (L, "_COPYRIGHT"); - lua_pushliteral (L, "Copyright (C) 2003-2008 Kepler Project"); - lua_settable (L, -3); - lua_pushliteral (L, "_DESCRIPTION"); - lua_pushliteral (L, "LuaSQL is a simple interface from Lua to a DBMS"); - lua_settable (L, -3); - lua_pushliteral (L, "_VERSION"); - lua_pushliteral (L, "LuaSQL 2.1.2"); - lua_settable (L, -3); -} diff --git a/3rdparty/luasql-2.2.0/src/luasql.h b/3rdparty/luasql-2.2.0/src/luasql.h deleted file mode 100644 index 92205547ec..0000000000 --- a/3rdparty/luasql-2.2.0/src/luasql.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -** $Id: luasql.h,v 1.12 2009/02/07 23:16:23 tomas Exp $ -** See Copyright Notice in license.html -*/ - -#ifndef _LUASQL_ -#define _LUASQL_ - -#ifndef LUASQL_API -#define LUASQL_API -#endif - -#define LUASQL_PREFIX "LuaSQL: " -#define LUASQL_TABLENAME "luasql" -#define LUASQL_ENVIRONMENT "Each driver must have an environment metatable" -#define LUASQL_CONNECTION "Each driver must have a connection metatable" -#define LUASQL_CURSOR "Each driver must have a cursor metatable" - -typedef struct { - short closed; -} pseudo_data; - -LUASQL_API int luasql_faildirect (lua_State *L, const char *err); -LUASQL_API int luasql_failmsg (lua_State *L, const char *err, const char *m); -LUASQL_API int luasql_createmeta (lua_State *L, const char *name, const luaL_reg *methods); -LUASQL_API void luasql_setmeta (lua_State *L, const char *name); -LUASQL_API void luasql_set_info (lua_State *L); - -#endif diff --git a/3rdparty/luasql-2.2.0/src/mysql.def b/3rdparty/luasql-2.2.0/src/mysql.def deleted file mode 100644 index 5caf460155..0000000000 --- a/3rdparty/luasql-2.2.0/src/mysql.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_mysql diff --git a/3rdparty/luasql-2.2.0/src/oci8.def b/3rdparty/luasql-2.2.0/src/oci8.def deleted file mode 100644 index 586751d23a..0000000000 --- a/3rdparty/luasql-2.2.0/src/oci8.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_oci8 diff --git a/3rdparty/luasql-2.2.0/src/odbc.def b/3rdparty/luasql-2.2.0/src/odbc.def deleted file mode 100644 index 63a4b5bcbe..0000000000 --- a/3rdparty/luasql-2.2.0/src/odbc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_odbc diff --git a/3rdparty/luasql-2.2.0/src/postgres.def b/3rdparty/luasql-2.2.0/src/postgres.def deleted file mode 100644 index 15cd175a04..0000000000 --- a/3rdparty/luasql-2.2.0/src/postgres.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_postgres diff --git a/3rdparty/luasql-2.2.0/src/sqlite.def b/3rdparty/luasql-2.2.0/src/sqlite.def deleted file mode 100644 index 49c21711e2..0000000000 --- a/3rdparty/luasql-2.2.0/src/sqlite.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_sqlite diff --git a/3rdparty/luasql-2.2.0/src/sqlite3.def b/3rdparty/luasql-2.2.0/src/sqlite3.def deleted file mode 100644 index c7e0451ece..0000000000 --- a/3rdparty/luasql-2.2.0/src/sqlite3.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - luaopen_luasql_sqlite3 diff --git a/3rdparty/luasql-2.2.0/tests/ado.lua b/3rdparty/luasql-2.2.0/tests/ado.lua deleted file mode 100644 index 40a3d9f1d6..0000000000 --- a/3rdparty/luasql-2.2.0/tests/ado.lua +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/lua50 - -QUERYING_STRING_TYPE_NAME = "adLongVarWChar" diff --git a/3rdparty/luasql-2.2.0/tests/example.lua b/3rdparty/luasql-2.2.0/tests/example.lua deleted file mode 100644 index beabba5b6e..0000000000 --- a/3rdparty/luasql-2.2.0/tests/example.lua +++ /dev/null @@ -1,40 +0,0 @@ --- See Copyright Notice in license.html - --- load driver -require"luasql.postgres" --- create environment object -env = assert (luasql.postgres()) --- connect to data source -con = assert (env:connect("luasql-test")) --- reset our table -res = con:execute"DROP TABLE people" -res = assert (con:execute[[ - CREATE TABLE people( - name varchar(50), - email varchar(50) - ) -]]) --- add a few elements -list = { - { name="Jose das Couves", email="jose@couves.com", }, - { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", }, - { name="Maria das Dores", email="maria@dores.com", }, -} -for i, p in pairs (list) do - res = assert (con:execute(string.format([[ - INSERT INTO people - VALUES ('%s', '%s')]], p.name, p.email) - )) -end --- retrieve a cursor -cur = assert (con:execute"SELECT name, email from people") --- print all rows -row = cur:fetch ({}, "a") -- the rows will be indexed by field names -while row do - print(string.format("Name: %s, E-mail: %s", row.name, row.email)) - row = cur:fetch (row, "a") -- reusing the table of results -end --- close everything -cur:close() -con:close() -env:close() diff --git a/3rdparty/luasql-2.2.0/tests/firebird.lua b/3rdparty/luasql-2.2.0/tests/firebird.lua deleted file mode 100644 index 22b0f63100..0000000000 --- a/3rdparty/luasql-2.2.0/tests/firebird.lua +++ /dev/null @@ -1,15 +0,0 @@ -DEFINITION_STRING_TYPE_NAME = "VARCHAR(80)" -QUERYING_STRING_TYPE_NAME = "string" - -CHECK_GETCOL_INFO_TABLES = false - -local orig_create_table = create_table - ---------------------------------------------------------------------- --- New metadata needs to be commited before it is used ---------------------------------------------------------------------- -function create_table () - orig_create_table() - CONN:commit() -end - diff --git a/3rdparty/luasql-2.2.0/tests/mysql.lua b/3rdparty/luasql-2.2.0/tests/mysql.lua deleted file mode 100644 index e886dbb857..0000000000 --- a/3rdparty/luasql-2.2.0/tests/mysql.lua +++ /dev/null @@ -1,30 +0,0 @@ ---------------------------------------------------------------------- --- MySQL specific tests and configurations. --- $Id: mysql.lua,v 1.4 2006/01/25 20:28:30 tomas Exp $ ---------------------------------------------------------------------- - -QUERYING_STRING_TYPE_NAME = "binary(65535)" - -table.insert (CUR_METHODS, "numrows") -table.insert (EXTENSIONS, numrows) - ---------------------------------------------------------------------- --- Build SQL command to create the test table. ---------------------------------------------------------------------- -local _define_table = define_table -function define_table (n) - return _define_table(n) .. " TYPE = InnoDB;" -end - ---------------------------------------------------------------------- --- MySQL versions 4.0.x do not implement rollback. ---------------------------------------------------------------------- -local _rollback = rollback -function rollback () - if luasql._MYSQLVERSION and string.sub(luasql._MYSQLVERSION, 1, 3) == "4.0" then - io.write("skipping rollback test (mysql version 4.0.x)") - return - else - _rollback () - end -end diff --git a/3rdparty/luasql-2.2.0/tests/oci8.lua b/3rdparty/luasql-2.2.0/tests/oci8.lua deleted file mode 100644 index 09219c28d6..0000000000 --- a/3rdparty/luasql-2.2.0/tests/oci8.lua +++ /dev/null @@ -1,10 +0,0 @@ ---------------------------------------------------------------------- --- Oracle specific tests and configurations. --- $Id: oci8.lua,v 1.3 2006/05/31 21:43:15 carregal Exp $ ---------------------------------------------------------------------- - -table.insert (CUR_METHODS, "numrows") -table.insert (EXTENSIONS, numrows) - -DEFINITION_STRING_TYPE_NAME = "varchar(60)" -QUERYING_STRING_TYPE_NAME = "string" \ No newline at end of file diff --git a/3rdparty/luasql-2.2.0/tests/odbc.lua b/3rdparty/luasql-2.2.0/tests/odbc.lua deleted file mode 100644 index bf979cbb1a..0000000000 --- a/3rdparty/luasql-2.2.0/tests/odbc.lua +++ /dev/null @@ -1,31 +0,0 @@ ---------------------------------------------------------------------- --- ODBC specific tests and configurations. --- $Id: odbc.lua,v 1.2 2006/01/25 19:54:21 tomas Exp $ ---------------------------------------------------------------------- - -QUERYING_STRING_TYPE_NAME = "string" --- The CREATE_TABLE_RETURN_VALUE and DROP_TABLE_RETURN_VALUE works --- with -1 on MS Acess Driver, and 0 on SQL Server Driver -CREATE_TABLE_RETURN_VALUE = -1 -DROP_TABLE_RETURN_VALUE = -1 - ---------------------------------------------------------------------- --- Test of data types managed by ODBC driver. ---------------------------------------------------------------------- -table.insert (EXTENSIONS, function () - assert2 (CREATE_TABLE_RETURN_VALUE, CONN:execute"create table test_dt (f1 integer, f2 varchar(30), f3 bit )") - -- Inserts a number, a string value and a "bit" value. - assert2 (1, CONN:execute"insert into test_dt values (10, 'ABCDE', 1)") - - -- Checks the results with the inserted values. - local cur = CUR_OK (CONN:execute"select * from test_dt") - local row, err = cur:fetch ({}, "a") - assert2 ("table", type(row), err) - - assert2 (10, row.f1, "Wrong number representation") - assert2 ("ABCDE", row.f2, "Wrong string representation") - assert2 (true, row.f3, "Wrong bit representation") - - -- Drops the table - assert2 (DROP_TABLE_RETURN_VALUE0, CONN:execute("drop table test_dt") ) -end) diff --git a/3rdparty/luasql-2.2.0/tests/performance.lua b/3rdparty/luasql-2.2.0/tests/performance.lua deleted file mode 100644 index 1a2dcde57c..0000000000 --- a/3rdparty/luasql-2.2.0/tests/performance.lua +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/local/bin/lua --- See Copyright Notice in license.html - -TOTAL_ROWS = 200 - ---------------------------------------------------------------------- --- checks for a value and throw an error if it is invalid. ---------------------------------------------------------------------- -function assert2 (expected, value, msg) - if not msg then - msg = '' - else - msg = msg..'\n' - end - return assert (value == expected, - msg.."wrong value (["..tostring(value).."] instead of ".. - tostring(expected)..")") -end - ---------------------------------------------------------------------- --- object test. ---------------------------------------------------------------------- -function test_object (obj, objmethods) - -- checking object type. - assert2 ("userdata", type(obj), "incorrect object type") - -- trying to get metatable. - assert2 ("LuaSQL: you're not allowed to get this metatable", - getmetatable(obj), "error permitting access to object's metatable") - -- trying to set metatable. - assert2 (false, pcall (setmetatable, ENV, {})) - -- checking existence of object's methods. - for i = 1, table.getn (objmethods) do - local method = objmethods[i] - assert2 ("function", type(obj[method])) - end - return obj -end - -ENV_OK = function (obj) - return test_object (obj, { "close", "connect", }) -end -CONN_OK = function (obj) - return test_object (obj, { "close", "commit", "execute", "rollback", "setautocommit", }) -end -CUR_OK = function (obj) - return test_object (obj, { "close", "fetch", "getcolnames", "getcoltypes", }) -end - ---------------------------------------------------------------------- --- Main ---------------------------------------------------------------------- - -if type(arg[1]) ~= "string" then - print (string.format ("Usage %s [ [, [, ]]]", arg[0])) - os.exit() -end - -local driver = arg[1] -local datasource = arg[2] or "luasql-test" -local username = arg[3] or nil -local password = arg[4] or nil - -require (arg[1]) -assert (luasql, "no luasql table") - -local env, err = luasql[driver] () -assert (env, err) -conn, err = env:connect (datasource, username, password) -assert (conn, err) -conn:execute ("drop table fetch_test") --- Create test table -local n, err = conn:execute ([[ - create table fetch_test ( - f1 varchar(30), - f2 varchar(30), - f3 varchar(30), - f4 varchar(30), - f5 varchar(30), - f6 varchar(30), - f7 varchar(30), - f8 varchar(30) - )]]) -assert (n, err) -assert (type(n) == "number", "couldn't create fetch_test table") --- Insert rows -for i = 1, TOTAL_ROWS do - local n, err = conn:execute ( - "insert into fetch_test values ('f1','f2','f3','f4','f5','f6','f7','f8')") - assert (n, err) - assert (type (n) == "number", "couldn't insert rows") -end -print ("table created; rows inserted") - --- default -local cur, err = conn:execute ("select * from fetch_test") -assert (cur, err) ---assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") -local t1 = os.clock() ---for i = 1, cur:numrows() do - --local f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() ---end -local f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() -while f1 do - f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() -end -print ("default: ", os.clock() - t1) -assert (cur:close () == 1, "couldn't close cursor object") - --- using the same table -local cur, err = conn:execute ("select * from fetch_test") -assert (cur, err) ---assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") -t1 = os.clock() -local t = {} ---for i = 1, cur:numrows() do - --t = cur:fetch (t) ---end -t = cur:fetch(t) -while t do - t = cur:fetch(t) -end -print ("same table: ", os.clock() - t1) -assert (cur:close () == 1, "couldn't close cursor object") - --- using the same table with alphanumeric keys -local cur, err = conn:execute ("select * from fetch_test") -assert (cur, err) ---assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") -t1 = os.clock() -local t = {} ---for i = 1, cur:numrows() do - --t = cur:fetch (t,"a") ---end -t = cur:fetch (t, "a") -while t do - t = cur:fetch (t, "a") -end -print ("alpha keys: ", os.clock() - t1) -assert (cur:close () == 1, "couldn't close cursor object") - --- using the same table with numeric and alphanumeric keys -local cur, err = conn:execute ("select * from fetch_test") -assert (cur, err) ---assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") -t1 = os.clock() -local t = {} ---for i = 1, cur:numrows() do - --t = cur:fetch (t,"an") ---end -t = cur:fetch (t, "an") -while t do - t = cur:fetch (t, "an") -end -print ("all keys: ", os.clock() - t1) -assert (cur:close () == 1, "couldn't close cursor object") - --- creating a table -local cur, err = conn:execute ("select * from fetch_test") -assert (cur, err) ---assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") -t1 = os.clock() ---for i = 1, cur:numrows() do - --local t = cur:fetch{} ---end -while cur:fetch{} do -end -print ("new table: ", os.clock() - t1) -assert (cur:close () == 1, "couldn't close cursor object") - -assert (conn:close () == 1, "couldn't close connection object") -assert (env:close () == 1, "couldn't close environment object") diff --git a/3rdparty/luasql-2.2.0/tests/postgres.lua b/3rdparty/luasql-2.2.0/tests/postgres.lua deleted file mode 100644 index 281388bde2..0000000000 --- a/3rdparty/luasql-2.2.0/tests/postgres.lua +++ /dev/null @@ -1,7 +0,0 @@ ---------------------------------------------------------------------- --- PostgreSQL specific tests and configurations. --- $Id: postgres.lua,v 1.2 2006/01/25 19:15:21 tomas Exp $ ---------------------------------------------------------------------- - -table.insert (CUR_METHODS, "numrows") -table.insert (EXTENSIONS, numrows) diff --git a/3rdparty/luasql-2.2.0/tests/sqlite.lua b/3rdparty/luasql-2.2.0/tests/sqlite.lua deleted file mode 100644 index f45cc7c243..0000000000 --- a/3rdparty/luasql-2.2.0/tests/sqlite.lua +++ /dev/null @@ -1,17 +0,0 @@ ---------------------------------------------------------------------- --- SQLite specific tests and configurations. --- $Id: sqlite.lua,v 1.2 2006/05/31 21:43:33 carregal Exp $ ---------------------------------------------------------------------- - ---------------------------------------------------------------------- --- Produces a SQL statement which completely erases a table. --- @param table_name String with the name of the table. --- @return String with SQL statement. ---------------------------------------------------------------------- -function sql_erase_table (table_name) - return string.format ("delete from %s where 1", table_name) -end - -function checkUnknownDatabase(ENV) - -- skip this test -end \ No newline at end of file diff --git a/3rdparty/luasql-2.2.0/tests/sqlite3.lua b/3rdparty/luasql-2.2.0/tests/sqlite3.lua deleted file mode 100644 index 1da81baaa1..0000000000 --- a/3rdparty/luasql-2.2.0/tests/sqlite3.lua +++ /dev/null @@ -1,19 +0,0 @@ ---------------------------------------------------------------------- --- SQLite specific tests and configurations. --- $Id: sqlite3.lua,v 1.2 2007/10/16 15:42:50 carregal Exp $ ---------------------------------------------------------------------- - -DROP_TABLE_RETURN_VALUE = 1 - ---------------------------------------------------------------------- --- Produces a SQL statement which completely erases a table. --- @param table_name String with the name of the table. --- @return String with SQL statement. ---------------------------------------------------------------------- -function sql_erase_table (table_name) - return string.format ("delete from %s where 1", table_name) -end - -function checkUnknownDatabase(ENV) - -- skip this test -end \ No newline at end of file diff --git a/3rdparty/luasql-2.2.0/tests/test.lua b/3rdparty/luasql-2.2.0/tests/test.lua deleted file mode 100644 index ebccbc2411..0000000000 --- a/3rdparty/luasql-2.2.0/tests/test.lua +++ /dev/null @@ -1,676 +0,0 @@ -#!/usr/local/bin/lua5.1 --- See Copyright Notice in license.html --- $Id: test.lua,v 1.52 2008/06/30 10:43:03 blumf Exp $ - -TOTAL_FIELDS = 40 -TOTAL_ROWS = 40 --unused - -DEFINITION_STRING_TYPE_NAME = "text" -QUERYING_STRING_TYPE_NAME = "text" - -CREATE_TABLE_RETURN_VALUE = 0 -DROP_TABLE_RETURN_VALUE = 0 - -MSG_CURSOR_NOT_CLOSED = "cursor was not automatically closed by fetch" - -CHECK_GETCOL_INFO_TABLES = true - ---------------------------------------------------------------------- --- Creates a table that can handle differing capitalization of field --- names --- @return A table with altered metatable ---------------------------------------------------------------------- -local mt = { - __index = function(t, i) - if type(i) == "string" then - return rawget(t, string.upper(i)) or rawget(t, string.lower(i)) - end - - return rawget(t, i) - end -} -function fetch_table () - return setmetatable({}, mt) -end - ---------------------------------------------------------------------- --- Produces a SQL statement which completely erases a table. --- @param table_name String with the name of the table. --- @return String with SQL statement. ---------------------------------------------------------------------- -function sql_erase_table (table_name) - return string.format ("delete from %s", table_name) -end - ---------------------------------------------------------------------- --- checks for a value and throw an error if it is invalid. ---------------------------------------------------------------------- -function assert2 (expected, value, msg) - if not msg then - msg = '' - else - msg = msg..'\n' - end - return assert (value == expected, - msg.."wrong value ("..tostring(value).." instead of ".. - tostring(expected)..")") -end - ---------------------------------------------------------------------- --- Shallow compare of two tables ---------------------------------------------------------------------- -function table_compare(t1, t2) - if t1 == t2 then return true; end - - for i, v in pairs(t1) do - if t2[i] ~= v then return false; end - end - - for i, v in pairs(t2) do - if t1[i] ~= v then return false; end - end - - return true -end - ---------------------------------------------------------------------- --- object test. ---------------------------------------------------------------------- -function test_object (obj, objmethods) - -- checking object type. - assert2 (true, type(obj) == "userdata" or type(obj) == "table", "incorrect object type") - - -- trying to get metatable. - assert2 ("LuaSQL: you're not allowed to get this metatable", - getmetatable(obj), "error permitting access to object's metatable") - -- trying to set metatable. - assert2 (false, pcall (setmetatable, ENV, {})) - -- checking existence of object's methods. - for i = 1, table.getn (objmethods) do - local method = obj[objmethods[i]] - assert2 ("function", type(method)) - assert2 (false, pcall (method), "no 'self' parameter accepted") - end - return obj -end - -ENV_METHODS = { "close", "connect", } -ENV_OK = function (obj) - return test_object (obj, ENV_METHODS) -end -CONN_METHODS = { "close", "commit", "execute", "rollback", "setautocommit", } -CONN_OK = function (obj) - return test_object (obj, CONN_METHODS) -end -CUR_METHODS = { "close", "fetch", "getcolnames", "getcoltypes", } -CUR_OK = function (obj) - return test_object (obj, CUR_METHODS) -end - -function checkUnknownDatabase(ENV) - assert2 (nil, ENV:connect ("/unknown-data-base"), "this should be an error") -end - ---------------------------------------------------------------------- --- basic checking test. ---------------------------------------------------------------------- -function basic_test () - -- Check environment object. - ENV = ENV_OK (luasql[driver] ()) - assert2 (true, ENV:close(), "couldn't close environment") - -- trying to connect with a closed environment. - assert2 (false, pcall (ENV.connect, ENV, datasource, username, password), - "error connecting with a closed environment") - -- it is ok to close a closed object, but false is returned instead of true. - assert2 (false, ENV:close()) - -- Reopen the environment. - ENV = ENV_OK (luasql[driver] ()) - -- Check connection object. - local conn, err = ENV:connect (datasource, username, password) - assert (conn, (err or '').." ("..datasource..")") - CONN_OK (conn) - assert2 (true, conn:close(), "couldn't close connection") - -- trying to execute a statement with a closed connection. - assert2 (false, pcall (conn.execute, conn, "create table x (c char)"), - "error while executing through a closed connection") - -- it is ok to close a closed object, but false is returned instead of true. - assert2 (false, conn:close()) - -- Check error situation. - checkUnknownDatabase(ENV) - - -- force garbage collection - local a = {} - setmetatable(a, {__mode="v"}) - a.ENV = ENV_OK (luasql[driver] ()) - a.CONN = a.ENV:connect (datasource, username, password) - collectgarbage () - collectgarbage () - assert2(nil, a.ENV, "environment not collected") - assert2(nil, a.CONN, "connection not collected") -end - ---------------------------------------------------------------------- --- Build SQL command to create the test table. ---------------------------------------------------------------------- -function define_table (n) - local t = {} - for i = 1, n do - table.insert (t, "f"..i.." "..DEFINITION_STRING_TYPE_NAME) - end - return "create table t ("..table.concat (t, ',')..")" -end - - ---------------------------------------------------------------------- --- Create a table with TOTAL_FIELDS character fields. ---------------------------------------------------------------------- -function create_table () - -- Check SQL statements. - CONN = CONN_OK (ENV:connect (datasource, username, password)) - -- Create t. - local cmd = define_table(TOTAL_FIELDS) - assert2 (CREATE_TABLE_RETURN_VALUE, CONN:execute (cmd)) -end - ---------------------------------------------------------------------- --- Fetch 2 values. ---------------------------------------------------------------------- -function fetch2 () - -- insert a record. - assert2 (1, CONN:execute ("insert into t (f1, f2) values ('b', 'c')")) - -- retrieve data. - local cur = CUR_OK (CONN:execute ("select f1, f2, f3 from t")) - -- check data. - local f1, f2, f3 = cur:fetch() - assert2 ('b', f1) - assert2 ('c', f2) - assert2 (nil, f3) - assert2 (nil, cur:fetch()) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - -- insert a second record. - assert2 (1, CONN:execute ("insert into t (f1, f2) values ('d', 'e')")) - cur = CUR_OK (CONN:execute ("select f1, f2, f3 from t order by f1")) - local f1, f2, f3 = cur:fetch() - assert2 ('b', f1, f2) -- f2 can be an error message - assert2 ('c', f2) - assert2 (nil, f3) - f1, f2, f3 = cur:fetch() - assert2 ('d', f1, f2) -- f2 can be an error message - assert2 ('e', f2) - assert2 (nil, f3) - assert2 (nil, cur:fetch()) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - -- remove records. - assert2 (2, CONN:execute ("delete from t where f1 in ('b', 'd')")) -end - ---------------------------------------------------------------------- --- Test fetch with a new table, reusing a table and with different --- indexing. ---------------------------------------------------------------------- -function fetch_new_table () - -- insert elements. - assert2 (1, CONN:execute ("insert into t (f1, f2, f3, f4) values ('a', 'b', 'c', 'd')")) - assert2 (1, CONN:execute ("insert into t (f1, f2, f3, f4) values ('f', 'g', 'h', 'i')")) - -- retrieve data using a new table. - local cur = CUR_OK (CONN:execute ("select f1, f2, f3, f4 from t order by f1")) - local row, err = cur:fetch(fetch_table()) - assert2 (type(row), "table", err) - assert2 ('a', row[1]) - assert2 ('b', row[2]) - assert2 ('c', row[3]) - assert2 ('d', row[4]) - assert2 (nil, row.f1) - assert2 (nil, row.f2) - assert2 (nil, row.f3) - assert2 (nil, row.f4) - row, err = cur:fetch(fetch_table()) - assert (type(row), "table", err) - assert2 ('f', row[1]) - assert2 ('g', row[2]) - assert2 ('h', row[3]) - assert2 ('i', row[4]) - assert2 (nil, row.f1) - assert2 (nil, row.f2) - assert2 (nil, row.f3) - assert2 (nil, row.f4) - assert2 (nil, cur:fetch{}) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - - -- retrieve data reusing the same table. - io.write ("reusing a table...") - cur = CUR_OK (CONN:execute ("select f1, f2, f3, f4 from t order by f1")) - local row, err = cur:fetch(fetch_table()) - assert (type(row), "table", err) - assert2 ('a', row[1]) - assert2 ('b', row[2]) - assert2 ('c', row[3]) - assert2 ('d', row[4]) - assert2 (nil, row.f1) - assert2 (nil, row.f2) - assert2 (nil, row.f3) - assert2 (nil, row.f4) - row, err = cur:fetch (row) - assert (type(row), "table", err) - assert2 ('f', row[1]) - assert2 ('g', row[2]) - assert2 ('h', row[3]) - assert2 ('i', row[4]) - assert2 (nil, row.f1) - assert2 (nil, row.f2) - assert2 (nil, row.f3) - assert2 (nil, row.f4) - assert2 (nil, cur:fetch(fetch_table())) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - - -- retrieve data reusing the same table with alphabetic indexes. - io.write ("with alpha keys...") - cur = CUR_OK (CONN:execute ("select f1, f2, f3, f4 from t order by f1")) - local row, err = cur:fetch (fetch_table(), "a") - assert (type(row), "table", err) - assert2 (nil, row[1]) - assert2 (nil, row[2]) - assert2 (nil, row[3]) - assert2 (nil, row[4]) - assert2 ('a', row.f1) - assert2 ('b', row.f2) - assert2 ('c', row.f3) - assert2 ('d', row.f4) - row, err = cur:fetch (row, "a") - assert2 (type(row), "table", err) - assert2 (nil, row[1]) - assert2 (nil, row[2]) - assert2 (nil, row[3]) - assert2 (nil, row[4]) - assert2 ('f', row.f1) - assert2 ('g', row.f2) - assert2 ('h', row.f3) - assert2 ('i', row.f4) - assert2 (nil, cur:fetch(row, "a")) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - - -- retrieve data reusing the same table with both indexes. - io.write ("with both keys...") - cur = CUR_OK (CONN:execute ("select f1, f2, f3, f4 from t order by f1")) - local row, err = cur:fetch (fetch_table(), "an") - assert (type(row), "table", err) - assert2 ('a', row[1]) - assert2 ('b', row[2]) - assert2 ('c', row[3]) - assert2 ('d', row[4]) - assert2 ('a', row.f1) - assert2 ('b', row.f2) - assert2 ('c', row.f3) - assert2 ('d', row.f4) - row, err = cur:fetch (row, "an") - assert (type(row), "table", err) - assert2 ('f', row[1]) - assert2 ('g', row[2]) - assert2 ('h', row[3]) - assert2 ('i', row[4]) - assert2 ('f', row.f1) - assert2 ('g', row.f2) - assert2 ('h', row.f3) - assert2 ('i', row.f4) - assert2 (nil, cur:fetch(row, "an")) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - assert2 (false, cur:close()) - -- clean the table. - assert2 (2, CONN:execute ("delete from t where f1 in ('a', 'f')")) -end - ---------------------------------------------------------------------- --- Fetch many values ---------------------------------------------------------------------- -function fetch_many () - -- insert values. - local fields, values = "f1", "'v1'" - for i = 2, TOTAL_FIELDS do - fields = string.format ("%s,f%d", fields, i) - values = string.format ("%s,'v%d'", values, i) - end - local cmd = string.format ("insert into t (%s) values (%s)", - fields, values) - assert2 (1, CONN:execute (cmd)) - -- fetch values (without a table). - local cur = CUR_OK (CONN:execute ("select * from t where f1 = 'v1'")) - local row = { cur:fetch () } - assert2 ("string", type(row[1]), "error while trying to fetch many values (without a table)") - for i = 1, TOTAL_FIELDS do - assert2 ('v'..i, row[i]) - end - assert2 (nil, cur:fetch (row)) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - -- fetch values (with a table and default indexing). - io.write ("with a table...") - local cur = CUR_OK (CONN:execute ("select * from t where f1 = 'v1'")) - local row = cur:fetch(fetch_table()) - assert2 ("string", type(row[1]), "error while trying to fetch many values (default indexing)") - for i = 1, TOTAL_FIELDS do - assert2 ('v'..i, row[i]) - end - assert2 (nil, cur:fetch (row)) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - -- fetch values (with numbered indexes on a table). - io.write ("with numbered keys...") - local cur = CUR_OK (CONN:execute ("select * from t where f1 = 'v1'")) - local row = cur:fetch (fetch_table(), "n") - assert2 ("string", type(row[1]), "error while trying to fetch many values (numbered indexes)") - for i = 1, TOTAL_FIELDS do - assert2 ('v'..i, row[i]) - end - assert2 (nil, cur:fetch (row)) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - -- fetch values (with alphanumeric indexes on a table). - io.write ("with alpha keys...") - local cur = CUR_OK (CONN:execute ("select * from t where f1 = 'v1'")) - local row = cur:fetch (fetch_table(), "a") - assert2 ("string", type(row.f1), "error while trying to fetch many values (alphanumeric indexes)") - for i = 1, TOTAL_FIELDS do - assert2 ('v'..i, row['f'..i]) - end - assert2 (nil, cur:fetch (row)) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - -- fetch values (with both indexes on a table). - io.write ("with both keys...") - local cur = CUR_OK (CONN:execute ("select * from t where f1 = 'v1'")) - local row = cur:fetch (fetch_table(), "na") - assert2 ("string", type(row[1]), "error while trying to fetch many values (both indexes)") - assert2 ("string", type(row.f1), "error while trying to fetch many values (both indexes)") - for i = 1, TOTAL_FIELDS do - assert2 ('v'..i, row[i]) - assert2 ('v'..i, row['f'..i]) - end - assert2 (nil, cur:fetch (row)) - assert2 (false, cur:close(), MSG_CURSOR_NOT_CLOSED) - -- clean the table. - assert2 (1, CONN:execute ("delete from t where f1 = 'v1'")) -end - ---------------------------------------------------------------------- ---------------------------------------------------------------------- -function rollback () - -- begin transaction - assert2 (true, CONN:setautocommit (false), "couldn't disable autocommit") - -- insert a record and commit the operation. - assert2 (1, CONN:execute ("insert into t (f1) values ('a')")) - local cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (1, tonumber (cur:fetch ()), "Insert failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - assert2 (true, CONN:commit(), "couldn't commit transaction") - -- insert a record and roll back the operation. - assert2 (1, CONN:execute ("insert into t (f1) values ('b')")) - local cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (2, tonumber (cur:fetch ()), "Insert failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - assert2 (true, CONN:rollback (), "couldn't roolback transaction") - -- check resulting table with one record. - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (1, tonumber(cur:fetch()), "Rollback failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - -- delete a record and roll back the operation. - assert2 (1, CONN:execute ("delete from t where f1 = 'a'")) - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (0, tonumber(cur:fetch())) - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - assert2 (true, CONN:rollback (), "couldn't roolback transaction") - -- check resulting table with one record. - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (1, tonumber(cur:fetch()), "Rollback failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) ---[[ - -- insert a second record and turn on the auto-commit mode. - -- this will produce a rollback on PostgreSQL and a commit on ODBC. - -- what to do? - assert2 (1, CONN:execute ("insert into t (f1) values ('b')")) - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (2, tonumber (cur:fetch ()), "Insert failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - assert2 (true, CONN:setautocommit (true), "couldn't enable autocommit") - -- check resulting table with one record. - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (1, tonumber(cur:fetch()), "Rollback failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) ---]] - -- clean the table. - assert2 (1, CONN:execute (sql_erase_table"t")) - assert2 (true, CONN:commit (), "couldn't commit transaction") - assert2 (true, CONN:setautocommit (true), "couldn't enable autocommit") - -- check resulting table with no records. - cur = CUR_OK (CONN:execute ("select count(*) from t")) - assert2 (0, tonumber(cur:fetch()), "Rollback failed") - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) -end - ---------------------------------------------------------------------- --- Get column names and types. ---------------------------------------------------------------------- -function column_info () - -- insert elements. - assert2 (1, CONN:execute ("insert into t (f1, f2, f3, f4) values ('a', 'b', 'c', 'd')")) - local cur = CUR_OK (CONN:execute ("select f1,f2,f3,f4 from t")) - -- get column information. - local names, types = cur:getcolnames(), cur:getcoltypes() - assert2 ("table", type(names), "getcolnames failed") - assert2 ("table", type(types), "getcoltypes failed") - assert2 (4, table.getn(names), "incorrect column names table") - assert2 (4, table.getn(types), "incorrect column types table") - for i = 1, table.getn(names) do - assert2 ("f"..i, string.lower(names[i]), "incorrect column names table") - local type_i = types[i] - assert (type_i == QUERYING_STRING_TYPE_NAME, "incorrect column types table") - end - -- check if the tables are being reused. - local n2, t2 = cur:getcolnames(), cur:getcoltypes() - if CHECK_GETCOL_INFO_TABLES then - assert2 (names, n2, "getcolnames is rebuilding the table") - assert2 (types, t2, "getcoltypes is rebuilding the table") - else - assert2 (true, table_compare(names, n2), "getcolnames is inconsistent") - assert2 (true, table_compare(types, t2), "getcoltypes is inconsistent") - end - assert2 (true, cur:close(), "couldn't close cursor") - assert2 (false, cur:close()) - -- clean the table. - assert2 (1, CONN:execute ("delete from t where f1 = 'a'")) -end - ---------------------------------------------------------------------- --- Escaping strings ---------------------------------------------------------------------- -function escape () - local escaped = CONN:escape"a'b'c'd" - assert ("a\\'b\\'c\\'d" == escaped or "a''b''c''d" == escaped) -end - ---------------------------------------------------------------------- ---------------------------------------------------------------------- -function check_close() - -- an object with references to it can't be closed - local cmd = "select * from t" - local cur = CUR_OK(CONN:execute (cmd)) - assert2 (true, cur:close(), "couldn't close cursor") - - -- force garbage collection - local a = {} - setmetatable(a, {__mode="v"}) - a.CONN = ENV:connect (datasource, username, password) - cur = CUR_OK(a.CONN:execute (cmd)) - - collectgarbage () - collectgarbage () - CONN_OK (a.CONN) - a.cur = cur - a.cur:close() - a.CONN:close() - cur = nil - collectgarbage () - assert2(nil, a.cur, "cursor not collected") - collectgarbage () - assert2(nil, a.CONN, "connection not collected") - - -- check cursor integrity after trying to close a connection - local conn = CONN_OK (ENV:connect (datasource, username, password)) - assert2 (1, conn:execute"insert into t (f1) values (1)", "could not insert a new record") - local cur = CUR_OK (conn:execute (cmd)) - local ok, err = pcall (conn.close, conn) - CUR_OK (cur) - assert (cur:fetch(), "corrupted cursor") - cur:close () - conn:close () -end - ---------------------------------------------------------------------- ---------------------------------------------------------------------- -function drop_table () - assert2 (true, CONN:setautocommit(true), "couldn't enable autocommit") - -- Postgres retorns 0, ODBC retorns -1, sqlite returns 1 - assert2 (DROP_TABLE_RETURN_VALUE, CONN:execute ("drop table t")) -end - ---------------------------------------------------------------------- ---------------------------------------------------------------------- -function close_conn () - assert (true, CONN:close()) - assert (true, ENV:close()) -end - ---------------------------------------------------------------------- --- Testing Extensions ---------------------------------------------------------------------- -EXTENSIONS = { -} -function extensions_test () - for i, f in ipairs (EXTENSIONS) do - f () - end -end - ---------------------------------------------------------------------- --- Testing numrows method. --- This is not a default test, it must be added to the extensions --- table to be executed. ---------------------------------------------------------------------- -function numrows() - local cur = CUR_OK(CONN:execute"select * from t") - assert2(0,cur:numrows()) - cur:close() - - -- Inserts one row. - assert2 (1, CONN:execute"insert into t (f1) values ('a')", "could not insert a new record") - cur = CUR_OK(CONN:execute"select * from t") - assert2(1,cur:numrows()) - cur:close() - - -- Inserts three more rows (total = 4). - assert2 (1, CONN:execute"insert into t (f1) values ('b')", "could not insert a new record") - assert2 (1, CONN:execute"insert into t (f1) values ('c')", "could not insert a new record") - assert2 (1, CONN:execute"insert into t (f1) values ('d')", "could not insert a new record") - cur = CUR_OK(CONN:execute"select * from t") - assert2(4,cur:numrows()) - cur:close() - - -- Deletes one row - assert2(1, CONN:execute"delete from t where f1 = 'a'", "could not delete the specified row") - cur = CUR_OK(CONN:execute"select * from t") - assert2(3,cur:numrows()) - cur:close() - - -- Deletes all rows - assert2 (3, CONN:execute (sql_erase_table"t")) - cur = CUR_OK(CONN:execute"select * from t") - assert2(0,cur:numrows()) - cur:close() - - io.write (" numrows") -end - - ---------------------------------------------------------------------- --- Main ---------------------------------------------------------------------- - -if type(arg[1]) ~= "string" then - print (string.format ("Usage %s [ [, [, ]]]", arg[0])) - os.exit() -end - -driver = arg[1] -datasource = arg[2] or "luasql-test" -username = arg[3] or nil -password = arg[4] or nil - --- Loading driver specific functions -if arg[0] then - local path = string.gsub (arg[0], "^([^/]*%/).*$", "%1") - if path == "test.lua" then - path = "" - end - local file = path..driver..".lua" - local f, err = loadfile (file) - if not f then - print ("LuaSQL test: couldn't find driver-specific test file (".. - file..").\nProceeding with general test") - else - f () - end -end - --- Complete set of tests -tests = { - { "basic checking", basic_test }, - { "create table", create_table }, - { "fetch two values", fetch2 }, - { "fetch new table", fetch_new_table }, - { "fetch many", fetch_many }, - { "rollback", rollback }, - { "get column information", column_info }, - { "escape", escape }, - { "extensions", extensions_test }, - { "close objects", check_close }, - { "drop table", drop_table }, - { "close connection", close_conn }, -} - -require ("luasql."..driver) -assert (luasql, "Could not load driver: no luasql table.") -io.write (luasql._VERSION.." "..driver.." driver test. "..luasql._COPYRIGHT.."\n") - -for i = 1, table.getn (tests) do - local t = tests[i] - io.write (t[1].." ...") - local ok, err = xpcall (t[2], debug.traceback) - if not ok then - io.write ("\n"..err) - io.write"\n... trying to drop test table ..." - local ok, err = pcall (drop_table) - if not ok then - io.write (" failed: "..err) - else - io.write" OK !\n... and to close the connection ..." - local ok, err = pcall (close_conn) - if not ok then - io.write (" failed: "..err) - else - io.write" OK !" - end - end - io.write"\nThe test failed!\n" - return - end - io.write (" OK !\n") -end -io.write ("The test passed!\n") diff --git a/3rdparty/luasql-2.2.0/vc6/def.tmpl b/3rdparty/luasql-2.2.0/vc6/def.tmpl deleted file mode 100644 index ebe06db4f7..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/def.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY DRIVER.dll -VERSION VERSION_NUMBER -EXPORTS -luaopen_luasqlDRIVER diff --git a/3rdparty/luasql-2.2.0/vc6/luasql.dsw b/3rdparty/luasql-2.2.0/vc6/luasql.dsw deleted file mode 100644 index e4e2dbee4e..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasql.dsw +++ /dev/null @@ -1,101 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "luasqlmysql40_dll"=.\luasqlmysql40_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqlmysql41_dll"=.\luasqlmysql41_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqlmysql50_dll"=.\luasqlmysql50_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqloci8_dll"=.\luasqloci8_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqlodbc_dll"=.\luasqlodbc_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqlpostgres_dll"=.\luasqlpostgres_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "luasqlsqlite_dll"=.\luasqlsqlite_dll.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlmysql40_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlmysql40_dll.dsp deleted file mode 100644 index 4efa6c427c..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlmysql40_dll.dsp +++ /dev/null @@ -1,127 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlmysql40_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlmysql40_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql40_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql40_dll.mak" CFG="luasqlmysql40_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlmysql40_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlmysql40_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlmysql40_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlmysql40_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql40_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.0.26-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql40.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.0.26-win32/lib/opt" - -!ELSEIF "$(CFG)" == "luasqlmysql40_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql40_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.0.26-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql40d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.0.26-win32/lib/debug" - -!ENDIF - -# Begin Target - -# Name "luasqlmysql40_dll - Win32 Release" -# Name "luasqlmysql40_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_mysql.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\mysql.def -# End Source File -# Begin Source File - -SOURCE=.\mysql40.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlmysql41_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlmysql41_dll.dsp deleted file mode 100644 index 207c04619a..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlmysql41_dll.dsp +++ /dev/null @@ -1,131 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlmysql41_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlmysql41_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql41_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql41_dll.mak" CFG="luasqlmysql41_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlmysql41_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlmysql41_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlmysql41_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlmysql41_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql41_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.1.16-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql41.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.1.16-win32/lib/opt" - -!ELSEIF "$(CFG)" == "luasqlmysql41_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql41_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.1.16-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql41d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.1.16-win32/lib/debug" - -!ENDIF - -# Begin Target - -# Name "luasqlmysql41_dll - Win32 Release" -# Name "luasqlmysql41_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_mysql.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\mysql.def -# End Source File -# Begin Source File - -SOURCE=.\mysql41.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlmysql50_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlmysql50_dll.dsp deleted file mode 100644 index 4a38b98730..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlmysql50_dll.dsp +++ /dev/null @@ -1,131 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlmysql50_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlmysql50_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql50_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlmysql50_dll.mak" CFG="luasqlmysql50_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlmysql50_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlmysql50_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlmysql50_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlmysql50_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql50_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-5.0.20a-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql50.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-5.0.20a-win32/lib/opt" - -!ELSEIF "$(CFG)" == "luasqlmysql50_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlmysql50_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-5.0.20a-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql50d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-5.0.20a-win32/lib/debug" - -!ENDIF - -# Begin Target - -# Name "luasqlmysql50_dll - Win32 Release" -# Name "luasqlmysql50_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_mysql.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\mysql.def -# End Source File -# Begin Source File - -SOURCE=.\mysql50.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqloci8_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqloci8_dll.dsp deleted file mode 100644 index 278d2676c0..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqloci8_dll.dsp +++ /dev/null @@ -1,127 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqloci8_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqloci8_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqloci8_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqloci8_dll.mak" CFG="luasqloci8_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqloci8_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqloci8_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqloci8_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqloci8_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqloci8_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/oci8/oci/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib oci.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/oci8.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/oci8/oci/lib/msvc" - -!ELSEIF "$(CFG)" == "luasqloci8_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqloci8_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/oci8/oci/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib oci.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/oci8d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/oci8/oci/lib/msvc" - -!ENDIF - -# Begin Target - -# Name "luasqloci8_dll - Win32 Release" -# Name "luasqloci8_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_oci8.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\oci8.def -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlodbc_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlodbc_dll.dsp deleted file mode 100644 index c454c3117b..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlodbc_dll.dsp +++ /dev/null @@ -1,127 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlodbc_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlodbc_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlodbc_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlodbc_dll.mak" CFG="luasqlodbc_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlodbc_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlodbc_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlodbc_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlodbc_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlodbc_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/odbc.dll" /libpath:"../../external-src/lua50/lib/dll" - -!ELSEIF "$(CFG)" == "luasqlodbc_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlodbc_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/odbcd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" - -!ENDIF - -# Begin Target - -# Name "luasqlodbc_dll - Win32 Release" -# Name "luasqlodbc_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_odbc.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\odbc.def -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlpostgres_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlpostgres_dll.dsp deleted file mode 100644 index fcf2c3bc1d..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlpostgres_dll.dsp +++ /dev/null @@ -1,127 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlpostgres_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlpostgres_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlpostgres_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlpostgres_dll.mak" CFG="luasqlpostgres_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlpostgres_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlpostgres_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlpostgres_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlpostgres_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlpostgres_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/postgresql-7.4.12/src/include" /I "../../external-src/postgresql-7.4.12/src/interfaces/libpq" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib libpq.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/postgres.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/postgresql-7.4.12/src/interfaces/libpq/Release" - -!ELSEIF "$(CFG)" == "luasqlpostgres_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlpostgres_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/postgresql-7.4.12/src/include" /I "../../external-src/postgresql-7.4.12/src/interfaces/libpq" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib libpq.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/postgresd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/postgresql-7.4.12/src/interfaces/libpq/Release" - -!ENDIF - -# Begin Target - -# Name "luasqlpostgres_dll - Win32 Release" -# Name "luasqlpostgres_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_postgres.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\postgres.def -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/luasqlsqlite_dll.dsp b/3rdparty/luasql-2.2.0/vc6/luasqlsqlite_dll.dsp deleted file mode 100644 index bc6827e215..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/luasqlsqlite_dll.dsp +++ /dev/null @@ -1,303 +0,0 @@ -# Microsoft Developer Studio Project File - Name="luasqlsqlite_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=luasqlsqlite_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "luasqlsqlite_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "luasqlsqlite_dll.mak" CFG="luasqlsqlite_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "luasqlsqlite_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "luasqlsqlite_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "luasqlsqlite_dll" -# PROP Scc_LocalPath ".." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "luasqlsqlite_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlsqlite_dll/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlsqlite_dll_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/sqlite-2.8.17" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlsqlite_dll_EXPORTS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "NDEBUG" -# ADD RSC /l 0x416 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 -# ADD LINK32 lua50.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/sqlite.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/sqlite-2.8.15/lib/opt" - -!ELSEIF "$(CFG)" == "luasqlsqlite_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../lib/vc6/luasql" -# PROP Intermediate_Dir "luasqlsqlite_dll/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlsqlite_dll_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/sqlite-2.8.17" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlsqlite_dll_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x416 /d "_DEBUG" -# ADD RSC /l 0x416 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 lua50.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/sqlited.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/sqlite-2.8.17/lib/debug" - -!ENDIF - -# Begin Target - -# Name "luasqlsqlite_dll - Win32 Release" -# Name "luasqlsqlite_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.c" -# End Source File -# Begin Source File - -SOURCE=..\src\ls_sqlite.c -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.c -# End Source File -# Begin Source File - -SOURCE=.\sqlite.def -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\compat\src\compat-5.1.h" -# End Source File -# Begin Source File - -SOURCE=..\src\luasql.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Group "sqllite Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\attach.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\auth.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\btree.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\btree.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\btree_rb.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\build.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\config.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\copy.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\date.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\delete.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\encode.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\expr.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\func.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\hash.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\hash.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\insert.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\main.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\opcodes.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\opcodes.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\os.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\os.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\pager.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\pager.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\parse.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\parse.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\pragma.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\printf.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\random.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\select.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\shell.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\sqlite.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\sqliteInt.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\table.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\tokenize.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\trigger.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\update.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\util.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\vacuum.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\vdbe.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\vdbe.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\vdbeaux.c" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\vdbeInt.h" -# End Source File -# Begin Source File - -SOURCE="..\..\external-src\sqlite-2.8.17\where.c" -# End Source File -# End Group -# End Target -# End Project diff --git a/3rdparty/luasql-2.2.0/vc6/mysql.def b/3rdparty/luasql-2.2.0/vc6/mysql.def deleted file mode 100644 index 3e157be6ba..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/mysql.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY mysql.dll -DESCRIPTION "LuaSQL driver for mysql" -EXPORTS -luaopen_luasqlmysql diff --git a/3rdparty/luasql-2.2.0/vc6/mysql40.rc b/3rdparty/luasql-2.2.0/vc6/mysql40.rc deleted file mode 100644 index aaead67e83..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/mysql40.rc +++ /dev/null @@ -1,109 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Portuguese (Brazil) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PTB) -#ifdef _WIN32 -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x21L -#else - FILEFLAGS 0x20L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "MySQL 4.0.24\0" - VALUE "CompanyName", "Kepler\0" - VALUE "FileDescription", "mysql40\0" - VALUE "FileVersion", "2, 0, 2, 0\0" - VALUE "InternalName", "mysql40\0" - VALUE "LegalCopyright", "Copyright © 2006\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "mysql40.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "LuaSQL MySQL Driver\0" - VALUE "ProductVersion", "2, 0, 2, 0\0" - VALUE "SpecialBuild", "Kepler Project\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Portuguese (Brazil) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/3rdparty/luasql-2.2.0/vc6/mysql41.rc b/3rdparty/luasql-2.2.0/vc6/mysql41.rc deleted file mode 100644 index 4bb3dffc23..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/mysql41.rc +++ /dev/null @@ -1,109 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Portuguese (Brazil) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PTB) -#ifdef _WIN32 -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x21L -#else - FILEFLAGS 0x20L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "MySQL 4.1.16\0" - VALUE "CompanyName", "Kepler\0" - VALUE "FileDescription", "mysql41\0" - VALUE "FileVersion", "2, 0, 2, 0\0" - VALUE "InternalName", "mysql41\0" - VALUE "LegalCopyright", "Copyright © 2006\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "mysql41.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "LuaSQL MySQL Driver\0" - VALUE "ProductVersion", "2, 0, 2, 0\0" - VALUE "SpecialBuild", "Kepler Project\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Portuguese (Brazil) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/3rdparty/luasql-2.2.0/vc6/mysql50.rc b/3rdparty/luasql-2.2.0/vc6/mysql50.rc deleted file mode 100644 index 9968fe399d..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/mysql50.rc +++ /dev/null @@ -1,109 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Portuguese (Brazil) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PTB) -#ifdef _WIN32 -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x21L -#else - FILEFLAGS 0x20L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "MySQL 5.0.20a\0" - VALUE "CompanyName", "Kepler\0" - VALUE "FileDescription", "mysql50\0" - VALUE "FileVersion", "2, 0, 2, 0\0" - VALUE "InternalName", "mysql50\0" - VALUE "LegalCopyright", "Copyright © 2006\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "mysql50.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "LuaSQL MySQL Driver\0" - VALUE "ProductVersion", "2, 0, 2, 0\0" - VALUE "SpecialBuild", "Kepler Project\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Portuguese (Brazil) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/3rdparty/luasql-2.2.0/vc6/oci8.def b/3rdparty/luasql-2.2.0/vc6/oci8.def deleted file mode 100644 index cfefb12cb6..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/oci8.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY oci8.dll -DESCRIPTION "LuaSQL driver for oci8 (Oracle)" -EXPORTS -luaopen_luasqloci8 diff --git a/3rdparty/luasql-2.2.0/vc6/odbc.def b/3rdparty/luasql-2.2.0/vc6/odbc.def deleted file mode 100644 index 982a60c42a..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/odbc.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY odbc.dll -DESCRIPTION "LuaSQL driver for odbc" -EXPORTS -luaopen_luasqlodbc diff --git a/3rdparty/luasql-2.2.0/vc6/postgres.def b/3rdparty/luasql-2.2.0/vc6/postgres.def deleted file mode 100644 index 3751892fd2..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/postgres.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY postgres.dll -DESCRIPTION "LuaSQL driver for postgres" -EXPORTS -luaopen_luasqlpostgres diff --git a/3rdparty/luasql-2.2.0/vc6/postgres.rc b/3rdparty/luasql-2.2.0/vc6/postgres.rc deleted file mode 100644 index 54f92eb14a..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/postgres.rc +++ /dev/null @@ -1,109 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Portuguese (Brazil) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PTB) -#ifdef _WIN32 -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x21L -#else - FILEFLAGS 0x20L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Postgresql 7.4.6\0" - VALUE "CompanyName", "Ideais\0" - VALUE "FileDescription", "postgres\0" - VALUE "FileVersion", "2, 0, 2, 0\0" - VALUE "InternalName", "postgres\0" - VALUE "LegalCopyright", "Copyright © 2006\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "postgres.dll\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "LuaSQL Postgresql Driver\0" - VALUE "ProductVersion", "2, 0, 2, 0\0" - VALUE "SpecialBuild", "Kepler Project\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // !_MAC - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Portuguese (Brazil) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/3rdparty/luasql-2.2.0/vc6/resource.h b/3rdparty/luasql-2.2.0/vc6/resource.h deleted file mode 100644 index 4f45185089..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/resource.h +++ /dev/null @@ -1,15 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by mysql40.rc -// - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/3rdparty/luasql-2.2.0/vc6/sqlite.def b/3rdparty/luasql-2.2.0/vc6/sqlite.def deleted file mode 100644 index 9c423105d4..0000000000 --- a/3rdparty/luasql-2.2.0/vc6/sqlite.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY sqlite.dll -DESCRIPTION "LuaSQL driver for sqlite" -EXPORTS -luaopen_luasqlsqlite diff --git a/3rdparty/openssl-1.0.0d/ACKNOWLEDGMENTS b/3rdparty/openssl-1.0.0d/ACKNOWLEDGMENTS deleted file mode 100755 index fb6dd912c4..0000000000 --- a/3rdparty/openssl-1.0.0d/ACKNOWLEDGMENTS +++ /dev/null @@ -1,25 +0,0 @@ -The OpenSSL project depends on volunteer efforts and financial support from -the end user community. That support comes in the form of donations and paid -sponsorships, software support contracts, paid consulting services -and commissioned software development. - -Since all these activities support the continued development and improvement -of OpenSSL we consider all these clients and customers as sponsors of the -OpenSSL project. - -We would like to identify and thank the following such sponsors for their past -or current significant support of the OpenSSL project: - -Very significant support: - - OpenGear: www.opengear.com - -Significant support: - - PSW Group: www.psw.net - -Please note that we ask permission to identify sponsors and that some sponsors -we consider eligible for inclusion here have requested to remain anonymous. - -Additional sponsorship or financial support is always welcome: for more -information please contact the OpenSSL Software Foundation. diff --git a/3rdparty/openssl-1.0.0d/CHANGES b/3rdparty/openssl-1.0.0d/CHANGES deleted file mode 100755 index 5cae85c9cf..0000000000 --- a/3rdparty/openssl-1.0.0d/CHANGES +++ /dev/null @@ -1,9452 +0,0 @@ - - OpenSSL CHANGES - _______________ - - Changes between 1.0.0c and 1.0.0d [8 Feb 2011] - - *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 - [Neel Mehta, Adam Langley, Bodo Moeller (Google)] - - *) Fix bug in string printing code: if *any* escaping is enabled we must - escape the escape character (backslash) or the resulting string is - ambiguous. - [Steve Henson] - - Changes between 1.0.0b and 1.0.0c [2 Dec 2010] - - *) Disable code workaround for ancient and obsolete Netscape browsers - and servers: an attacker can use it in a ciphersuite downgrade attack. - Thanks to Martin Rex for discovering this bug. CVE-2010-4180 - [Steve Henson] - - *) Fixed J-PAKE implementation error, originally discovered by - Sebastien Martini, further info and confirmation from Stefan - Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 - [Ben Laurie] - - Changes between 1.0.0a and 1.0.0b [16 Nov 2010] - - *) Fix extension code to avoid race conditions which can result in a buffer - overrun vulnerability: resumed sessions must not be modified as they can - be shared by multiple threads. CVE-2010-3864 - [Steve Henson] - - *) Fix WIN32 build system to correctly link an ENGINE directory into - a DLL. - [Steve Henson] - - Changes between 1.0.0 and 1.0.0a [01 Jun 2010] - - *) Check return value of int_rsa_verify in pkey_rsa_verifyrecover - (CVE-2010-1633) - [Steve Henson, Peter-Michael Hager ] - - Changes between 0.9.8n and 1.0.0 [29 Mar 2010] - - *) Add "missing" function EVP_CIPHER_CTX_copy(). This copies a cipher - context. The operation can be customised via the ctrl mechanism in - case ENGINEs want to include additional functionality. - [Steve Henson] - - *) Tolerate yet another broken PKCS#8 key format: private key value negative. - [Steve Henson] - - *) Add new -subject_hash_old and -issuer_hash_old options to x509 utility to - output hashes compatible with older versions of OpenSSL. - [Willy Weisz ] - - *) Fix compression algorithm handling: if resuming a session use the - compression algorithm of the resumed session instead of determining - it from client hello again. Don't allow server to change algorithm. - [Steve Henson] - - *) Add load_crls() function to apps tidying load_certs() too. Add option - to verify utility to allow additional CRLs to be included. - [Steve Henson] - - *) Update OCSP request code to permit adding custom headers to the request: - some responders need this. - [Steve Henson] - - *) The function EVP_PKEY_sign() returns <=0 on error: check return code - correctly. - [Julia Lawall ] - - *) Update verify callback code in apps/s_cb.c and apps/verify.c, it - needlessly dereferenced structures, used obsolete functions and - didn't handle all updated verify codes correctly. - [Steve Henson] - - *) Disable MD2 in the default configuration. - [Steve Henson] - - *) In BIO_pop() and BIO_push() use the ctrl argument (which was NULL) to - indicate the initial BIO being pushed or popped. This makes it possible - to determine whether the BIO is the one explicitly called or as a result - of the ctrl being passed down the chain. Fix BIO_pop() and SSL BIOs so - it handles reference counts correctly and doesn't zero out the I/O bio - when it is not being explicitly popped. WARNING: applications which - included workarounds for the old buggy behaviour will need to be modified - or they could free up already freed BIOs. - [Steve Henson] - - *) Extend the uni2asc/asc2uni => OPENSSL_uni2asc/OPENSSL_asc2uni - renaming to all platforms (within the 0.9.8 branch, this was - done conditionally on Netware platforms to avoid a name clash). - [Guenter ] - - *) Add ECDHE and PSK support to DTLS. - [Michael Tuexen ] - - *) Add CHECKED_STACK_OF macro to safestack.h, otherwise safestack can't - be used on C++. - [Steve Henson] - - *) Add "missing" function EVP_MD_flags() (without this the only way to - retrieve a digest flags is by accessing the structure directly. Update - EVP_MD_do_all*() and EVP_CIPHER_do_all*() to include the name a digest - or cipher is registered as in the "from" argument. Print out all - registered digests in the dgst usage message instead of manually - attempting to work them out. - [Steve Henson] - - *) If no SSLv2 ciphers are used don't use an SSLv2 compatible client hello: - this allows the use of compression and extensions. Change default cipher - string to remove SSLv2 ciphersuites. This effectively avoids ancient SSLv2 - by default unless an application cipher string requests it. - [Steve Henson] - - *) Alter match criteria in PKCS12_parse(). It used to try to use local - key ids to find matching certificates and keys but some PKCS#12 files - don't follow the (somewhat unwritten) rules and this strategy fails. - Now just gather all certificates together and the first private key - then look for the first certificate that matches the key. - [Steve Henson] - - *) Support use of registered digest and cipher names for dgst and cipher - commands instead of having to add each one as a special case. So now - you can do: - - openssl sha256 foo - - as well as: - - openssl dgst -sha256 foo - - and this works for ENGINE based algorithms too. - - [Steve Henson] - - *) Update Gost ENGINE to support parameter files. - [Victor B. Wagner ] - - *) Support GeneralizedTime in ca utility. - [Oliver Martin , Steve Henson] - - *) Enhance the hash format used for certificate directory links. The new - form uses the canonical encoding (meaning equivalent names will work - even if they aren't identical) and uses SHA1 instead of MD5. This form - is incompatible with the older format and as a result c_rehash should - be used to rebuild symbolic links. - [Steve Henson] - - *) Make PKCS#8 the default write format for private keys, replacing the - traditional format. This form is standardised, more secure and doesn't - include an implicit MD5 dependency. - [Steve Henson] - - *) Add a $gcc_devteam_warn option to Configure. The idea is that any code - committed to OpenSSL should pass this lot as a minimum. - [Steve Henson] - - *) Add session ticket override functionality for use by EAP-FAST. - [Jouni Malinen ] - - *) Modify HMAC functions to return a value. Since these can be implemented - in an ENGINE errors can occur. - [Steve Henson] - - *) Type-checked OBJ_bsearch_ex. - [Ben Laurie] - - *) Type-checked OBJ_bsearch. Also some constification necessitated - by type-checking. Still to come: TXT_DB, bsearch(?), - OBJ_bsearch_ex, qsort, CRYPTO_EX_DATA, ASN1_VALUE, ASN1_STRING, - CONF_VALUE. - [Ben Laurie] - - *) New function OPENSSL_gmtime_adj() to add a specific number of days and - seconds to a tm structure directly, instead of going through OS - specific date routines. This avoids any issues with OS routines such - as the year 2038 bug. New *_adj() functions for ASN1 time structures - and X509_time_adj_ex() to cover the extended range. The existing - X509_time_adj() is still usable and will no longer have any date issues. - [Steve Henson] - - *) Delta CRL support. New use deltas option which will attempt to locate - and search any appropriate delta CRLs available. - - This work was sponsored by Google. - [Steve Henson] - - *) Support for CRLs partitioned by reason code. Reorganise CRL processing - code and add additional score elements. Validate alternate CRL paths - as part of the CRL checking and indicate a new error "CRL path validation - error" in this case. Applications wanting additional details can use - the verify callback and check the new "parent" field. If this is not - NULL CRL path validation is taking place. Existing applications wont - see this because it requires extended CRL support which is off by - default. - - This work was sponsored by Google. - [Steve Henson] - - *) Support for freshest CRL extension. - - This work was sponsored by Google. - [Steve Henson] - - *) Initial indirect CRL support. Currently only supported in the CRLs - passed directly and not via lookup. Process certificate issuer - CRL entry extension and lookup CRL entries by bother issuer name - and serial number. Check and process CRL issuer entry in IDP extension. - - This work was sponsored by Google. - [Steve Henson] - - *) Add support for distinct certificate and CRL paths. The CRL issuer - certificate is validated separately in this case. Only enabled if - an extended CRL support flag is set: this flag will enable additional - CRL functionality in future. - - This work was sponsored by Google. - [Steve Henson] - - *) Add support for policy mappings extension. - - This work was sponsored by Google. - [Steve Henson] - - *) Fixes to pathlength constraint, self issued certificate handling, - policy processing to align with RFC3280 and PKITS tests. - - This work was sponsored by Google. - [Steve Henson] - - *) Support for name constraints certificate extension. DN, email, DNS - and URI types are currently supported. - - This work was sponsored by Google. - [Steve Henson] - - *) To cater for systems that provide a pointer-based thread ID rather - than numeric, deprecate the current numeric thread ID mechanism and - replace it with a structure and associated callback type. This - mechanism allows a numeric "hash" to be extracted from a thread ID in - either case, and on platforms where pointers are larger than 'long', - mixing is done to help ensure the numeric 'hash' is usable even if it - can't be guaranteed unique. The default mechanism is to use "&errno" - as a pointer-based thread ID to distinguish between threads. - - Applications that want to provide their own thread IDs should now use - CRYPTO_THREADID_set_callback() to register a callback that will call - either CRYPTO_THREADID_set_numeric() or CRYPTO_THREADID_set_pointer(). - - Note that ERR_remove_state() is now deprecated, because it is tied - to the assumption that thread IDs are numeric. ERR_remove_state(0) - to free the current thread's error state should be replaced by - ERR_remove_thread_state(NULL). - - (This new approach replaces the functions CRYPTO_set_idptr_callback(), - CRYPTO_get_idptr_callback(), and CRYPTO_thread_idptr() that existed in - OpenSSL 0.9.9-dev between June 2006 and August 2008. Also, if an - application was previously providing a numeric thread callback that - was inappropriate for distinguishing threads, then uniqueness might - have been obtained with &errno that happened immediately in the - intermediate development versions of OpenSSL; this is no longer the - case, the numeric thread callback will now override the automatic use - of &errno.) - [Geoff Thorpe, with help from Bodo Moeller] - - *) Initial support for different CRL issuing certificates. This covers a - simple case where the self issued certificates in the chain exist and - the real CRL issuer is higher in the existing chain. - - This work was sponsored by Google. - [Steve Henson] - - *) Removed effectively defunct crypto/store from the build. - [Ben Laurie] - - *) Revamp of STACK to provide stronger type-checking. Still to come: - TXT_DB, bsearch(?), OBJ_bsearch, qsort, CRYPTO_EX_DATA, ASN1_VALUE, - ASN1_STRING, CONF_VALUE. - [Ben Laurie] - - *) Add a new SSL_MODE_RELEASE_BUFFERS mode flag to release unused buffer - RAM on SSL connections. This option can save about 34k per idle SSL. - [Nick Mathewson] - - *) Revamp of LHASH to provide stronger type-checking. Still to come: - STACK, TXT_DB, bsearch, qsort. - [Ben Laurie] - - *) Initial support for Cryptographic Message Syntax (aka CMS) based - on RFC3850, RFC3851 and RFC3852. New cms directory and cms utility, - support for data, signedData, compressedData, digestedData and - encryptedData, envelopedData types included. Scripts to check against - RFC4134 examples draft and interop and consistency checks of many - content types and variants. - [Steve Henson] - - *) Add options to enc utility to support use of zlib compression BIO. - [Steve Henson] - - *) Extend mk1mf to support importing of options and assembly language - files from Configure script, currently only included in VC-WIN32. - The assembly language rules can now optionally generate the source - files from the associated perl scripts. - [Steve Henson] - - *) Implement remaining functionality needed to support GOST ciphersuites. - Interop testing has been performed using CryptoPro implementations. - [Victor B. Wagner ] - - *) s390x assembler pack. - [Andy Polyakov] - - *) ARMv4 assembler pack. ARMv4 refers to v4 and later ISA, not CPU - "family." - [Andy Polyakov] - - *) Implement Opaque PRF Input TLS extension as specified in - draft-rescorla-tls-opaque-prf-input-00.txt. Since this is not an - official specification yet and no extension type assignment by - IANA exists, this extension (for now) will have to be explicitly - enabled when building OpenSSL by providing the extension number - to use. For example, specify an option - - -DTLSEXT_TYPE_opaque_prf_input=0x9527 - - to the "config" or "Configure" script to enable the extension, - assuming extension number 0x9527 (which is a completely arbitrary - and unofficial assignment based on the MD5 hash of the Internet - Draft). Note that by doing so, you potentially lose - interoperability with other TLS implementations since these might - be using the same extension number for other purposes. - - SSL_set_tlsext_opaque_prf_input(ssl, src, len) is used to set the - opaque PRF input value to use in the handshake. This will create - an interal copy of the length-'len' string at 'src', and will - return non-zero for success. - - To get more control and flexibility, provide a callback function - by using - - SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) - SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) - - where - - int (*cb)(SSL *, void *peerinput, size_t len, void *arg); - void *arg; - - Callback function 'cb' will be called in handshakes, and is - expected to use SSL_set_tlsext_opaque_prf_input() as appropriate. - Argument 'arg' is for application purposes (the value as given to - SSL_CTX_set_tlsext_opaque_prf_input_callback_arg() will directly - be provided to the callback function). The callback function - has to return non-zero to report success: usually 1 to use opaque - PRF input just if possible, or 2 to enforce use of the opaque PRF - input. In the latter case, the library will abort the handshake - if opaque PRF input is not successfully negotiated. - - Arguments 'peerinput' and 'len' given to the callback function - will always be NULL and 0 in the case of a client. A server will - see the client's opaque PRF input through these variables if - available (NULL and 0 otherwise). Note that if the server - provides an opaque PRF input, the length must be the same as the - length of the client's opaque PRF input. - - Note that the callback function will only be called when creating - a new session (session resumption can resume whatever was - previously negotiated), and will not be called in SSL 2.0 - handshakes; thus, SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) or - SSL_set_options(ssl, SSL_OP_NO_SSLv2) is especially recommended - for applications that need to enforce opaque PRF input. - - [Bodo Moeller] - - *) Update ssl code to support digests other than SHA1+MD5 for handshake - MAC. - - [Victor B. Wagner ] - - *) Add RFC4507 support to OpenSSL. This includes the corrections in - RFC4507bis. The encrypted ticket format is an encrypted encoded - SSL_SESSION structure, that way new session features are automatically - supported. - - If a client application caches session in an SSL_SESSION structure - support is transparent because tickets are now stored in the encoded - SSL_SESSION. - - The SSL_CTX structure automatically generates keys for ticket - protection in servers so again support should be possible - with no application modification. - - If a client or server wishes to disable RFC4507 support then the option - SSL_OP_NO_TICKET can be set. - - Add a TLS extension debugging callback to allow the contents of any client - or server extensions to be examined. - - This work was sponsored by Google. - [Steve Henson] - - *) Final changes to avoid use of pointer pointer casts in OpenSSL. - OpenSSL should now compile cleanly on gcc 4.2 - [Peter Hartley , Steve Henson] - - *) Update SSL library to use new EVP_PKEY MAC API. Include generic MAC - support including streaming MAC support: this is required for GOST - ciphersuite support. - [Victor B. Wagner , Steve Henson] - - *) Add option -stream to use PKCS#7 streaming in smime utility. New - function i2d_PKCS7_bio_stream() and PEM_write_PKCS7_bio_stream() - to output in BER and PEM format. - [Steve Henson] - - *) Experimental support for use of HMAC via EVP_PKEY interface. This - allows HMAC to be handled via the EVP_DigestSign*() interface. The - EVP_PKEY "key" in this case is the HMAC key, potentially allowing - ENGINE support for HMAC keys which are unextractable. New -mac and - -macopt options to dgst utility. - [Steve Henson] - - *) New option -sigopt to dgst utility. Update dgst to use - EVP_Digest{Sign,Verify}*. These two changes make it possible to use - alternative signing paramaters such as X9.31 or PSS in the dgst - utility. - [Steve Henson] - - *) Change ssl_cipher_apply_rule(), the internal function that does - the work each time a ciphersuite string requests enabling - ("foo+bar"), moving ("+foo+bar"), disabling ("-foo+bar", or - removing ("!foo+bar") a class of ciphersuites: Now it maintains - the order of disabled ciphersuites such that those ciphersuites - that most recently went from enabled to disabled not only stay - in order with respect to each other, but also have higher priority - than other disabled ciphersuites the next time ciphersuites are - enabled again. - - This means that you can now say, e.g., "PSK:-PSK:HIGH" to enable - the same ciphersuites as with "HIGH" alone, but in a specific - order where the PSK ciphersuites come first (since they are the - most recently disabled ciphersuites when "HIGH" is parsed). - - Also, change ssl_create_cipher_list() (using this new - funcionality) such that between otherwise identical - cihpersuites, ephemeral ECDH is preferred over ephemeral DH in - the default order. - [Bodo Moeller] - - *) Change ssl_create_cipher_list() so that it automatically - arranges the ciphersuites in reasonable order before starting - to process the rule string. Thus, the definition for "DEFAULT" - (SSL_DEFAULT_CIPHER_LIST) now is just "ALL:!aNULL:!eNULL", but - remains equivalent to "AES:ALL:!aNULL:!eNULL:+aECDH:+kRSA:+RC4:@STRENGTH". - This makes it much easier to arrive at a reasonable default order - in applications for which anonymous ciphers are OK (meaning - that you can't actually use DEFAULT). - [Bodo Moeller; suggested by Victor Duchovni] - - *) Split the SSL/TLS algorithm mask (as used for ciphersuite string - processing) into multiple integers instead of setting - "SSL_MKEY_MASK" bits, "SSL_AUTH_MASK" bits, "SSL_ENC_MASK", - "SSL_MAC_MASK", and "SSL_SSL_MASK" bits all in a single integer. - (These masks as well as the individual bit definitions are hidden - away into the non-exported interface ssl/ssl_locl.h, so this - change to the definition of the SSL_CIPHER structure shouldn't - affect applications.) This give us more bits for each of these - categories, so there is no longer a need to coagulate AES128 and - AES256 into a single algorithm bit, and to coagulate Camellia128 - and Camellia256 into a single algorithm bit, which has led to all - kinds of kludges. - - Thus, among other things, the kludge introduced in 0.9.7m and - 0.9.8e for masking out AES256 independently of AES128 or masking - out Camellia256 independently of AES256 is not needed here in 0.9.9. - - With the change, we also introduce new ciphersuite aliases that - so far were missing: "AES128", "AES256", "CAMELLIA128", and - "CAMELLIA256". - [Bodo Moeller] - - *) Add support for dsa-with-SHA224 and dsa-with-SHA256. - Use the leftmost N bytes of the signature input if the input is - larger than the prime q (with N being the size in bytes of q). - [Nils Larsch] - - *) Very *very* experimental PKCS#7 streaming encoder support. Nothing uses - it yet and it is largely untested. - [Steve Henson] - - *) Add support for the ecdsa-with-SHA224/256/384/512 signature types. - [Nils Larsch] - - *) Initial incomplete changes to avoid need for function casts in OpenSSL - some compilers (gcc 4.2 and later) reject their use. Safestack is - reimplemented. Update ASN1 to avoid use of legacy functions. - [Steve Henson] - - *) Win32/64 targets are linked with Winsock2. - [Andy Polyakov] - - *) Add an X509_CRL_METHOD structure to allow CRL processing to be redirected - to external functions. This can be used to increase CRL handling - efficiency especially when CRLs are very large by (for example) storing - the CRL revoked certificates in a database. - [Steve Henson] - - *) Overhaul of by_dir code. Add support for dynamic loading of CRLs so - new CRLs added to a directory can be used. New command line option - -verify_return_error to s_client and s_server. This causes real errors - to be returned by the verify callback instead of carrying on no matter - what. This reflects the way a "real world" verify callback would behave. - [Steve Henson] - - *) GOST engine, supporting several GOST algorithms and public key formats. - Kindly donated by Cryptocom. - [Cryptocom] - - *) Partial support for Issuing Distribution Point CRL extension. CRLs - partitioned by DP are handled but no indirect CRL or reason partitioning - (yet). Complete overhaul of CRL handling: now the most suitable CRL is - selected via a scoring technique which handles IDP and AKID in CRLs. - [Steve Henson] - - *) New X509_STORE_CTX callbacks lookup_crls() and lookup_certs() which - will ultimately be used for all verify operations: this will remove the - X509_STORE dependency on certificate verification and allow alternative - lookup methods. X509_STORE based implementations of these two callbacks. - [Steve Henson] - - *) Allow multiple CRLs to exist in an X509_STORE with matching issuer names. - Modify get_crl() to find a valid (unexpired) CRL if possible. - [Steve Henson] - - *) New function X509_CRL_match() to check if two CRLs are identical. Normally - this would be called X509_CRL_cmp() but that name is already used by - a function that just compares CRL issuer names. Cache several CRL - extensions in X509_CRL structure and cache CRLDP in X509. - [Steve Henson] - - *) Store a "canonical" representation of X509_NAME structure (ASN1 Name) - this maps equivalent X509_NAME structures into a consistent structure. - Name comparison can then be performed rapidly using memcmp(). - [Steve Henson] - - *) Non-blocking OCSP request processing. Add -timeout option to ocsp - utility. - [Steve Henson] - - *) Allow digests to supply their own micalg string for S/MIME type using - the ctrl EVP_MD_CTRL_MICALG. - [Steve Henson] - - *) During PKCS7 signing pass the PKCS7 SignerInfo structure to the - EVP_PKEY_METHOD before and after signing via the EVP_PKEY_CTRL_PKCS7_SIGN - ctrl. It can then customise the structure before and/or after signing - if necessary. - [Steve Henson] - - *) New function OBJ_add_sigid() to allow application defined signature OIDs - to be added to OpenSSLs internal tables. New function OBJ_sigid_free() - to free up any added signature OIDs. - [Steve Henson] - - *) New functions EVP_CIPHER_do_all(), EVP_CIPHER_do_all_sorted(), - EVP_MD_do_all() and EVP_MD_do_all_sorted() to enumerate internal - digest and cipher tables. New options added to openssl utility: - list-message-digest-algorithms and list-cipher-algorithms. - [Steve Henson] - - *) Change the array representation of binary polynomials: the list - of degrees of non-zero coefficients is now terminated with -1. - Previously it was terminated with 0, which was also part of the - value; thus, the array representation was not applicable to - polynomials where t^0 has coefficient zero. This change makes - the array representation useful in a more general context. - [Douglas Stebila] - - *) Various modifications and fixes to SSL/TLS cipher string - handling. For ECC, the code now distinguishes between fixed ECDH - with RSA certificates on the one hand and with ECDSA certificates - on the other hand, since these are separate ciphersuites. The - unused code for Fortezza ciphersuites has been removed. - - For consistency with EDH, ephemeral ECDH is now called "EECDH" - (not "ECDHE"). For consistency with the code for DH - certificates, use of ECDH certificates is now considered ECDH - authentication, not RSA or ECDSA authentication (the latter is - merely the CA's signing algorithm and not actively used in the - protocol). - - The temporary ciphersuite alias "ECCdraft" is no longer - available, and ECC ciphersuites are no longer excluded from "ALL" - and "DEFAULT". The following aliases now exist for RFC 4492 - ciphersuites, most of these by analogy with the DH case: - - kECDHr - ECDH cert, signed with RSA - kECDHe - ECDH cert, signed with ECDSA - kECDH - ECDH cert (signed with either RSA or ECDSA) - kEECDH - ephemeral ECDH - ECDH - ECDH cert or ephemeral ECDH - - aECDH - ECDH cert - aECDSA - ECDSA cert - ECDSA - ECDSA cert - - AECDH - anonymous ECDH - EECDH - non-anonymous ephemeral ECDH (equivalent to "kEECDH:-AECDH") - - [Bodo Moeller] - - *) Add additional S/MIME capabilities for AES and GOST ciphers if supported. - Use correct micalg parameters depending on digest(s) in signed message. - [Steve Henson] - - *) Add engine support for EVP_PKEY_ASN1_METHOD. Add functions to process - an ENGINE asn1 method. Support ENGINE lookups in the ASN1 code. - [Steve Henson] - - *) Initial engine support for EVP_PKEY_METHOD. New functions to permit - an engine to register a method. Add ENGINE lookups for methods and - functional reference processing. - [Steve Henson] - - *) New functions EVP_Digest{Sign,Verify)*. These are enchance versions of - EVP_{Sign,Verify}* which allow an application to customise the signature - process. - [Steve Henson] - - *) New -resign option to smime utility. This adds one or more signers - to an existing PKCS#7 signedData structure. Also -md option to use an - alternative message digest algorithm for signing. - [Steve Henson] - - *) Tidy up PKCS#7 routines and add new functions to make it easier to - create PKCS7 structures containing multiple signers. Update smime - application to support multiple signers. - [Steve Henson] - - *) New -macalg option to pkcs12 utility to allow setting of an alternative - digest MAC. - [Steve Henson] - - *) Initial support for PKCS#5 v2.0 PRFs other than default SHA1 HMAC. - Reorganize PBE internals to lookup from a static table using NIDs, - add support for HMAC PBE OID translation. Add a EVP_CIPHER ctrl: - EVP_CTRL_PBE_PRF_NID this allows a cipher to specify an alternative - PRF which will be automatically used with PBES2. - [Steve Henson] - - *) Replace the algorithm specific calls to generate keys in "req" with the - new API. - [Steve Henson] - - *) Update PKCS#7 enveloped data routines to use new API. This is now - supported by any public key method supporting the encrypt operation. A - ctrl is added to allow the public key algorithm to examine or modify - the PKCS#7 RecipientInfo structure if it needs to: for RSA this is - a no op. - [Steve Henson] - - *) Add a ctrl to asn1 method to allow a public key algorithm to express - a default digest type to use. In most cases this will be SHA1 but some - algorithms (such as GOST) need to specify an alternative digest. The - return value indicates how strong the prefernce is 1 means optional and - 2 is mandatory (that is it is the only supported type). Modify - ASN1_item_sign() to accept a NULL digest argument to indicate it should - use the default md. Update openssl utilities to use the default digest - type for signing if it is not explicitly indicated. - [Steve Henson] - - *) Use OID cross reference table in ASN1_sign() and ASN1_verify(). New - EVP_MD flag EVP_MD_FLAG_PKEY_METHOD_SIGNATURE. This uses the relevant - signing method from the key type. This effectively removes the link - between digests and public key types. - [Steve Henson] - - *) Add an OID cross reference table and utility functions. Its purpose is to - translate between signature OIDs such as SHA1WithrsaEncryption and SHA1, - rsaEncryption. This will allow some of the algorithm specific hackery - needed to use the correct OID to be removed. - [Steve Henson] - - *) Remove algorithm specific dependencies when setting PKCS7_SIGNER_INFO - structures for PKCS7_sign(). They are now set up by the relevant public - key ASN1 method. - [Steve Henson] - - *) Add provisional EC pkey method with support for ECDSA and ECDH. - [Steve Henson] - - *) Add support for key derivation (agreement) in the API, DH method and - pkeyutl. - [Steve Henson] - - *) Add DSA pkey method and DH pkey methods, extend DH ASN1 method to support - public and private key formats. As a side effect these add additional - command line functionality not previously available: DSA signatures can be - generated and verified using pkeyutl and DH key support and generation in - pkey, genpkey. - [Steve Henson] - - *) BeOS support. - [Oliver Tappe ] - - *) New make target "install_html_docs" installs HTML renditions of the - manual pages. - [Oliver Tappe ] - - *) New utility "genpkey" this is analagous to "genrsa" etc except it can - generate keys for any algorithm. Extend and update EVP_PKEY_METHOD to - support key and parameter generation and add initial key generation - functionality for RSA. - [Steve Henson] - - *) Add functions for main EVP_PKEY_method operations. The undocumented - functions EVP_PKEY_{encrypt,decrypt} have been renamed to - EVP_PKEY_{encrypt,decrypt}_old. - [Steve Henson] - - *) Initial definitions for EVP_PKEY_METHOD. This will be a high level public - key API, doesn't do much yet. - [Steve Henson] - - *) New function EVP_PKEY_asn1_get0_info() to retrieve information about - public key algorithms. New option to openssl utility: - "list-public-key-algorithms" to print out info. - [Steve Henson] - - *) Implement the Supported Elliptic Curves Extension for - ECC ciphersuites from draft-ietf-tls-ecc-12.txt. - [Douglas Stebila] - - *) Don't free up OIDs in OBJ_cleanup() if they are in use by EVP_MD or - EVP_CIPHER structures to avoid later problems in EVP_cleanup(). - [Steve Henson] - - *) New utilities pkey and pkeyparam. These are similar to algorithm specific - utilities such as rsa, dsa, dsaparam etc except they process any key - type. - [Steve Henson] - - *) Transfer public key printing routines to EVP_PKEY_ASN1_METHOD. New - functions EVP_PKEY_print_public(), EVP_PKEY_print_private(), - EVP_PKEY_print_param() to print public key data from an EVP_PKEY - structure. - [Steve Henson] - - *) Initial support for pluggable public key ASN1. - De-spaghettify the public key ASN1 handling. Move public and private - key ASN1 handling to a new EVP_PKEY_ASN1_METHOD structure. Relocate - algorithm specific handling to a single module within the relevant - algorithm directory. Add functions to allow (near) opaque processing - of public and private key structures. - [Steve Henson] - - *) Implement the Supported Point Formats Extension for - ECC ciphersuites from draft-ietf-tls-ecc-12.txt. - [Douglas Stebila] - - *) Add initial support for RFC 4279 PSK TLS ciphersuites. Add members - for the psk identity [hint] and the psk callback functions to the - SSL_SESSION, SSL and SSL_CTX structure. - - New ciphersuites: - PSK-RC4-SHA, PSK-3DES-EDE-CBC-SHA, PSK-AES128-CBC-SHA, - PSK-AES256-CBC-SHA - - New functions: - SSL_CTX_use_psk_identity_hint - SSL_get_psk_identity_hint - SSL_get_psk_identity - SSL_use_psk_identity_hint - - [Mika Kousa and Pasi Eronen of Nokia Corporation] - - *) Add RFC 3161 compliant time stamp request creation, response generation - and response verification functionality. - [Zoltán Glózik , The OpenTSA Project] - - *) Add initial support for TLS extensions, specifically for the server_name - extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now - have new members for a host name. The SSL data structure has an - additional member SSL_CTX *initial_ctx so that new sessions can be - stored in that context to allow for session resumption, even after the - SSL has been switched to a new SSL_CTX in reaction to a client's - server_name extension. - - New functions (subject to change): - - SSL_get_servername() - SSL_get_servername_type() - SSL_set_SSL_CTX() - - New CTRL codes and macros (subject to change): - - SSL_CTRL_SET_TLSEXT_SERVERNAME_CB - - SSL_CTX_set_tlsext_servername_callback() - SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG - - SSL_CTX_set_tlsext_servername_arg() - SSL_CTRL_SET_TLSEXT_HOSTNAME - SSL_set_tlsext_host_name() - - openssl s_client has a new '-servername ...' option. - - openssl s_server has new options '-servername_host ...', '-cert2 ...', - '-key2 ...', '-servername_fatal' (subject to change). This allows - testing the HostName extension for a specific single host name ('-cert' - and '-key' remain fallbacks for handshakes without HostName - negotiation). If the unrecogninzed_name alert has to be sent, this by - default is a warning; it becomes fatal with the '-servername_fatal' - option. - - [Peter Sylvester, Remy Allais, Christophe Renou] - - *) Whirlpool hash implementation is added. - [Andy Polyakov] - - *) BIGNUM code on 64-bit SPARCv9 targets is switched from bn(64,64) to - bn(64,32). Because of instruction set limitations it doesn't have - any negative impact on performance. This was done mostly in order - to make it possible to share assembler modules, such as bn_mul_mont - implementations, between 32- and 64-bit builds without hassle. - [Andy Polyakov] - - *) Move code previously exiled into file crypto/ec/ec2_smpt.c - to ec2_smpl.c, and no longer require the OPENSSL_EC_BIN_PT_COMP - macro. - [Bodo Moeller] - - *) New candidate for BIGNUM assembler implementation, bn_mul_mont, - dedicated Montgomery multiplication procedure, is introduced. - BN_MONT_CTX is modified to allow bn_mul_mont to reach for higher - "64-bit" performance on certain 32-bit targets. - [Andy Polyakov] - - *) New option SSL_OP_NO_COMP to disable use of compression selectively - in SSL structures. New SSL ctrl to set maximum send fragment size. - Save memory by seeting the I/O buffer sizes dynamically instead of - using the maximum available value. - [Steve Henson] - - *) New option -V for 'openssl ciphers'. This prints the ciphersuite code - in addition to the text details. - [Bodo Moeller] - - *) Very, very preliminary EXPERIMENTAL support for printing of general - ASN1 structures. This currently produces rather ugly output and doesn't - handle several customised structures at all. - [Steve Henson] - - *) Integrated support for PVK file format and some related formats such - as MS PUBLICKEYBLOB and PRIVATEKEYBLOB. Command line switches to support - these in the 'rsa' and 'dsa' utilities. - [Steve Henson] - - *) Support for PKCS#1 RSAPublicKey format on rsa utility command line. - [Steve Henson] - - *) Remove the ancient ASN1_METHOD code. This was only ever used in one - place for the (very old) "NETSCAPE" format certificates which are now - handled using new ASN1 code equivalents. - [Steve Henson] - - *) Let the TLSv1_method() etc. functions return a 'const' SSL_METHOD - pointer and make the SSL_METHOD parameter in SSL_CTX_new, - SSL_CTX_set_ssl_version and SSL_set_ssl_method 'const'. - [Nils Larsch] - - *) Modify CRL distribution points extension code to print out previously - unsupported fields. Enhance extension setting code to allow setting of - all fields. - [Steve Henson] - - *) Add print and set support for Issuing Distribution Point CRL extension. - [Steve Henson] - - *) Change 'Configure' script to enable Camellia by default. - [NTT] - - Changes between 0.9.8q and 0.9.8r [8 Feb 2011] - - *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 - [Neel Mehta, Adam Langley, Bodo Moeller (Google)] - - *) Fix bug in string printing code: if *any* escaping is enabled we must - escape the escape character (backslash) or the resulting string is - ambiguous. - [Steve Henson] - - Changes between 0.9.8p and 0.9.8q [2 Dec 2010] - - *) Disable code workaround for ancient and obsolete Netscape browsers - and servers: an attacker can use it in a ciphersuite downgrade attack. - Thanks to Martin Rex for discovering this bug. CVE-2010-4180 - [Steve Henson] - - *) Fixed J-PAKE implementation error, originally discovered by - Sebastien Martini, further info and confirmation from Stefan - Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 - [Ben Laurie] - - Changes between 0.9.8o and 0.9.8p [16 Nov 2010] - - *) Fix extension code to avoid race conditions which can result in a buffer - overrun vulnerability: resumed sessions must not be modified as they can - be shared by multiple threads. CVE-2010-3864 - [Steve Henson] - - *) Fix for double free bug in ssl/s3_clnt.c CVE-2010-2939 - [Steve Henson] - - *) Don't reencode certificate when calculating signature: cache and use - the original encoding instead. This makes signature verification of - some broken encodings work correctly. - [Steve Henson] - - *) ec2_GF2m_simple_mul bugfix: compute correct result if the output EC_POINT - is also one of the inputs. - [Emilia Käsper (Google)] - - *) Don't repeatedly append PBE algorithms to table if they already exist. - Sort table on each new add. This effectively makes the table read only - after all algorithms are added and subsequent calls to PKCS12_pbe_add - etc are non-op. - [Steve Henson] - - Changes between 0.9.8n and 0.9.8o [01 Jun 2010] - - [NB: OpenSSL 0.9.8o and later 0.9.8 patch levels were released after - OpenSSL 1.0.0.] - - *) Correct a typo in the CMS ASN1 module which can result in invalid memory - access or freeing data twice (CVE-2010-0742) - [Steve Henson, Ronald Moesbergen ] - - *) Add SHA2 algorithms to SSL_library_init(). SHA2 is becoming far more - common in certificates and some applications which only call - SSL_library_init and not OpenSSL_add_all_algorithms() will fail. - [Steve Henson] - - *) VMS fixes: - Reduce copying into .apps and .test in makevms.com - Don't try to use blank CA certificate in CA.com - Allow use of C files from original directories in maketests.com - [Steven M. Schweda" ] - - Changes between 0.9.8m and 0.9.8n [24 Mar 2010] - - *) When rejecting SSL/TLS records due to an incorrect version number, never - update s->server with a new major version number. As of - - OpenSSL 0.9.8m if 'short' is a 16-bit type, - - OpenSSL 0.9.8f if 'short' is longer than 16 bits, - the previous behavior could result in a read attempt at NULL when - receiving specific incorrect SSL/TLS records once record payload - protection is active. (CVE-2010-0740) - [Bodo Moeller, Adam Langley ] - - *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL - could be crashed if the relevant tables were not present (e.g. chrooted). - [Tomas Hoger ] - - Changes between 0.9.8l and 0.9.8m [25 Feb 2010] - - *) Always check bn_wexpend() return values for failure. (CVE-2009-3245) - [Martin Olsson, Neel Mehta] - - *) Fix X509_STORE locking: Every 'objs' access requires a lock (to - accommodate for stack sorting, always a write lock!). - [Bodo Moeller] - - *) On some versions of WIN32 Heap32Next is very slow. This can cause - excessive delays in the RAND_poll(): over a minute. As a workaround - include a time check in the inner Heap32Next loop too. - [Steve Henson] - - *) The code that handled flushing of data in SSL/TLS originally used the - BIO_CTRL_INFO ctrl to see if any data was pending first. This caused - the problem outlined in PR#1949. The fix suggested there however can - trigger problems with buggy BIO_CTRL_WPENDING (e.g. some versions - of Apache). So instead simplify the code to flush unconditionally. - This should be fine since flushing with no data to flush is a no op. - [Steve Henson] - - *) Handle TLS versions 2.0 and later properly and correctly use the - highest version of TLS/SSL supported. Although TLS >= 2.0 is some way - off ancient servers have a habit of sticking around for a while... - [Steve Henson] - - *) Modify compression code so it frees up structures without using the - ex_data callbacks. This works around a problem where some applications - call CRYPTO_cleanup_all_ex_data() before application exit (e.g. when - restarting) then use compression (e.g. SSL with compression) later. - This results in significant per-connection memory leaks and - has caused some security issues including CVE-2008-1678 and - CVE-2009-4355. - [Steve Henson] - - *) Constify crypto/cast (i.e., ): a CAST_KEY doesn't - change when encrypting or decrypting. - [Bodo Moeller] - - *) Add option SSL_OP_LEGACY_SERVER_CONNECT which will allow clients to - connect and renegotiate with servers which do not support RI. - Until RI is more widely deployed this option is enabled by default. - [Steve Henson] - - *) Add "missing" ssl ctrls to clear options and mode. - [Steve Henson] - - *) If client attempts to renegotiate and doesn't support RI respond with - a no_renegotiation alert as required by RFC5746. Some renegotiating - TLS clients will continue a connection gracefully when they receive - the alert. Unfortunately OpenSSL mishandled this alert and would hang - waiting for a server hello which it will never receive. Now we treat a - received no_renegotiation alert as a fatal error. This is because - applications requesting a renegotiation might well expect it to succeed - and would have no code in place to handle the server denying it so the - only safe thing to do is to terminate the connection. - [Steve Henson] - - *) Add ctrl macro SSL_get_secure_renegotiation_support() which returns 1 if - peer supports secure renegotiation and 0 otherwise. Print out peer - renegotiation support in s_client/s_server. - [Steve Henson] - - *) Replace the highly broken and deprecated SPKAC certification method with - the updated NID creation version. This should correctly handle UTF8. - [Steve Henson] - - *) Implement RFC5746. Re-enable renegotiation but require the extension - as needed. Unfortunately, SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION - turns out to be a bad idea. It has been replaced by - SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set with - SSL_CTX_set_options(). This is really not recommended unless you - know what you are doing. - [Eric Rescorla , Ben Laurie, Steve Henson] - - *) Fixes to stateless session resumption handling. Use initial_ctx when - issuing and attempting to decrypt tickets in case it has changed during - servername handling. Use a non-zero length session ID when attempting - stateless session resumption: this makes it possible to determine if - a resumption has occurred immediately after receiving server hello - (several places in OpenSSL subtly assume this) instead of later in - the handshake. - [Steve Henson] - - *) The functions ENGINE_ctrl(), OPENSSL_isservice(), - CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error - fixes for a few places where the return code is not checked - correctly. - [Julia Lawall ] - - *) Add --strict-warnings option to Configure script to include devteam - warnings in other configurations. - [Steve Henson] - - *) Add support for --libdir option and LIBDIR variable in makefiles. This - makes it possible to install openssl libraries in locations which - have names other than "lib", for example "/usr/lib64" which some - systems need. - [Steve Henson, based on patch from Jeremy Utley] - - *) Don't allow the use of leading 0x80 in OIDs. This is a violation of - X690 8.9.12 and can produce some misleading textual output of OIDs. - [Steve Henson, reported by Dan Kaminsky] - - *) Delete MD2 from algorithm tables. This follows the recommendation in - several standards that it is not used in new applications due to - several cryptographic weaknesses. For binary compatibility reasons - the MD2 API is still compiled in by default. - [Steve Henson] - - *) Add compression id to {d2i,i2d}_SSL_SESSION so it is correctly saved - and restored. - [Steve Henson] - - *) Rename uni2asc and asc2uni functions to OPENSSL_uni2asc and - OPENSSL_asc2uni conditionally on Netware platforms to avoid a name - clash. - [Guenter ] - - *) Fix the server certificate chain building code to use X509_verify_cert(), - it used to have an ad-hoc builder which was unable to cope with anything - other than a simple chain. - [David Woodhouse , Steve Henson] - - *) Don't check self signed certificate signatures in X509_verify_cert() - by default (a flag can override this): it just wastes time without - adding any security. As a useful side effect self signed root CAs - with non-FIPS digests are now usable in FIPS mode. - [Steve Henson] - - *) In dtls1_process_out_of_seq_message() the check if the current message - is already buffered was missing. For every new message was memory - allocated, allowing an attacker to perform an denial of service attack - with sending out of seq handshake messages until there is no memory - left. Additionally every future messege was buffered, even if the - sequence number made no sense and would be part of another handshake. - So only messages with sequence numbers less than 10 in advance will be - buffered. (CVE-2009-1378) - [Robin Seggelmann, discovered by Daniel Mentz] - - *) Records are buffered if they arrive with a future epoch to be - processed after finishing the corresponding handshake. There is - currently no limitation to this buffer allowing an attacker to perform - a DOS attack with sending records with future epochs until there is no - memory left. This patch adds the pqueue_size() function to detemine - the size of a buffer and limits the record buffer to 100 entries. - (CVE-2009-1377) - [Robin Seggelmann, discovered by Daniel Mentz] - - *) Keep a copy of frag->msg_header.frag_len so it can be used after the - parent structure is freed. (CVE-2009-1379) - [Daniel Mentz] - - *) Handle non-blocking I/O properly in SSL_shutdown() call. - [Darryl Miles ] - - *) Add 2.5.4.* OIDs - [Ilya O. ] - - Changes between 0.9.8k and 0.9.8l [5 Nov 2009] - - *) Disable renegotiation completely - this fixes a severe security - problem (CVE-2009-3555) at the cost of breaking all - renegotiation. Renegotiation can be re-enabled by setting - SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION in s3->flags at - run-time. This is really not recommended unless you know what - you're doing. - [Ben Laurie] - - Changes between 0.9.8j and 0.9.8k [25 Mar 2009] - - *) Don't set val to NULL when freeing up structures, it is freed up by - underlying code. If sizeof(void *) > sizeof(long) this can result in - zeroing past the valid field. (CVE-2009-0789) - [Paolo Ganci ] - - *) Fix bug where return value of CMS_SignerInfo_verify_content() was not - checked correctly. This would allow some invalid signed attributes to - appear to verify correctly. (CVE-2009-0591) - [Ivan Nestlerode ] - - *) Reject UniversalString and BMPString types with invalid lengths. This - prevents a crash in ASN1_STRING_print_ex() which assumes the strings have - a legal length. (CVE-2009-0590) - [Steve Henson] - - *) Set S/MIME signing as the default purpose rather than setting it - unconditionally. This allows applications to override it at the store - level. - [Steve Henson] - - *) Permit restricted recursion of ASN1 strings. This is needed in practice - to handle some structures. - [Steve Henson] - - *) Improve efficiency of mem_gets: don't search whole buffer each time - for a '\n' - [Jeremy Shapiro ] - - *) New -hex option for openssl rand. - [Matthieu Herrb] - - *) Print out UTF8String and NumericString when parsing ASN1. - [Steve Henson] - - *) Support NumericString type for name components. - [Steve Henson] - - *) Allow CC in the environment to override the automatically chosen - compiler. Note that nothing is done to ensure flags work with the - chosen compiler. - [Ben Laurie] - - Changes between 0.9.8i and 0.9.8j [07 Jan 2009] - - *) Properly check EVP_VerifyFinal() and similar return values - (CVE-2008-5077). - [Ben Laurie, Bodo Moeller, Google Security Team] - - *) Enable TLS extensions by default. - [Ben Laurie] - - *) Allow the CHIL engine to be loaded, whether the application is - multithreaded or not. (This does not release the developer from the - obligation to set up the dynamic locking callbacks.) - [Sander Temme ] - - *) Use correct exit code if there is an error in dgst command. - [Steve Henson; problem pointed out by Roland Dirlewanger] - - *) Tweak Configure so that you need to say "experimental-jpake" to enable - JPAKE, and need to use -DOPENSSL_EXPERIMENTAL_JPAKE in applications. - [Bodo Moeller] - - *) Add experimental JPAKE support, including demo authentication in - s_client and s_server. - [Ben Laurie] - - *) Set the comparison function in v3_addr_canonize(). - [Rob Austein ] - - *) Add support for XMPP STARTTLS in s_client. - [Philip Paeps ] - - *) Change the server-side SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG behavior - to ensure that even with this option, only ciphersuites in the - server's preference list will be accepted. (Note that the option - applies only when resuming a session, so the earlier behavior was - just about the algorithm choice for symmetric cryptography.) - [Bodo Moeller] - - Changes between 0.9.8h and 0.9.8i [15 Sep 2008] - - *) Fix NULL pointer dereference if a DTLS server received - ChangeCipherSpec as first record (CVE-2009-1386). - [PR #1679] - - *) Fix a state transitition in s3_srvr.c and d1_srvr.c - (was using SSL3_ST_CW_CLNT_HELLO_B, should be ..._ST_SW_SRVR_...). - [Nagendra Modadugu] - - *) The fix in 0.9.8c that supposedly got rid of unsafe - double-checked locking was incomplete for RSA blinding, - addressing just one layer of what turns out to have been - doubly unsafe triple-checked locking. - - So now fix this for real by retiring the MONT_HELPER macro - in crypto/rsa/rsa_eay.c. - - [Bodo Moeller; problem pointed out by Marius Schilder] - - *) Various precautionary measures: - - - Avoid size_t integer overflow in HASH_UPDATE (md32_common.h). - - - Avoid a buffer overflow in d2i_SSL_SESSION() (ssl_asn1.c). - (NB: This would require knowledge of the secret session ticket key - to exploit, in which case you'd be SOL either way.) - - - Change bn_nist.c so that it will properly handle input BIGNUMs - outside the expected range. - - - Enforce the 'num' check in BN_div() (bn_div.c) for non-BN_DEBUG - builds. - - [Neel Mehta, Bodo Moeller] - - *) Allow engines to be "soft loaded" - i.e. optionally don't die if - the load fails. Useful for distros. - [Ben Laurie and the FreeBSD team] - - *) Add support for Local Machine Keyset attribute in PKCS#12 files. - [Steve Henson] - - *) Fix BN_GF2m_mod_arr() top-bit cleanup code. - [Huang Ying] - - *) Expand ENGINE to support engine supplied SSL client certificate functions. - - This work was sponsored by Logica. - [Steve Henson] - - *) Add CryptoAPI ENGINE to support use of RSA and DSA keys held in Windows - keystores. Support for SSL/TLS client authentication too. - Not compiled unless enable-capieng specified to Configure. - - This work was sponsored by Logica. - [Steve Henson] - - *) Fix bug in X509_ATTRIBUTE creation: dont set attribute using - ASN1_TYPE_set1 if MBSTRING flag set. This bug would crash certain - attribute creation routines such as certifcate requests and PKCS#12 - files. - [Steve Henson] - - Changes between 0.9.8g and 0.9.8h [28 May 2008] - - *) Fix flaw if 'Server Key exchange message' is omitted from a TLS - handshake which could lead to a cilent crash as found using the - Codenomicon TLS test suite (CVE-2008-1672) - [Steve Henson, Mark Cox] - - *) Fix double free in TLS server name extensions which could lead to - a remote crash found by Codenomicon TLS test suite (CVE-2008-0891) - [Joe Orton] - - *) Clear error queue in SSL_CTX_use_certificate_chain_file() - - Clear the error queue to ensure that error entries left from - older function calls do not interfere with the correct operation. - [Lutz Jaenicke, Erik de Castro Lopo] - - *) Remove root CA certificates of commercial CAs: - - The OpenSSL project does not recommend any specific CA and does not - have any policy with respect to including or excluding any CA. - Therefore it does not make any sense to ship an arbitrary selection - of root CA certificates with the OpenSSL software. - [Lutz Jaenicke] - - *) RSA OAEP patches to fix two separate invalid memory reads. - The first one involves inputs when 'lzero' is greater than - 'SHA_DIGEST_LENGTH' (it would read about SHA_DIGEST_LENGTH bytes - before the beginning of from). The second one involves inputs where - the 'db' section contains nothing but zeroes (there is a one-byte - invalid read after the end of 'db'). - [Ivan Nestlerode ] - - *) Partial backport from 0.9.9-dev: - - Introduce bn_mul_mont (dedicated Montgomery multiplication - procedure) as a candidate for BIGNUM assembler implementation. - While 0.9.9-dev uses assembler for various architectures, only - x86_64 is available by default here in the 0.9.8 branch, and - 32-bit x86 is available through a compile-time setting. - - To try the 32-bit x86 assembler implementation, use Configure - option "enable-montasm" (which exists only for this backport). - - As "enable-montasm" for 32-bit x86 disclaims code stability - anyway, in this constellation we activate additional code - backported from 0.9.9-dev for further performance improvements, - namely BN_from_montgomery_word. (To enable this otherwise, - e.g. x86_64, try "-DMONT_FROM_WORD___NON_DEFAULT_0_9_8_BUILD".) - - [Andy Polyakov (backport partially by Bodo Moeller)] - - *) Add TLS session ticket callback. This allows an application to set - TLS ticket cipher and HMAC keys rather than relying on hardcoded fixed - values. This is useful for key rollover for example where several key - sets may exist with different names. - [Steve Henson] - - *) Reverse ENGINE-internal logic for caching default ENGINE handles. - This was broken until now in 0.9.8 releases, such that the only way - a registered ENGINE could be used (assuming it initialises - successfully on the host) was to explicitly set it as the default - for the relevant algorithms. This is in contradiction with 0.9.7 - behaviour and the documentation. With this fix, when an ENGINE is - registered into a given algorithm's table of implementations, the - 'uptodate' flag is reset so that auto-discovery will be used next - time a new context for that algorithm attempts to select an - implementation. - [Ian Lister (tweaked by Geoff Thorpe)] - - *) Backport of CMS code to OpenSSL 0.9.8. This differs from the 0.9.9 - implemention in the following ways: - - Lack of EVP_PKEY_ASN1_METHOD means algorithm parameters have to be - hard coded. - - Lack of BER streaming support means one pass streaming processing is - only supported if data is detached: setting the streaming flag is - ignored for embedded content. - - CMS support is disabled by default and must be explicitly enabled - with the enable-cms configuration option. - [Steve Henson] - - *) Update the GMP engine glue to do direct copies between BIGNUM and - mpz_t when openssl and GMP use the same limb size. Otherwise the - existing "conversion via a text string export" trick is still used. - [Paul Sheer ] - - *) Zlib compression BIO. This is a filter BIO which compressed and - uncompresses any data passed through it. - [Steve Henson] - - *) Add AES_wrap_key() and AES_unwrap_key() functions to implement - RFC3394 compatible AES key wrapping. - [Steve Henson] - - *) Add utility functions to handle ASN1 structures. ASN1_STRING_set0(): - sets string data without copying. X509_ALGOR_set0() and - X509_ALGOR_get0(): set and retrieve X509_ALGOR (AlgorithmIdentifier) - data. Attribute function X509at_get0_data_by_OBJ(): retrieves data - from an X509_ATTRIBUTE structure optionally checking it occurs only - once. ASN1_TYPE_set1(): set and ASN1_TYPE structure copying supplied - data. - [Steve Henson] - - *) Fix BN flag handling in RSA_eay_mod_exp() and BN_MONT_CTX_set() - to get the expected BN_FLG_CONSTTIME behavior. - [Bodo Moeller (Google)] - - *) Netware support: - - - fixed wrong usage of ioctlsocket() when build for LIBC BSD sockets - - fixed do_tests.pl to run the test suite with CLIB builds too (CLIB_OPT) - - added some more tests to do_tests.pl - - fixed RunningProcess usage so that it works with newer LIBC NDKs too - - removed usage of BN_LLONG for CLIB builds to avoid runtime dependency - - added new Configure targets netware-clib-bsdsock, netware-clib-gcc, - netware-clib-bsdsock-gcc, netware-libc-bsdsock-gcc - - various changes to netware.pl to enable gcc-cross builds on Win32 - platform - - changed crypto/bio/b_sock.c to work with macro functions (CLIB BSD) - - various changes to fix missing prototype warnings - - fixed x86nasm.pl to create correct asm files for NASM COFF output - - added AES, WHIRLPOOL and CPUID assembler code to build files - - added missing AES assembler make rules to mk1mf.pl - - fixed order of includes in apps/ocsp.c so that e_os.h settings apply - [Guenter Knauf ] - - *) Implement certificate status request TLS extension defined in RFC3546. - A client can set the appropriate parameters and receive the encoded - OCSP response via a callback. A server can query the supplied parameters - and set the encoded OCSP response in the callback. Add simplified examples - to s_client and s_server. - [Steve Henson] - - Changes between 0.9.8f and 0.9.8g [19 Oct 2007] - - *) Fix various bugs: - + Binary incompatibility of ssl_ctx_st structure - + DTLS interoperation with non-compliant servers - + Don't call get_session_cb() without proposed session - + Fix ia64 assembler code - [Andy Polyakov, Steve Henson] - - Changes between 0.9.8e and 0.9.8f [11 Oct 2007] - - *) DTLS Handshake overhaul. There were longstanding issues with - OpenSSL DTLS implementation, which were making it impossible for - RFC 4347 compliant client to communicate with OpenSSL server. - Unfortunately just fixing these incompatibilities would "cut off" - pre-0.9.8f clients. To allow for hassle free upgrade post-0.9.8e - server keeps tolerating non RFC compliant syntax. The opposite is - not true, 0.9.8f client can not communicate with earlier server. - This update even addresses CVE-2007-4995. - [Andy Polyakov] - - *) Changes to avoid need for function casts in OpenSSL: some compilers - (gcc 4.2 and later) reject their use. - [Kurt Roeckx , Peter Hartley , - Steve Henson] - - *) Add RFC4507 support to OpenSSL. This includes the corrections in - RFC4507bis. The encrypted ticket format is an encrypted encoded - SSL_SESSION structure, that way new session features are automatically - supported. - - If a client application caches session in an SSL_SESSION structure - support is transparent because tickets are now stored in the encoded - SSL_SESSION. - - The SSL_CTX structure automatically generates keys for ticket - protection in servers so again support should be possible - with no application modification. - - If a client or server wishes to disable RFC4507 support then the option - SSL_OP_NO_TICKET can be set. - - Add a TLS extension debugging callback to allow the contents of any client - or server extensions to be examined. - - This work was sponsored by Google. - [Steve Henson] - - *) Add initial support for TLS extensions, specifically for the server_name - extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now - have new members for a host name. The SSL data structure has an - additional member SSL_CTX *initial_ctx so that new sessions can be - stored in that context to allow for session resumption, even after the - SSL has been switched to a new SSL_CTX in reaction to a client's - server_name extension. - - New functions (subject to change): - - SSL_get_servername() - SSL_get_servername_type() - SSL_set_SSL_CTX() - - New CTRL codes and macros (subject to change): - - SSL_CTRL_SET_TLSEXT_SERVERNAME_CB - - SSL_CTX_set_tlsext_servername_callback() - SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG - - SSL_CTX_set_tlsext_servername_arg() - SSL_CTRL_SET_TLSEXT_HOSTNAME - SSL_set_tlsext_host_name() - - openssl s_client has a new '-servername ...' option. - - openssl s_server has new options '-servername_host ...', '-cert2 ...', - '-key2 ...', '-servername_fatal' (subject to change). This allows - testing the HostName extension for a specific single host name ('-cert' - and '-key' remain fallbacks for handshakes without HostName - negotiation). If the unrecogninzed_name alert has to be sent, this by - default is a warning; it becomes fatal with the '-servername_fatal' - option. - - [Peter Sylvester, Remy Allais, Christophe Renou, Steve Henson] - - *) Add AES and SSE2 assembly language support to VC++ build. - [Steve Henson] - - *) Mitigate attack on final subtraction in Montgomery reduction. - [Andy Polyakov] - - *) Fix crypto/ec/ec_mult.c to work properly with scalars of value 0 - (which previously caused an internal error). - [Bodo Moeller] - - *) Squeeze another 10% out of IGE mode when in != out. - [Ben Laurie] - - *) AES IGE mode speedup. - [Dean Gaudet (Google)] - - *) Add the Korean symmetric 128-bit cipher SEED (see - http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp) and - add SEED ciphersuites from RFC 4162: - - TLS_RSA_WITH_SEED_CBC_SHA = "SEED-SHA" - TLS_DHE_DSS_WITH_SEED_CBC_SHA = "DHE-DSS-SEED-SHA" - TLS_DHE_RSA_WITH_SEED_CBC_SHA = "DHE-RSA-SEED-SHA" - TLS_DH_anon_WITH_SEED_CBC_SHA = "ADH-SEED-SHA" - - To minimize changes between patchlevels in the OpenSSL 0.9.8 - series, SEED remains excluded from compilation unless OpenSSL - is configured with 'enable-seed'. - [KISA, Bodo Moeller] - - *) Mitigate branch prediction attacks, which can be practical if a - single processor is shared, allowing a spy process to extract - information. For detailed background information, see - http://eprint.iacr.org/2007/039 (O. Aciicmez, S. Gueron, - J.-P. Seifert, "New Branch Prediction Vulnerabilities in OpenSSL - and Necessary Software Countermeasures"). The core of the change - are new versions BN_div_no_branch() and - BN_mod_inverse_no_branch() of BN_div() and BN_mod_inverse(), - respectively, which are slower, but avoid the security-relevant - conditional branches. These are automatically called by BN_div() - and BN_mod_inverse() if the flag BN_FLG_CONSTTIME is set for one - of the input BIGNUMs. Also, BN_is_bit_set() has been changed to - remove a conditional branch. - - BN_FLG_CONSTTIME is the new name for the previous - BN_FLG_EXP_CONSTTIME flag, since it now affects more than just - modular exponentiation. (Since OpenSSL 0.9.7h, setting this flag - in the exponent causes BN_mod_exp_mont() to use the alternative - implementation in BN_mod_exp_mont_consttime().) The old name - remains as a deprecated alias. - - Similary, RSA_FLAG_NO_EXP_CONSTTIME is replaced by a more general - RSA_FLAG_NO_CONSTTIME flag since the RSA implementation now uses - constant-time implementations for more than just exponentiation. - Here too the old name is kept as a deprecated alias. - - BN_BLINDING_new() will now use BN_dup() for the modulus so that - the BN_BLINDING structure gets an independent copy of the - modulus. This means that the previous "BIGNUM *m" argument to - BN_BLINDING_new() and to BN_BLINDING_create_param() now - essentially becomes "const BIGNUM *m", although we can't actually - change this in the header file before 0.9.9. It allows - RSA_setup_blinding() to use BN_with_flags() on the modulus to - enable BN_FLG_CONSTTIME. - - [Matthew D Wood (Intel Corp)] - - *) In the SSL/TLS server implementation, be strict about session ID - context matching (which matters if an application uses a single - external cache for different purposes). Previously, - out-of-context reuse was forbidden only if SSL_VERIFY_PEER was - set. This did ensure strict client verification, but meant that, - with applications using a single external cache for quite - different requirements, clients could circumvent ciphersuite - restrictions for a given session ID context by starting a session - in a different context. - [Bodo Moeller] - - *) Include "!eNULL" in SSL_DEFAULT_CIPHER_LIST to make sure that - a ciphersuite string such as "DEFAULT:RSA" cannot enable - authentication-only ciphersuites. - [Bodo Moeller] - - *) Update the SSL_get_shared_ciphers() fix CVE-2006-3738 which was - not complete and could lead to a possible single byte overflow - (CVE-2007-5135) [Ben Laurie] - - Changes between 0.9.8d and 0.9.8e [23 Feb 2007] - - *) Since AES128 and AES256 (and similarly Camellia128 and - Camellia256) share a single mask bit in the logic of - ssl/ssl_ciph.c, the code for masking out disabled ciphers needs a - kludge to work properly if AES128 is available and AES256 isn't - (or if Camellia128 is available and Camellia256 isn't). - [Victor Duchovni] - - *) Fix the BIT STRING encoding generated by crypto/ec/ec_asn1.c - (within i2d_ECPrivateKey, i2d_ECPKParameters, i2d_ECParameters): - When a point or a seed is encoded in a BIT STRING, we need to - prevent the removal of trailing zero bits to get the proper DER - encoding. (By default, crypto/asn1/a_bitstr.c assumes the case - of a NamedBitList, for which trailing 0 bits need to be removed.) - [Bodo Moeller] - - *) Have SSL/TLS server implementation tolerate "mismatched" record - protocol version while receiving ClientHello even if the - ClientHello is fragmented. (The server can't insist on the - particular protocol version it has chosen before the ServerHello - message has informed the client about his choice.) - [Bodo Moeller] - - *) Add RFC 3779 support. - [Rob Austein for ARIN, Ben Laurie] - - *) Load error codes if they are not already present instead of using a - static variable. This allows them to be cleanly unloaded and reloaded. - Improve header file function name parsing. - [Steve Henson] - - *) extend SMTP and IMAP protocol emulation in s_client to use EHLO - or CAPABILITY handshake as required by RFCs. - [Goetz Babin-Ebell] - - Changes between 0.9.8c and 0.9.8d [28 Sep 2006] - - *) Introduce limits to prevent malicious keys being able to - cause a denial of service. (CVE-2006-2940) - [Steve Henson, Bodo Moeller] - - *) Fix ASN.1 parsing of certain invalid structures that can result - in a denial of service. (CVE-2006-2937) [Steve Henson] - - *) Fix buffer overflow in SSL_get_shared_ciphers() function. - (CVE-2006-3738) [Tavis Ormandy and Will Drewry, Google Security Team] - - *) Fix SSL client code which could crash if connecting to a - malicious SSLv2 server. (CVE-2006-4343) - [Tavis Ormandy and Will Drewry, Google Security Team] - - *) Since 0.9.8b, ciphersuite strings naming explicit ciphersuites - match only those. Before that, "AES256-SHA" would be interpreted - as a pattern and match "AES128-SHA" too (since AES128-SHA got - the same strength classification in 0.9.7h) as we currently only - have a single AES bit in the ciphersuite description bitmap. - That change, however, also applied to ciphersuite strings such as - "RC4-MD5" that intentionally matched multiple ciphersuites -- - namely, SSL 2.0 ciphersuites in addition to the more common ones - from SSL 3.0/TLS 1.0. - - So we change the selection algorithm again: Naming an explicit - ciphersuite selects this one ciphersuite, and any other similar - ciphersuite (same bitmap) from *other* protocol versions. - Thus, "RC4-MD5" again will properly select both the SSL 2.0 - ciphersuite and the SSL 3.0/TLS 1.0 ciphersuite. - - Since SSL 2.0 does not have any ciphersuites for which the - 128/256 bit distinction would be relevant, this works for now. - The proper fix will be to use different bits for AES128 and - AES256, which would have avoided the problems from the beginning; - however, bits are scarce, so we can only do this in a new release - (not just a patchlevel) when we can change the SSL_CIPHER - definition to split the single 'unsigned long mask' bitmap into - multiple values to extend the available space. - - [Bodo Moeller] - - Changes between 0.9.8b and 0.9.8c [05 Sep 2006] - - *) Avoid PKCS #1 v1.5 signature attack discovered by Daniel Bleichenbacher - (CVE-2006-4339) [Ben Laurie and Google Security Team] - - *) Add AES IGE and biIGE modes. - [Ben Laurie] - - *) Change the Unix randomness entropy gathering to use poll() when - possible instead of select(), since the latter has some - undesirable limitations. - [Darryl Miles via Richard Levitte and Bodo Moeller] - - *) Disable "ECCdraft" ciphersuites more thoroughly. Now special - treatment in ssl/ssl_ciph.s makes sure that these ciphersuites - cannot be implicitly activated as part of, e.g., the "AES" alias. - However, please upgrade to OpenSSL 0.9.9[-dev] for - non-experimental use of the ECC ciphersuites to get TLS extension - support, which is required for curve and point format negotiation - to avoid potential handshake problems. - [Bodo Moeller] - - *) Disable rogue ciphersuites: - - - SSLv2 0x08 0x00 0x80 ("RC4-64-MD5") - - SSLv3/TLSv1 0x00 0x61 ("EXP1024-RC2-CBC-MD5") - - SSLv3/TLSv1 0x00 0x60 ("EXP1024-RC4-MD5") - - The latter two were purportedly from - draft-ietf-tls-56-bit-ciphersuites-0[01].txt, but do not really - appear there. - - Also deactivate the remaining ciphersuites from - draft-ietf-tls-56-bit-ciphersuites-01.txt. These are just as - unofficial, and the ID has long expired. - [Bodo Moeller] - - *) Fix RSA blinding Heisenbug (problems sometimes occured on - dual-core machines) and other potential thread-safety issues. - [Bodo Moeller] - - *) Add the symmetric cipher Camellia (128-bit, 192-bit, 256-bit key - versions), which is now available for royalty-free use - (see http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html). - Also, add Camellia TLS ciphersuites from RFC 4132. - - To minimize changes between patchlevels in the OpenSSL 0.9.8 - series, Camellia remains excluded from compilation unless OpenSSL - is configured with 'enable-camellia'. - [NTT] - - *) Disable the padding bug check when compression is in use. The padding - bug check assumes the first packet is of even length, this is not - necessarily true if compresssion is enabled and can result in false - positives causing handshake failure. The actual bug test is ancient - code so it is hoped that implementations will either have fixed it by - now or any which still have the bug do not support compression. - [Steve Henson] - - Changes between 0.9.8a and 0.9.8b [04 May 2006] - - *) When applying a cipher rule check to see if string match is an explicit - cipher suite and only match that one cipher suite if it is. - [Steve Henson] - - *) Link in manifests for VC++ if needed. - [Austin Ziegler ] - - *) Update support for ECC-based TLS ciphersuites according to - draft-ietf-tls-ecc-12.txt with proposed changes (but without - TLS extensions, which are supported starting with the 0.9.9 - branch, not in the OpenSSL 0.9.8 branch). - [Douglas Stebila] - - *) New functions EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() to support - opaque EVP_CIPHER_CTX handling. - [Steve Henson] - - *) Fixes and enhancements to zlib compression code. We now only use - "zlib1.dll" and use the default __cdecl calling convention on Win32 - to conform with the standards mentioned here: - http://www.zlib.net/DLL_FAQ.txt - Static zlib linking now works on Windows and the new --with-zlib-include - --with-zlib-lib options to Configure can be used to supply the location - of the headers and library. Gracefully handle case where zlib library - can't be loaded. - [Steve Henson] - - *) Several fixes and enhancements to the OID generation code. The old code - sometimes allowed invalid OIDs (1.X for X >= 40 for example), couldn't - handle numbers larger than ULONG_MAX, truncated printing and had a - non standard OBJ_obj2txt() behaviour. - [Steve Henson] - - *) Add support for building of engines under engine/ as shared libraries - under VC++ build system. - [Steve Henson] - - *) Corrected the numerous bugs in the Win32 path splitter in DSO. - Hopefully, we will not see any false combination of paths any more. - [Richard Levitte] - - Changes between 0.9.8 and 0.9.8a [11 Oct 2005] - - *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING - (part of SSL_OP_ALL). This option used to disable the - countermeasure against man-in-the-middle protocol-version - rollback in the SSL 2.0 server implementation, which is a bad - idea. (CVE-2005-2969) - - [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center - for Information Security, National Institute of Advanced Industrial - Science and Technology [AIST], Japan)] - - *) Add two function to clear and return the verify parameter flags. - [Steve Henson] - - *) Keep cipherlists sorted in the source instead of sorting them at - runtime, thus removing the need for a lock. - [Nils Larsch] - - *) Avoid some small subgroup attacks in Diffie-Hellman. - [Nick Mathewson and Ben Laurie] - - *) Add functions for well-known primes. - [Nick Mathewson] - - *) Extended Windows CE support. - [Satoshi Nakamura and Andy Polyakov] - - *) Initialize SSL_METHOD structures at compile time instead of during - runtime, thus removing the need for a lock. - [Steve Henson] - - *) Make PKCS7_decrypt() work even if no certificate is supplied by - attempting to decrypt each encrypted key in turn. Add support to - smime utility. - [Steve Henson] - - Changes between 0.9.7h and 0.9.8 [05 Jul 2005] - - [NB: OpenSSL 0.9.7i and later 0.9.7 patch levels were released after - OpenSSL 0.9.8.] - - *) Add libcrypto.pc and libssl.pc for those who feel they need them. - [Richard Levitte] - - *) Change CA.sh and CA.pl so they don't bundle the CSR and the private - key into the same file any more. - [Richard Levitte] - - *) Add initial support for Win64, both IA64 and AMD64/x64 flavors. - [Andy Polyakov] - - *) Add -utf8 command line and config file option to 'ca'. - [Stefan and Geoff Thorpe] - - *) Add attribute functions to EVP_PKEY structure. Modify - PKCS12_create() to recognize a CSP name attribute and - use it. Make -CSP option work again in pkcs12 utility. - [Steve Henson] - - *) Add new functionality to the bn blinding code: - - automatic re-creation of the BN_BLINDING parameters after - a fixed number of uses (currently 32) - - add new function for parameter creation - - introduce flags to control the update behaviour of the - BN_BLINDING parameters - - hide BN_BLINDING structure - Add a second BN_BLINDING slot to the RSA structure to improve - performance when a single RSA object is shared among several - threads. - [Nils Larsch] - - *) Add support for DTLS. - [Nagendra Modadugu and Ben Laurie] - - *) Add support for DER encoded private keys (SSL_FILETYPE_ASN1) - to SSL_CTX_use_PrivateKey_file() and SSL_use_PrivateKey_file() - [Walter Goulet] - - *) Remove buggy and incompletet DH cert support from - ssl/ssl_rsa.c and ssl/s3_both.c - [Nils Larsch] - - *) Use SHA-1 instead of MD5 as the default digest algorithm for - the apps/openssl applications. - [Nils Larsch] - - *) Compile clean with "-Wall -Wmissing-prototypes - -Wstrict-prototypes -Wmissing-declarations -Werror". Currently - DEBUG_SAFESTACK must also be set. - [Ben Laurie] - - *) Change ./Configure so that certain algorithms can be disabled by default. - The new counterpiece to "no-xxx" is "enable-xxx". - - The patented RC5 and MDC2 algorithms will now be disabled unless - "enable-rc5" and "enable-mdc2", respectively, are specified. - - (IDEA remains enabled despite being patented. This is because IDEA - is frequently required for interoperability, and there is no license - fee for non-commercial use. As before, "no-idea" can be used to - avoid this algorithm.) - - [Bodo Moeller] - - *) Add processing of proxy certificates (see RFC 3820). This work was - sponsored by KTH (The Royal Institute of Technology in Stockholm) and - EGEE (Enabling Grids for E-science in Europe). - [Richard Levitte] - - *) RC4 performance overhaul on modern architectures/implementations, such - as Intel P4, IA-64 and AMD64. - [Andy Polyakov] - - *) New utility extract-section.pl. This can be used specify an alternative - section number in a pod file instead of having to treat each file as - a separate case in Makefile. This can be done by adding two lines to the - pod file: - - =for comment openssl_section:XXX - - The blank line is mandatory. - - [Steve Henson] - - *) New arguments -certform, -keyform and -pass for s_client and s_server - to allow alternative format key and certificate files and passphrase - sources. - [Steve Henson] - - *) New structure X509_VERIFY_PARAM which combines current verify parameters, - update associated structures and add various utility functions. - - Add new policy related verify parameters, include policy checking in - standard verify code. Enhance 'smime' application with extra parameters - to support policy checking and print out. - [Steve Henson] - - *) Add a new engine to support VIA PadLock ACE extensions in the VIA C3 - Nehemiah processors. These extensions support AES encryption in hardware - as well as RNG (though RNG support is currently disabled). - [Michal Ludvig , with help from Andy Polyakov] - - *) Deprecate BN_[get|set]_params() functions (they were ignored internally). - [Geoff Thorpe] - - *) New FIPS 180-2 algorithms, SHA-224/-256/-384/-512 are implemented. - [Andy Polyakov and a number of other people] - - *) Improved PowerPC platform support. Most notably BIGNUM assembler - implementation contributed by IBM. - [Suresh Chari, Peter Waltenberg, Andy Polyakov] - - *) The new 'RSA_generate_key_ex' function now takes a BIGNUM for the public - exponent rather than 'unsigned long'. There is a corresponding change to - the new 'rsa_keygen' element of the RSA_METHOD structure. - [Jelte Jansen, Geoff Thorpe] - - *) Functionality for creating the initial serial number file is now - moved from CA.pl to the 'ca' utility with a new option -create_serial. - - (Before OpenSSL 0.9.7e, CA.pl used to initialize the serial - number file to 1, which is bound to cause problems. To avoid - the problems while respecting compatibility between different 0.9.7 - patchlevels, 0.9.7e employed 'openssl x509 -next_serial' in - CA.pl for serial number initialization. With the new release 0.9.8, - we can fix the problem directly in the 'ca' utility.) - [Steve Henson] - - *) Reduced header interdepencies by declaring more opaque objects in - ossl_typ.h. As a consequence, including some headers (eg. engine.h) will - give fewer recursive includes, which could break lazy source code - so - this change is covered by the OPENSSL_NO_DEPRECATED symbol. As always, - developers should define this symbol when building and using openssl to - ensure they track the recommended behaviour, interfaces, [etc], but - backwards-compatible behaviour prevails when this isn't defined. - [Geoff Thorpe] - - *) New function X509_POLICY_NODE_print() which prints out policy nodes. - [Steve Henson] - - *) Add new EVP function EVP_CIPHER_CTX_rand_key and associated functionality. - This will generate a random key of the appropriate length based on the - cipher context. The EVP_CIPHER can provide its own random key generation - routine to support keys of a specific form. This is used in the des and - 3des routines to generate a key of the correct parity. Update S/MIME - code to use new functions and hence generate correct parity DES keys. - Add EVP_CHECK_DES_KEY #define to return an error if the key is not - valid (weak or incorrect parity). - [Steve Henson] - - *) Add a local set of CRLs that can be used by X509_verify_cert() as well - as looking them up. This is useful when the verified structure may contain - CRLs, for example PKCS#7 signedData. Modify PKCS7_verify() to use any CRLs - present unless the new PKCS7_NO_CRL flag is asserted. - [Steve Henson] - - *) Extend ASN1 oid configuration module. It now additionally accepts the - syntax: - - shortName = some long name, 1.2.3.4 - [Steve Henson] - - *) Reimplemented the BN_CTX implementation. There is now no more static - limitation on the number of variables it can handle nor the depth of the - "stack" handling for BN_CTX_start()/BN_CTX_end() pairs. The stack - information can now expand as required, and rather than having a single - static array of bignums, BN_CTX now uses a linked-list of such arrays - allowing it to expand on demand whilst maintaining the usefulness of - BN_CTX's "bundling". - [Geoff Thorpe] - - *) Add a missing BN_CTX parameter to the 'rsa_mod_exp' callback in RSA_METHOD - to allow all RSA operations to function using a single BN_CTX. - [Geoff Thorpe] - - *) Preliminary support for certificate policy evaluation and checking. This - is initially intended to pass the tests outlined in "Conformance Testing - of Relying Party Client Certificate Path Processing Logic" v1.07. - [Steve Henson] - - *) bn_dup_expand() has been deprecated, it was introduced in 0.9.7 and - remained unused and not that useful. A variety of other little bignum - tweaks and fixes have also been made continuing on from the audit (see - below). - [Geoff Thorpe] - - *) Constify all or almost all d2i, c2i, s2i and r2i functions, along with - associated ASN1, EVP and SSL functions and old ASN1 macros. - [Richard Levitte] - - *) BN_zero() only needs to set 'top' and 'neg' to zero for correct results, - and this should never fail. So the return value from the use of - BN_set_word() (which can fail due to needless expansion) is now deprecated; - if OPENSSL_NO_DEPRECATED is defined, BN_zero() is a void macro. - [Geoff Thorpe] - - *) BN_CTX_get() should return zero-valued bignums, providing the same - initialised value as BN_new(). - [Geoff Thorpe, suggested by Ulf Möller] - - *) Support for inhibitAnyPolicy certificate extension. - [Steve Henson] - - *) An audit of the BIGNUM code is underway, for which debugging code is - enabled when BN_DEBUG is defined. This makes stricter enforcements on what - is considered valid when processing BIGNUMs, and causes execution to - assert() when a problem is discovered. If BN_DEBUG_RAND is defined, - further steps are taken to deliberately pollute unused data in BIGNUM - structures to try and expose faulty code further on. For now, openssl will - (in its default mode of operation) continue to tolerate the inconsistent - forms that it has tolerated in the past, but authors and packagers should - consider trying openssl and their own applications when compiled with - these debugging symbols defined. It will help highlight potential bugs in - their own code, and will improve the test coverage for OpenSSL itself. At - some point, these tighter rules will become openssl's default to improve - maintainability, though the assert()s and other overheads will remain only - in debugging configurations. See bn.h for more details. - [Geoff Thorpe, Nils Larsch, Ulf Möller] - - *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure - that can only be obtained through BN_CTX_new() (which implicitly - initialises it). The presence of this function only made it possible - to overwrite an existing structure (and cause memory leaks). - [Geoff Thorpe] - - *) Because of the callback-based approach for implementing LHASH as a - template type, lh_insert() adds opaque objects to hash-tables and - lh_doall() or lh_doall_arg() are typically used with a destructor callback - to clean up those corresponding objects before destroying the hash table - (and losing the object pointers). So some over-zealous constifications in - LHASH have been relaxed so that lh_insert() does not take (nor store) the - objects as "const" and the lh_doall[_arg] callback wrappers are not - prototyped to have "const" restrictions on the object pointers they are - given (and so aren't required to cast them away any more). - [Geoff Thorpe] - - *) The tmdiff.h API was so ugly and minimal that our own timing utility - (speed) prefers to use its own implementation. The two implementations - haven't been consolidated as yet (volunteers?) but the tmdiff API has had - its object type properly exposed (MS_TM) instead of casting to/from "char - *". This may still change yet if someone realises MS_TM and "ms_time_***" - aren't necessarily the greatest nomenclatures - but this is what was used - internally to the implementation so I've used that for now. - [Geoff Thorpe] - - *) Ensure that deprecated functions do not get compiled when - OPENSSL_NO_DEPRECATED is defined. Some "openssl" subcommands and a few of - the self-tests were still using deprecated key-generation functions so - these have been updated also. - [Geoff Thorpe] - - *) Reorganise PKCS#7 code to separate the digest location functionality - into PKCS7_find_digest(), digest addtion into PKCS7_bio_add_digest(). - New function PKCS7_set_digest() to set the digest type for PKCS#7 - digestedData type. Add additional code to correctly generate the - digestedData type and add support for this type in PKCS7 initialization - functions. - [Steve Henson] - - *) New function PKCS7_set0_type_other() this initializes a PKCS7 - structure of type "other". - [Steve Henson] - - *) Fix prime generation loop in crypto/bn/bn_prime.pl by making - sure the loop does correctly stop and breaking ("division by zero") - modulus operations are not performed. The (pre-generated) prime - table crypto/bn/bn_prime.h was already correct, but it could not be - re-generated on some platforms because of the "division by zero" - situation in the script. - [Ralf S. Engelschall] - - *) Update support for ECC-based TLS ciphersuites according to - draft-ietf-tls-ecc-03.txt: the KDF1 key derivation function with - SHA-1 now is only used for "small" curves (where the - representation of a field element takes up to 24 bytes); for - larger curves, the field element resulting from ECDH is directly - used as premaster secret. - [Douglas Stebila (Sun Microsystems Laboratories)] - - *) Add code for kP+lQ timings to crypto/ec/ectest.c, and add SEC2 - curve secp160r1 to the tests. - [Douglas Stebila (Sun Microsystems Laboratories)] - - *) Add the possibility to load symbols globally with DSO. - [Götz Babin-Ebell via Richard Levitte] - - *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better - control of the error stack. - [Richard Levitte] - - *) Add support for STORE in ENGINE. - [Richard Levitte] - - *) Add the STORE type. The intention is to provide a common interface - to certificate and key stores, be they simple file-based stores, or - HSM-type store, or LDAP stores, or... - NOTE: The code is currently UNTESTED and isn't really used anywhere. - [Richard Levitte] - - *) Add a generic structure called OPENSSL_ITEM. This can be used to - pass a list of arguments to any function as well as provide a way - for a function to pass data back to the caller. - [Richard Levitte] - - *) Add the functions BUF_strndup() and BUF_memdup(). BUF_strndup() - works like BUF_strdup() but can be used to duplicate a portion of - a string. The copy gets NUL-terminated. BUF_memdup() duplicates - a memory area. - [Richard Levitte] - - *) Add the function sk_find_ex() which works like sk_find(), but will - return an index to an element even if an exact match couldn't be - found. The index is guaranteed to point at the element where the - searched-for key would be inserted to preserve sorting order. - [Richard Levitte] - - *) Add the function OBJ_bsearch_ex() which works like OBJ_bsearch() but - takes an extra flags argument for optional functionality. Currently, - the following flags are defined: - - OBJ_BSEARCH_VALUE_ON_NOMATCH - This one gets OBJ_bsearch_ex() to return a pointer to the first - element where the comparing function returns a negative or zero - number. - - OBJ_BSEARCH_FIRST_VALUE_ON_MATCH - This one gets OBJ_bsearch_ex() to return a pointer to the first - element where the comparing function returns zero. This is useful - if there are more than one element where the comparing function - returns zero. - [Richard Levitte] - - *) Make it possible to create self-signed certificates with 'openssl ca' - in such a way that the self-signed certificate becomes part of the - CA database and uses the same mechanisms for serial number generation - as all other certificate signing. The new flag '-selfsign' enables - this functionality. Adapt CA.sh and CA.pl.in. - [Richard Levitte] - - *) Add functionality to check the public key of a certificate request - against a given private. This is useful to check that a certificate - request can be signed by that key (self-signing). - [Richard Levitte] - - *) Make it possible to have multiple active certificates with the same - subject in the CA index file. This is done only if the keyword - 'unique_subject' is set to 'no' in the main CA section (default - if 'CA_default') of the configuration file. The value is saved - with the database itself in a separate index attribute file, - named like the index file with '.attr' appended to the name. - [Richard Levitte] - - *) Generate muti valued AVAs using '+' notation in config files for - req and dirName. - [Steve Henson] - - *) Support for nameConstraints certificate extension. - [Steve Henson] - - *) Support for policyConstraints certificate extension. - [Steve Henson] - - *) Support for policyMappings certificate extension. - [Steve Henson] - - *) Make sure the default DSA_METHOD implementation only uses its - dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL, - and change its own handlers to be NULL so as to remove unnecessary - indirection. This lets alternative implementations fallback to the - default implementation more easily. - [Geoff Thorpe] - - *) Support for directoryName in GeneralName related extensions - in config files. - [Steve Henson] - - *) Make it possible to link applications using Makefile.shared. - Make that possible even when linking against static libraries! - [Richard Levitte] - - *) Support for single pass processing for S/MIME signing. This now - means that S/MIME signing can be done from a pipe, in addition - cleartext signing (multipart/signed type) is effectively streaming - and the signed data does not need to be all held in memory. - - This is done with a new flag PKCS7_STREAM. When this flag is set - PKCS7_sign() only initializes the PKCS7 structure and the actual signing - is done after the data is output (and digests calculated) in - SMIME_write_PKCS7(). - [Steve Henson] - - *) Add full support for -rpath/-R, both in shared libraries and - applications, at least on the platforms where it's known how - to do it. - [Richard Levitte] - - *) In crypto/ec/ec_mult.c, implement fast point multiplication with - precomputation, based on wNAF splitting: EC_GROUP_precompute_mult() - will now compute a table of multiples of the generator that - makes subsequent invocations of EC_POINTs_mul() or EC_POINT_mul() - faster (notably in the case of a single point multiplication, - scalar * generator). - [Nils Larsch, Bodo Moeller] - - *) IPv6 support for certificate extensions. The various extensions - which use the IP:a.b.c.d can now take IPv6 addresses using the - formats of RFC1884 2.2 . IPv6 addresses are now also displayed - correctly. - [Steve Henson] - - *) Added an ENGINE that implements RSA by performing private key - exponentiations with the GMP library. The conversions to and from - GMP's mpz_t format aren't optimised nor are any montgomery forms - cached, and on x86 it appears OpenSSL's own performance has caught up. - However there are likely to be other architectures where GMP could - provide a boost. This ENGINE is not built in by default, but it can be - specified at Configure time and should be accompanied by the necessary - linker additions, eg; - ./config -DOPENSSL_USE_GMP -lgmp - [Geoff Thorpe] - - *) "openssl engine" will not display ENGINE/DSO load failure errors when - testing availability of engines with "-t" - the old behaviour is - produced by increasing the feature's verbosity with "-tt". - [Geoff Thorpe] - - *) ECDSA routines: under certain error conditions uninitialized BN objects - could be freed. Solution: make sure initialization is performed early - enough. (Reported and fix supplied by Nils Larsch - via PR#459) - [Lutz Jaenicke] - - *) Key-generation can now be implemented in RSA_METHOD, DSA_METHOD - and DH_METHOD (eg. by ENGINE implementations) to override the normal - software implementations. For DSA and DH, parameter generation can - also be overriden by providing the appropriate method callbacks. - [Geoff Thorpe] - - *) Change the "progress" mechanism used in key-generation and - primality testing to functions that take a new BN_GENCB pointer in - place of callback/argument pairs. The new API functions have "_ex" - postfixes and the older functions are reimplemented as wrappers for - the new ones. The OPENSSL_NO_DEPRECATED symbol can be used to hide - declarations of the old functions to help (graceful) attempts to - migrate to the new functions. Also, the new key-generation API - functions operate on a caller-supplied key-structure and return - success/failure rather than returning a key or NULL - this is to - help make "keygen" another member function of RSA_METHOD etc. - - Example for using the new callback interface: - - int (*my_callback)(int a, int b, BN_GENCB *cb) = ...; - void *my_arg = ...; - BN_GENCB my_cb; - - BN_GENCB_set(&my_cb, my_callback, my_arg); - - return BN_is_prime_ex(some_bignum, BN_prime_checks, NULL, &cb); - /* For the meaning of a, b in calls to my_callback(), see the - * documentation of the function that calls the callback. - * cb will point to my_cb; my_arg can be retrieved as cb->arg. - * my_callback should return 1 if it wants BN_is_prime_ex() - * to continue, or 0 to stop. - */ - - [Geoff Thorpe] - - *) Change the ZLIB compression method to be stateful, and make it - available to TLS with the number defined in - draft-ietf-tls-compression-04.txt. - [Richard Levitte] - - *) Add the ASN.1 structures and functions for CertificatePair, which - is defined as follows (according to X.509_4thEditionDraftV6.pdf): - - CertificatePair ::= SEQUENCE { - forward [0] Certificate OPTIONAL, - reverse [1] Certificate OPTIONAL, - -- at least one of the pair shall be present -- } - - Also implement the PEM functions to read and write certificate - pairs, and defined the PEM tag as "CERTIFICATE PAIR". - - This needed to be defined, mostly for the sake of the LDAP - attribute crossCertificatePair, but may prove useful elsewhere as - well. - [Richard Levitte] - - *) Make it possible to inhibit symlinking of shared libraries in - Makefile.shared, for Cygwin's sake. - [Richard Levitte] - - *) Extend the BIGNUM API by creating a function - void BN_set_negative(BIGNUM *a, int neg); - and a macro that behave like - int BN_is_negative(const BIGNUM *a); - - to avoid the need to access 'a->neg' directly in applications. - [Nils Larsch] - - *) Implement fast modular reduction for pseudo-Mersenne primes - used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c). - EC_GROUP_new_curve_GFp() will now automatically use this - if applicable. - [Nils Larsch ] - - *) Add new lock type (CRYPTO_LOCK_BN). - [Bodo Moeller] - - *) Change the ENGINE framework to automatically load engines - dynamically from specific directories unless they could be - found to already be built in or loaded. Move all the - current engines except for the cryptodev one to a new - directory engines/. - The engines in engines/ are built as shared libraries if - the "shared" options was given to ./Configure or ./config. - Otherwise, they are inserted in libcrypto.a. - /usr/local/ssl/engines is the default directory for dynamic - engines, but that can be overriden at configure time through - the usual use of --prefix and/or --openssldir, and at run - time with the environment variable OPENSSL_ENGINES. - [Geoff Thorpe and Richard Levitte] - - *) Add Makefile.shared, a helper makefile to build shared - libraries. Addapt Makefile.org. - [Richard Levitte] - - *) Add version info to Win32 DLLs. - [Peter 'Luna' Runestig" ] - - *) Add new 'medium level' PKCS#12 API. Certificates and keys - can be added using this API to created arbitrary PKCS#12 - files while avoiding the low level API. - - New options to PKCS12_create(), key or cert can be NULL and - will then be omitted from the output file. The encryption - algorithm NIDs can be set to -1 for no encryption, the mac - iteration count can be set to 0 to omit the mac. - - Enhance pkcs12 utility by making the -nokeys and -nocerts - options work when creating a PKCS#12 file. New option -nomac - to omit the mac, NONE can be set for an encryption algorithm. - New code is modified to use the enhanced PKCS12_create() - instead of the low level API. - [Steve Henson] - - *) Extend ASN1 encoder to support indefinite length constructed - encoding. This can output sequences tags and octet strings in - this form. Modify pk7_asn1.c to support indefinite length - encoding. This is experimental and needs additional code to - be useful, such as an ASN1 bio and some enhanced streaming - PKCS#7 code. - - Extend template encode functionality so that tagging is passed - down to the template encoder. - [Steve Henson] - - *) Let 'openssl req' fail if an argument to '-newkey' is not - recognized instead of using RSA as a default. - [Bodo Moeller] - - *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt. - As these are not official, they are not included in "ALL"; - the "ECCdraft" ciphersuite group alias can be used to select them. - [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)] - - *) Add ECDH engine support. - [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)] - - *) Add ECDH in new directory crypto/ecdh/. - [Douglas Stebila (Sun Microsystems Laboratories)] - - *) Let BN_rand_range() abort with an error after 100 iterations - without success (which indicates a broken PRNG). - [Bodo Moeller] - - *) Change BN_mod_sqrt() so that it verifies that the input value - is really the square of the return value. (Previously, - BN_mod_sqrt would show GIGO behaviour.) - [Bodo Moeller] - - *) Add named elliptic curves over binary fields from X9.62, SECG, - and WAP/WTLS; add OIDs that were still missing. - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) Extend the EC library for elliptic curves over binary fields - (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/). - New EC_METHOD: - - EC_GF2m_simple_method - - New API functions: - - EC_GROUP_new_curve_GF2m - EC_GROUP_set_curve_GF2m - EC_GROUP_get_curve_GF2m - EC_POINT_set_affine_coordinates_GF2m - EC_POINT_get_affine_coordinates_GF2m - EC_POINT_set_compressed_coordinates_GF2m - - Point compression for binary fields is disabled by default for - patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to - enable it). - - As binary polynomials are represented as BIGNUMs, various members - of the EC_GROUP and EC_POINT data structures can be shared - between the implementations for prime fields and binary fields; - the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m) - are essentially identical to their ..._GFp counterparts. - (For simplicity, the '..._GFp' prefix has been dropped from - various internal method names.) - - An internal 'field_div' method (similar to 'field_mul' and - 'field_sqr') has been added; this is used only for binary fields. - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult() - through methods ('mul', 'precompute_mult'). - - The generic implementations (now internally called 'ec_wNAF_mul' - and 'ec_wNAF_precomputed_mult') remain the default if these - methods are undefined. - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) New function EC_GROUP_get_degree, which is defined through - EC_METHOD. For curves over prime fields, this returns the bit - length of the modulus. - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) New functions EC_GROUP_dup, EC_POINT_dup. - (These simply call ..._new and ..._copy). - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c. - Polynomials are represented as BIGNUMs (where the sign bit is not - used) in the following functions [macros]: - - BN_GF2m_add - BN_GF2m_sub [= BN_GF2m_add] - BN_GF2m_mod [wrapper for BN_GF2m_mod_arr] - BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr] - BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr] - BN_GF2m_mod_inv - BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr] - BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr] - BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr] - BN_GF2m_cmp [= BN_ucmp] - - (Note that only the 'mod' functions are actually for fields GF(2^m). - BN_GF2m_add() is misnomer, but this is for the sake of consistency.) - - For some functions, an the irreducible polynomial defining a - field can be given as an 'unsigned int[]' with strictly - decreasing elements giving the indices of those bits that are set; - i.e., p[] represents the polynomial - f(t) = t^p[0] + t^p[1] + ... + t^p[k] - where - p[0] > p[1] > ... > p[k] = 0. - This applies to the following functions: - - BN_GF2m_mod_arr - BN_GF2m_mod_mul_arr - BN_GF2m_mod_sqr_arr - BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv] - BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div] - BN_GF2m_mod_exp_arr - BN_GF2m_mod_sqrt_arr - BN_GF2m_mod_solve_quad_arr - BN_GF2m_poly2arr - BN_GF2m_arr2poly - - Conversion can be performed by the following functions: - - BN_GF2m_poly2arr - BN_GF2m_arr2poly - - bntest.c has additional tests for binary polynomial arithmetic. - - Two implementations for BN_GF2m_mod_div() are available. - The default algorithm simply uses BN_GF2m_mod_inv() and - BN_GF2m_mod_mul(). The alternative algorithm is compiled in only - if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the - copyright notice in crypto/bn/bn_gf2m.c before enabling it). - - [Sheueling Chang Shantz and Douglas Stebila - (Sun Microsystems Laboratories)] - - *) Add new error code 'ERR_R_DISABLED' that can be used when some - functionality is disabled at compile-time. - [Douglas Stebila ] - - *) Change default behaviour of 'openssl asn1parse' so that more - information is visible when viewing, e.g., a certificate: - - Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump' - mode the content of non-printable OCTET STRINGs is output in a - style similar to INTEGERs, but with '[HEX DUMP]' prepended to - avoid the appearance of a printable string. - [Nils Larsch ] - - *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access - functions - EC_GROUP_set_asn1_flag() - EC_GROUP_get_asn1_flag() - EC_GROUP_set_point_conversion_form() - EC_GROUP_get_point_conversion_form() - These control ASN1 encoding details: - - Curves (i.e., groups) are encoded explicitly unless asn1_flag - has been set to OPENSSL_EC_NAMED_CURVE. - - Points are encoded in uncompressed form by default; options for - asn1_for are as for point2oct, namely - POINT_CONVERSION_COMPRESSED - POINT_CONVERSION_UNCOMPRESSED - POINT_CONVERSION_HYBRID - - Also add 'seed' and 'seed_len' members to EC_GROUP with access - functions - EC_GROUP_set_seed() - EC_GROUP_get0_seed() - EC_GROUP_get_seed_len() - This is used only for ASN1 purposes (so far). - [Nils Larsch ] - - *) Add 'field_type' member to EC_METHOD, which holds the NID - of the appropriate field type OID. The new function - EC_METHOD_get_field_type() returns this value. - [Nils Larsch ] - - *) Add functions - EC_POINT_point2bn() - EC_POINT_bn2point() - EC_POINT_point2hex() - EC_POINT_hex2point() - providing useful interfaces to EC_POINT_point2oct() and - EC_POINT_oct2point(). - [Nils Larsch ] - - *) Change internals of the EC library so that the functions - EC_GROUP_set_generator() - EC_GROUP_get_generator() - EC_GROUP_get_order() - EC_GROUP_get_cofactor() - are implemented directly in crypto/ec/ec_lib.c and not dispatched - to methods, which would lead to unnecessary code duplication when - adding different types of curves. - [Nils Larsch with input by Bodo Moeller] - - *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM - arithmetic, and such that modified wNAFs are generated - (which avoid length expansion in many cases). - [Bodo Moeller] - - *) Add a function EC_GROUP_check_discriminant() (defined via - EC_METHOD) that verifies that the curve discriminant is non-zero. - - Add a function EC_GROUP_check() that makes some sanity tests - on a EC_GROUP, its generator and order. This includes - EC_GROUP_check_discriminant(). - [Nils Larsch ] - - *) Add ECDSA in new directory crypto/ecdsa/. - - Add applications 'openssl ecparam' and 'openssl ecdsa' - (these are based on 'openssl dsaparam' and 'openssl dsa'). - - ECDSA support is also included in various other files across the - library. Most notably, - - 'openssl req' now has a '-newkey ecdsa:file' option; - - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA; - - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and - d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make - them suitable for ECDSA where domain parameters must be - extracted before the specific public key; - - ECDSA engine support has been added. - [Nils Larsch ] - - *) Include some named elliptic curves, and add OIDs from X9.62, - SECG, and WAP/WTLS. Each curve can be obtained from the new - function - EC_GROUP_new_by_curve_name(), - and the list of available named curves can be obtained with - EC_get_builtin_curves(). - Also add a 'curve_name' member to EC_GROUP objects, which can be - accessed via - EC_GROUP_set_curve_name() - EC_GROUP_get_curve_name() - [Nils Larsch ] - - *) Include "!eNULL" in SSL_DEFAULT_CIPHER_LIST to make sure that - a ciphersuite string such as "DEFAULT:RSA" cannot enable - authentication-only ciphersuites. - [Bodo Moeller] - - *) Since AES128 and AES256 share a single mask bit in the logic of - ssl/ssl_ciph.c, the code for masking out disabled ciphers needs a - kludge to work properly if AES128 is available and AES256 isn't. - [Victor Duchovni] - - *) Expand security boundary to match 1.1.1 module. - [Steve Henson] - - *) Remove redundant features: hash file source, editing of test vectors - modify fipsld to use external fips_premain.c signature. - [Steve Henson] - - *) New perl script mkfipsscr.pl to create shell scripts or batch files to - run algorithm test programs. - [Steve Henson] - - *) Make algorithm test programs more tolerant of whitespace. - [Steve Henson] - - *) Have SSL/TLS server implementation tolerate "mismatched" record - protocol version while receiving ClientHello even if the - ClientHello is fragmented. (The server can't insist on the - particular protocol version it has chosen before the ServerHello - message has informed the client about his choice.) - [Bodo Moeller] - - *) Load error codes if they are not already present instead of using a - static variable. This allows them to be cleanly unloaded and reloaded. - [Steve Henson] - - Changes between 0.9.7k and 0.9.7l [28 Sep 2006] - - *) Introduce limits to prevent malicious keys being able to - cause a denial of service. (CVE-2006-2940) - [Steve Henson, Bodo Moeller] - - *) Fix ASN.1 parsing of certain invalid structures that can result - in a denial of service. (CVE-2006-2937) [Steve Henson] - - *) Fix buffer overflow in SSL_get_shared_ciphers() function. - (CVE-2006-3738) [Tavis Ormandy and Will Drewry, Google Security Team] - - *) Fix SSL client code which could crash if connecting to a - malicious SSLv2 server. (CVE-2006-4343) - [Tavis Ormandy and Will Drewry, Google Security Team] - - *) Change ciphersuite string processing so that an explicit - ciphersuite selects this one ciphersuite (so that "AES256-SHA" - will no longer include "AES128-SHA"), and any other similar - ciphersuite (same bitmap) from *other* protocol versions (so that - "RC4-MD5" will still include both the SSL 2.0 ciphersuite and the - SSL 3.0/TLS 1.0 ciphersuite). This is a backport combining - changes from 0.9.8b and 0.9.8d. - [Bodo Moeller] - - Changes between 0.9.7j and 0.9.7k [05 Sep 2006] - - *) Avoid PKCS #1 v1.5 signature attack discovered by Daniel Bleichenbacher - (CVE-2006-4339) [Ben Laurie and Google Security Team] - - *) Change the Unix randomness entropy gathering to use poll() when - possible instead of select(), since the latter has some - undesirable limitations. - [Darryl Miles via Richard Levitte and Bodo Moeller] - - *) Disable rogue ciphersuites: - - - SSLv2 0x08 0x00 0x80 ("RC4-64-MD5") - - SSLv3/TLSv1 0x00 0x61 ("EXP1024-RC2-CBC-MD5") - - SSLv3/TLSv1 0x00 0x60 ("EXP1024-RC4-MD5") - - The latter two were purportedly from - draft-ietf-tls-56-bit-ciphersuites-0[01].txt, but do not really - appear there. - - Also deactive the remaining ciphersuites from - draft-ietf-tls-56-bit-ciphersuites-01.txt. These are just as - unofficial, and the ID has long expired. - [Bodo Moeller] - - *) Fix RSA blinding Heisenbug (problems sometimes occured on - dual-core machines) and other potential thread-safety issues. - [Bodo Moeller] - - Changes between 0.9.7i and 0.9.7j [04 May 2006] - - *) Adapt fipsld and the build system to link against the validated FIPS - module in FIPS mode. - [Steve Henson] - - *) Fixes for VC++ 2005 build under Windows. - [Steve Henson] - - *) Add new Windows build target VC-32-GMAKE for VC++. This uses GNU make - from a Windows bash shell such as MSYS. It is autodetected from the - "config" script when run from a VC++ environment. Modify standard VC++ - build to use fipscanister.o from the GNU make build. - [Steve Henson] - - Changes between 0.9.7h and 0.9.7i [14 Oct 2005] - - *) Wrapped the definition of EVP_MAX_MD_SIZE in a #ifdef OPENSSL_FIPS. - The value now differs depending on if you build for FIPS or not. - BEWARE! A program linked with a shared FIPSed libcrypto can't be - safely run with a non-FIPSed libcrypto, as it may crash because of - the difference induced by this change. - [Andy Polyakov] - - Changes between 0.9.7g and 0.9.7h [11 Oct 2005] - - *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING - (part of SSL_OP_ALL). This option used to disable the - countermeasure against man-in-the-middle protocol-version - rollback in the SSL 2.0 server implementation, which is a bad - idea. (CVE-2005-2969) - - [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center - for Information Security, National Institute of Advanced Industrial - Science and Technology [AIST], Japan)] - - *) Minimal support for X9.31 signatures and PSS padding modes. This is - mainly for FIPS compliance and not fully integrated at this stage. - [Steve Henson] - - *) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform - the exponentiation using a fixed-length exponent. (Otherwise, - the information leaked through timing could expose the secret key - after many signatures; cf. Bleichenbacher's attack on DSA with - biased k.) - [Bodo Moeller] - - *) Make a new fixed-window mod_exp implementation the default for - RSA, DSA, and DH private-key operations so that the sequence of - squares and multiplies and the memory access pattern are - independent of the particular secret key. This will mitigate - cache-timing and potential related attacks. - - BN_mod_exp_mont_consttime() is the new exponentiation implementation, - and this is automatically used by BN_mod_exp_mont() if the new flag - BN_FLG_EXP_CONSTTIME is set for the exponent. RSA, DSA, and DH - will use this BN flag for private exponents unless the flag - RSA_FLAG_NO_EXP_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME, or - DH_FLAG_NO_EXP_CONSTTIME, respectively, is set. - - [Matthew D Wood (Intel Corp), with some changes by Bodo Moeller] - - *) Change the client implementation for SSLv23_method() and - SSLv23_client_method() so that is uses the SSL 3.0/TLS 1.0 - Client Hello message format if the SSL_OP_NO_SSLv2 option is set. - (Previously, the SSL 2.0 backwards compatible Client Hello - message format would be used even with SSL_OP_NO_SSLv2.) - [Bodo Moeller] - - *) Add support for smime-type MIME parameter in S/MIME messages which some - clients need. - [Steve Henson] - - *) New function BN_MONT_CTX_set_locked() to set montgomery parameters in - a threadsafe manner. Modify rsa code to use new function and add calls - to dsa and dh code (which had race conditions before). - [Steve Henson] - - *) Include the fixed error library code in the C error file definitions - instead of fixing them up at runtime. This keeps the error code - structures constant. - [Steve Henson] - - Changes between 0.9.7f and 0.9.7g [11 Apr 2005] - - [NB: OpenSSL 0.9.7h and later 0.9.7 patch levels were released after - OpenSSL 0.9.8.] - - *) Fixes for newer kerberos headers. NB: the casts are needed because - the 'length' field is signed on one version and unsigned on another - with no (?) obvious way to tell the difference, without these VC++ - complains. Also the "definition" of FAR (blank) is no longer included - nor is the error ENOMEM. KRB5_PRIVATE has to be set to 1 to pick up - some needed definitions. - [Steve Henson] - - *) Undo Cygwin change. - [Ulf Möller] - - *) Added support for proxy certificates according to RFC 3820. - Because they may be a security thread to unaware applications, - they must be explicitely allowed in run-time. See - docs/HOWTO/proxy_certificates.txt for further information. - [Richard Levitte] - - Changes between 0.9.7e and 0.9.7f [22 Mar 2005] - - *) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating - server and client random values. Previously - (SSL_RANDOM_VALUE - sizeof(time_t)) would be used which would result in - less random data when sizeof(time_t) > 4 (some 64 bit platforms). - - This change has negligible security impact because: - - 1. Server and client random values still have 24 bytes of pseudo random - data. - - 2. Server and client random values are sent in the clear in the initial - handshake. - - 3. The master secret is derived using the premaster secret (48 bytes in - size for static RSA ciphersuites) as well as client server and random - values. - - The OpenSSL team would like to thank the UK NISCC for bringing this issue - to our attention. - - [Stephen Henson, reported by UK NISCC] - - *) Use Windows randomness collection on Cygwin. - [Ulf Möller] - - *) Fix hang in EGD/PRNGD query when communication socket is closed - prematurely by EGD/PRNGD. - [Darren Tucker via Lutz Jänicke, resolves #1014] - - *) Prompt for pass phrases when appropriate for PKCS12 input format. - [Steve Henson] - - *) Back-port of selected performance improvements from development - branch, as well as improved support for PowerPC platforms. - [Andy Polyakov] - - *) Add lots of checks for memory allocation failure, error codes to indicate - failure and freeing up memory if a failure occurs. - [Nauticus Networks SSL Team , Steve Henson] - - *) Add new -passin argument to dgst. - [Steve Henson] - - *) Perform some character comparisons of different types in X509_NAME_cmp: - this is needed for some certificates that reencode DNs into UTF8Strings - (in violation of RFC3280) and can't or wont issue name rollover - certificates. - [Steve Henson] - - *) Make an explicit check during certificate validation to see that - the CA setting in each certificate on the chain is correct. As a - side effect always do the following basic checks on extensions, - not just when there's an associated purpose to the check: - - - if there is an unhandled critical extension (unless the user - has chosen to ignore this fault) - - if the path length has been exceeded (if one is set at all) - - that certain extensions fit the associated purpose (if one has - been given) - [Richard Levitte] - - Changes between 0.9.7d and 0.9.7e [25 Oct 2004] - - *) Avoid a race condition when CRLs are checked in a multi threaded - environment. This would happen due to the reordering of the revoked - entries during signature checking and serial number lookup. Now the - encoding is cached and the serial number sort performed under a lock. - Add new STACK function sk_is_sorted(). - [Steve Henson] - - *) Add Delta CRL to the extension code. - [Steve Henson] - - *) Various fixes to s3_pkt.c so alerts are sent properly. - [David Holmes ] - - *) Reduce the chances of duplicate issuer name and serial numbers (in - violation of RFC3280) using the OpenSSL certificate creation utilities. - This is done by creating a random 64 bit value for the initial serial - number when a serial number file is created or when a self signed - certificate is created using 'openssl req -x509'. The initial serial - number file is created using 'openssl x509 -next_serial' in CA.pl - rather than being initialized to 1. - [Steve Henson] - - Changes between 0.9.7c and 0.9.7d [17 Mar 2004] - - *) Fix null-pointer assignment in do_change_cipher_spec() revealed - by using the Codenomicon TLS Test Tool (CVE-2004-0079) - [Joe Orton, Steve Henson] - - *) Fix flaw in SSL/TLS handshaking when using Kerberos ciphersuites - (CVE-2004-0112) - [Joe Orton, Steve Henson] - - *) Make it possible to have multiple active certificates with the same - subject in the CA index file. This is done only if the keyword - 'unique_subject' is set to 'no' in the main CA section (default - if 'CA_default') of the configuration file. The value is saved - with the database itself in a separate index attribute file, - named like the index file with '.attr' appended to the name. - [Richard Levitte] - - *) X509 verify fixes. Disable broken certificate workarounds when - X509_V_FLAGS_X509_STRICT is set. Check CRL issuer has cRLSign set if - keyUsage extension present. Don't accept CRLs with unhandled critical - extensions: since verify currently doesn't process CRL extensions this - rejects a CRL with *any* critical extensions. Add new verify error codes - for these cases. - [Steve Henson] - - *) When creating an OCSP nonce use an OCTET STRING inside the extnValue. - A clarification of RFC2560 will require the use of OCTET STRINGs and - some implementations cannot handle the current raw format. Since OpenSSL - copies and compares OCSP nonces as opaque blobs without any attempt at - parsing them this should not create any compatibility issues. - [Steve Henson] - - *) New md flag EVP_MD_CTX_FLAG_REUSE this allows md_data to be reused when - calling EVP_MD_CTX_copy_ex() to avoid calling OPENSSL_malloc(). Without - this HMAC (and other) operations are several times slower than OpenSSL - < 0.9.7. - [Steve Henson] - - *) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex(). - [Peter Sylvester ] - - *) Use the correct content when signing type "other". - [Steve Henson] - - Changes between 0.9.7b and 0.9.7c [30 Sep 2003] - - *) Fix various bugs revealed by running the NISCC test suite: - - Stop out of bounds reads in the ASN1 code when presented with - invalid tags (CVE-2003-0543 and CVE-2003-0544). - - Free up ASN1_TYPE correctly if ANY type is invalid (CVE-2003-0545). - - If verify callback ignores invalid public key errors don't try to check - certificate signature with the NULL public key. - - [Steve Henson] - - *) New -ignore_err option in ocsp application to stop the server - exiting on the first error in a request. - [Steve Henson] - - *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate - if the server requested one: as stated in TLS 1.0 and SSL 3.0 - specifications. - [Steve Henson] - - *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional - extra data after the compression methods not only for TLS 1.0 - but also for SSL 3.0 (as required by the specification). - [Bodo Moeller; problem pointed out by Matthias Loepfe] - - *) Change X509_certificate_type() to mark the key as exported/exportable - when it's 512 *bits* long, not 512 bytes. - [Richard Levitte] - - *) Change AES_cbc_encrypt() so it outputs exact multiple of - blocks during encryption. - [Richard Levitte] - - *) Various fixes to base64 BIO and non blocking I/O. On write - flushes were not handled properly if the BIO retried. On read - data was not being buffered properly and had various logic bugs. - This also affects blocking I/O when the data being decoded is a - certain size. - [Steve Henson] - - *) Various S/MIME bugfixes and compatibility changes: - output correct application/pkcs7 MIME type if - PKCS7_NOOLDMIMETYPE is set. Tolerate some broken signatures. - Output CR+LF for EOL if PKCS7_CRLFEOL is set (this makes opening - of files as .eml work). Correctly handle very long lines in MIME - parser. - [Steve Henson] - - Changes between 0.9.7a and 0.9.7b [10 Apr 2003] - - *) Countermeasure against the Klima-Pokorny-Rosa extension of - Bleichbacher's attack on PKCS #1 v1.5 padding: treat - a protocol version number mismatch like a decryption error - in ssl3_get_client_key_exchange (ssl/s3_srvr.c). - [Bodo Moeller] - - *) Turn on RSA blinding by default in the default implementation - to avoid a timing attack. Applications that don't want it can call - RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING. - They would be ill-advised to do so in most cases. - [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller] - - *) Change RSA blinding code so that it works when the PRNG is not - seeded (in this case, the secret RSA exponent is abused as - an unpredictable seed -- if it is not unpredictable, there - is no point in blinding anyway). Make RSA blinding thread-safe - by remembering the creator's thread ID in rsa->blinding and - having all other threads use local one-time blinding factors - (this requires more computation than sharing rsa->blinding, but - avoids excessive locking; and if an RSA object is not shared - between threads, blinding will still be very fast). - [Bodo Moeller] - - *) Fixed a typo bug that would cause ENGINE_set_default() to set an - ENGINE as defaults for all supported algorithms irrespective of - the 'flags' parameter. 'flags' is now honoured, so applications - should make sure they are passing it correctly. - [Geoff Thorpe] - - *) Target "mingw" now allows native Windows code to be generated in - the Cygwin environment as well as with the MinGW compiler. - [Ulf Moeller] - - Changes between 0.9.7 and 0.9.7a [19 Feb 2003] - - *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked - via timing by performing a MAC computation even if incorrrect - block cipher padding has been found. This is a countermeasure - against active attacks where the attacker has to distinguish - between bad padding and a MAC verification error. (CVE-2003-0078) - - [Bodo Moeller; problem pointed out by Brice Canvel (EPFL), - Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and - Martin Vuagnoux (EPFL, Ilion)] - - *) Make the no-err option work as intended. The intention with no-err - is not to have the whole error stack handling routines removed from - libcrypto, it's only intended to remove all the function name and - reason texts, thereby removing some of the footprint that may not - be interesting if those errors aren't displayed anyway. - - NOTE: it's still possible for any application or module to have it's - own set of error texts inserted. The routines are there, just not - used by default when no-err is given. - [Richard Levitte] - - *) Add support for FreeBSD on IA64. - [dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454] - - *) Adjust DES_cbc_cksum() so it returns the same value as the MIT - Kerberos function mit_des_cbc_cksum(). Before this change, - the value returned by DES_cbc_cksum() was like the one from - mit_des_cbc_cksum(), except the bytes were swapped. - [Kevin Greaney and Richard Levitte] - - *) Allow an application to disable the automatic SSL chain building. - Before this a rather primitive chain build was always performed in - ssl3_output_cert_chain(): an application had no way to send the - correct chain if the automatic operation produced an incorrect result. - - Now the chain builder is disabled if either: - - 1. Extra certificates are added via SSL_CTX_add_extra_chain_cert(). - - 2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set. - - The reasoning behind this is that an application would not want the - auto chain building to take place if extra chain certificates are - present and it might also want a means of sending no additional - certificates (for example the chain has two certificates and the - root is omitted). - [Steve Henson] - - *) Add the possibility to build without the ENGINE framework. - [Steven Reddie via Richard Levitte] - - *) Under Win32 gmtime() can return NULL: check return value in - OPENSSL_gmtime(). Add error code for case where gmtime() fails. - [Steve Henson] - - *) DSA routines: under certain error conditions uninitialized BN objects - could be freed. Solution: make sure initialization is performed early - enough. (Reported and fix supplied by Ivan D Nestlerode , - Nils Larsch via PR#459) - [Lutz Jaenicke] - - *) Another fix for SSLv2 session ID handling: the session ID was incorrectly - checked on reconnect on the client side, therefore session resumption - could still fail with a "ssl session id is different" error. This - behaviour is masked when SSL_OP_ALL is used due to - SSL_OP_MICROSOFT_SESS_ID_BUG being set. - Behaviour observed by Crispin Flowerday as - followup to PR #377. - [Lutz Jaenicke] - - *) IA-32 assembler support enhancements: unified ELF targets, support - for SCO/Caldera platforms, fix for Cygwin shared build. - [Andy Polyakov] - - *) Add support for FreeBSD on sparc64. As a consequence, support for - FreeBSD on non-x86 processors is separate from x86 processors on - the config script, much like the NetBSD support. - [Richard Levitte & Kris Kennaway ] - - Changes between 0.9.6h and 0.9.7 [31 Dec 2002] - - [NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after - OpenSSL 0.9.7.] - - *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED - code (06) was taken as the first octet of the session ID and the last - octet was ignored consequently. As a result SSLv2 client side session - caching could not have worked due to the session ID mismatch between - client and server. - Behaviour observed by Crispin Flowerday as - PR #377. - [Lutz Jaenicke] - - *) Change the declaration of needed Kerberos libraries to use EX_LIBS - instead of the special (and badly supported) LIBKRB5. LIBKRB5 is - removed entirely. - [Richard Levitte] - - *) The hw_ncipher.c engine requires dynamic locks. Unfortunately, it - seems that in spite of existing for more than a year, many application - author have done nothing to provide the necessary callbacks, which - means that this particular engine will not work properly anywhere. - This is a very unfortunate situation which forces us, in the name - of usability, to give the hw_ncipher.c a static lock, which is part - of libcrypto. - NOTE: This is for the 0.9.7 series ONLY. This hack will never - appear in 0.9.8 or later. We EXPECT application authors to have - dealt properly with this when 0.9.8 is released (unless we actually - make such changes in the libcrypto locking code that changes will - have to be made anyway). - [Richard Levitte] - - *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content - octets have been read, EOF or an error occurs. Without this change - some truncated ASN1 structures will not produce an error. - [Steve Henson] - - *) Disable Heimdal support, since it hasn't been fully implemented. - Still give the possibility to force the use of Heimdal, but with - warnings and a request that patches get sent to openssl-dev. - [Richard Levitte] - - *) Add the VC-CE target, introduce the WINCE sysname, and add - INSTALL.WCE and appropriate conditionals to make it build. - [Steven Reddie via Richard Levitte] - - *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and - cygssl-x.y.z.dll, where x, y and z are the major, minor and - edit numbers of the version. - [Corinna Vinschen and Richard Levitte] - - *) Introduce safe string copy and catenation functions - (BUF_strlcpy() and BUF_strlcat()). - [Ben Laurie (CHATS) and Richard Levitte] - - *) Avoid using fixed-size buffers for one-line DNs. - [Ben Laurie (CHATS)] - - *) Add BUF_MEM_grow_clean() to avoid information leakage when - resizing buffers containing secrets, and use where appropriate. - [Ben Laurie (CHATS)] - - *) Avoid using fixed size buffers for configuration file location. - [Ben Laurie (CHATS)] - - *) Avoid filename truncation for various CA files. - [Ben Laurie (CHATS)] - - *) Use sizeof in preference to magic numbers. - [Ben Laurie (CHATS)] - - *) Avoid filename truncation in cert requests. - [Ben Laurie (CHATS)] - - *) Add assertions to check for (supposedly impossible) buffer - overflows. - [Ben Laurie (CHATS)] - - *) Don't cache truncated DNS entries in the local cache (this could - potentially lead to a spoofing attack). - [Ben Laurie (CHATS)] - - *) Fix various buffers to be large enough for hex/decimal - representations in a platform independent manner. - [Ben Laurie (CHATS)] - - *) Add CRYPTO_realloc_clean() to avoid information leakage when - resizing buffers containing secrets, and use where appropriate. - [Ben Laurie (CHATS)] - - *) Add BIO_indent() to avoid much slightly worrying code to do - indents. - [Ben Laurie (CHATS)] - - *) Convert sprintf()/BIO_puts() to BIO_printf(). - [Ben Laurie (CHATS)] - - *) buffer_gets() could terminate with the buffer only half - full. Fixed. - [Ben Laurie (CHATS)] - - *) Add assertions to prevent user-supplied crypto functions from - overflowing internal buffers by having large block sizes, etc. - [Ben Laurie (CHATS)] - - *) New OPENSSL_assert() macro (similar to assert(), but enabled - unconditionally). - [Ben Laurie (CHATS)] - - *) Eliminate unused copy of key in RC4. - [Ben Laurie (CHATS)] - - *) Eliminate unused and incorrectly sized buffers for IV in pem.h. - [Ben Laurie (CHATS)] - - *) Fix off-by-one error in EGD path. - [Ben Laurie (CHATS)] - - *) If RANDFILE path is too long, ignore instead of truncating. - [Ben Laurie (CHATS)] - - *) Eliminate unused and incorrectly sized X.509 structure - CBCParameter. - [Ben Laurie (CHATS)] - - *) Eliminate unused and dangerous function knumber(). - [Ben Laurie (CHATS)] - - *) Eliminate unused and dangerous structure, KSSL_ERR. - [Ben Laurie (CHATS)] - - *) Protect against overlong session ID context length in an encoded - session object. Since these are local, this does not appear to be - exploitable. - [Ben Laurie (CHATS)] - - *) Change from security patch (see 0.9.6e below) that did not affect - the 0.9.6 release series: - - Remote buffer overflow in SSL3 protocol - an attacker could - supply an oversized master key in Kerberos-enabled versions. - (CVE-2002-0657) - [Ben Laurie (CHATS)] - - *) Change the SSL kerb5 codes to match RFC 2712. - [Richard Levitte] - - *) Make -nameopt work fully for req and add -reqopt switch. - [Michael Bell , Steve Henson] - - *) The "block size" for block ciphers in CFB and OFB mode should be 1. - [Steve Henson, reported by Yngve Nysaeter Pettersen ] - - *) Make sure tests can be performed even if the corresponding algorithms - have been removed entirely. This was also the last step to make - OpenSSL compilable with DJGPP under all reasonable conditions. - [Richard Levitte, Doug Kaufman ] - - *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT - to allow version independent disabling of normally unselected ciphers, - which may be activated as a side-effect of selecting a single cipher. - - (E.g., cipher list string "RSA" enables ciphersuites that are left - out of "ALL" because they do not provide symmetric encryption. - "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.) - [Lutz Jaenicke, Bodo Moeller] - - *) Add appropriate support for separate platform-dependent build - directories. The recommended way to make a platform-dependent - build directory is the following (tested on Linux), maybe with - some local tweaks: - - # Place yourself outside of the OpenSSL source tree. In - # this example, the environment variable OPENSSL_SOURCE - # is assumed to contain the absolute OpenSSL source directory. - mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`" - cd objtree/"`uname -s`-`uname -r`-`uname -m`" - (cd $OPENSSL_SOURCE; find . -type f) | while read F; do - mkdir -p `dirname $F` - ln -s $OPENSSL_SOURCE/$F $F - done - - To be absolutely sure not to disturb the source tree, a "make clean" - is a good thing. If it isn't successfull, don't worry about it, - it probably means the source directory is very clean. - [Richard Levitte] - - *) Make sure any ENGINE control commands make local copies of string - pointers passed to them whenever necessary. Otherwise it is possible - the caller may have overwritten (or deallocated) the original string - data when a later ENGINE operation tries to use the stored values. - [Götz Babin-Ebell ] - - *) Improve diagnostics in file reading and command-line digests. - [Ben Laurie aided and abetted by Solar Designer ] - - *) Add AES modes CFB and OFB to the object database. Correct an - error in AES-CFB decryption. - [Richard Levitte] - - *) Remove most calls to EVP_CIPHER_CTX_cleanup() in evp_enc.c, this - allows existing EVP_CIPHER_CTX structures to be reused after - calling EVP_*Final(). This behaviour is used by encryption - BIOs and some applications. This has the side effect that - applications must explicitly clean up cipher contexts with - EVP_CIPHER_CTX_cleanup() or they will leak memory. - [Steve Henson] - - *) Check the values of dna and dnb in bn_mul_recursive before calling - bn_mul_comba (a non zero value means the a or b arrays do not contain - n2 elements) and fallback to bn_mul_normal if either is not zero. - [Steve Henson] - - *) Fix escaping of non-ASCII characters when using the -subj option - of the "openssl req" command line tool. (Robert Joop ) - [Lutz Jaenicke] - - *) Make object definitions compliant to LDAP (RFC2256): SN is the short - form for "surname", serialNumber has no short form. - Use "mail" as the short name for "rfc822Mailbox" according to RFC2798; - therefore remove "mail" short name for "internet 7". - The OID for unique identifiers in X509 certificates is - x500UniqueIdentifier, not uniqueIdentifier. - Some more OID additions. (Michael Bell ) - [Lutz Jaenicke] - - *) Add an "init" command to the ENGINE config module and auto initialize - ENGINEs. Without any "init" command the ENGINE will be initialized - after all ctrl commands have been executed on it. If init=1 the - ENGINE is initailized at that point (ctrls before that point are run - on the uninitialized ENGINE and after on the initialized one). If - init=0 then the ENGINE will not be iniatialized at all. - [Steve Henson] - - *) Fix the 'app_verify_callback' interface so that the user-defined - argument is actually passed to the callback: In the - SSL_CTX_set_cert_verify_callback() prototype, the callback - declaration has been changed from - int (*cb)() - into - int (*cb)(X509_STORE_CTX *,void *); - in ssl_verify_cert_chain (ssl/ssl_cert.c), the call - i=s->ctx->app_verify_callback(&ctx) - has been changed into - i=s->ctx->app_verify_callback(&ctx, s->ctx->app_verify_arg). - - To update applications using SSL_CTX_set_cert_verify_callback(), - a dummy argument can be added to their callback functions. - [D. K. Smetters ] - - *) Added the '4758cca' ENGINE to support IBM 4758 cards. - [Maurice Gittens , touchups by Geoff Thorpe] - - *) Add and OPENSSL_LOAD_CONF define which will cause - OpenSSL_add_all_algorithms() to load the openssl.cnf config file. - This allows older applications to transparently support certain - OpenSSL features: such as crypto acceleration and dynamic ENGINE loading. - Two new functions OPENSSL_add_all_algorithms_noconf() which will never - load the config file and OPENSSL_add_all_algorithms_conf() which will - always load it have also been added. - [Steve Henson] - - *) Add the OFB, CFB and CTR (all with 128 bit feedback) to AES. - Adjust NIDs and EVP layer. - [Stephen Sprunk and Richard Levitte] - - *) Config modules support in openssl utility. - - Most commands now load modules from the config file, - though in a few (such as version) this isn't done - because it couldn't be used for anything. - - In the case of ca and req the config file used is - the same as the utility itself: that is the -config - command line option can be used to specify an - alternative file. - [Steve Henson] - - *) Move default behaviour from OPENSSL_config(). If appname is NULL - use "openssl_conf" if filename is NULL use default openssl config file. - [Steve Henson] - - *) Add an argument to OPENSSL_config() to allow the use of an alternative - config section name. Add a new flag to tolerate a missing config file - and move code to CONF_modules_load_file(). - [Steve Henson] - - *) Support for crypto accelerator cards from Accelerated Encryption - Processing, www.aep.ie. (Use engine 'aep') - The support was copied from 0.9.6c [engine] and adapted/corrected - to work with the new engine framework. - [AEP Inc. and Richard Levitte] - - *) Support for SureWare crypto accelerator cards from Baltimore - Technologies. (Use engine 'sureware') - The support was copied from 0.9.6c [engine] and adapted - to work with the new engine framework. - [Richard Levitte] - - *) Have the CHIL engine fork-safe (as defined by nCipher) and actually - make the newer ENGINE framework commands for the CHIL engine work. - [Toomas Kiisk and Richard Levitte] - - *) Make it possible to produce shared libraries on ReliantUNIX. - [Robert Dahlem via Richard Levitte] - - *) Add the configuration target debug-linux-ppro. - Make 'openssl rsa' use the general key loading routines - implemented in apps.c, and make those routines able to - handle the key format FORMAT_NETSCAPE and the variant - FORMAT_IISSGC. - [Toomas Kiisk via Richard Levitte] - - *) Fix a crashbug and a logic bug in hwcrhk_load_pubkey(). - [Toomas Kiisk via Richard Levitte] - - *) Add -keyform to rsautl, and document -engine. - [Richard Levitte, inspired by Toomas Kiisk ] - - *) Change BIO_new_file (crypto/bio/bss_file.c) to use new - BIO_R_NO_SUCH_FILE error code rather than the generic - ERR_R_SYS_LIB error code if fopen() fails with ENOENT. - [Ben Laurie] - - *) Add new functions - ERR_peek_last_error - ERR_peek_last_error_line - ERR_peek_last_error_line_data. - These are similar to - ERR_peek_error - ERR_peek_error_line - ERR_peek_error_line_data, - but report on the latest error recorded rather than the first one - still in the error queue. - [Ben Laurie, Bodo Moeller] - - *) default_algorithms option in ENGINE config module. This allows things - like: - default_algorithms = ALL - default_algorithms = RSA, DSA, RAND, CIPHERS, DIGESTS - [Steve Henson] - - *) Prelminary ENGINE config module. - [Steve Henson] - - *) New experimental application configuration code. - [Steve Henson] - - *) Change the AES code to follow the same name structure as all other - symmetric ciphers, and behave the same way. Move everything to - the directory crypto/aes, thereby obsoleting crypto/rijndael. - [Stephen Sprunk and Richard Levitte] - - *) SECURITY: remove unsafe setjmp/signal interaction from ui_openssl.c. - [Ben Laurie and Theo de Raadt] - - *) Add option to output public keys in req command. - [Massimiliano Pala madwolf@openca.org] - - *) Use wNAFs in EC_POINTs_mul() for improved efficiency - (up to about 10% better than before for P-192 and P-224). - [Bodo Moeller] - - *) New functions/macros - - SSL_CTX_set_msg_callback(ctx, cb) - SSL_CTX_set_msg_callback_arg(ctx, arg) - SSL_set_msg_callback(ssl, cb) - SSL_set_msg_callback_arg(ssl, arg) - - to request calling a callback function - - void cb(int write_p, int version, int content_type, - const void *buf, size_t len, SSL *ssl, void *arg) - - whenever a protocol message has been completely received - (write_p == 0) or sent (write_p == 1). Here 'version' is the - protocol version according to which the SSL library interprets - the current protocol message (SSL2_VERSION, SSL3_VERSION, or - TLS1_VERSION). 'content_type' is 0 in the case of SSL 2.0, or - the content type as defined in the SSL 3.0/TLS 1.0 protocol - specification (change_cipher_spec(20), alert(21), handshake(22)). - 'buf' and 'len' point to the actual message, 'ssl' to the - SSL object, and 'arg' is the application-defined value set by - SSL[_CTX]_set_msg_callback_arg(). - - 'openssl s_client' and 'openssl s_server' have new '-msg' options - to enable a callback that displays all protocol messages. - [Bodo Moeller] - - *) Change the shared library support so shared libraries are built as - soon as the corresponding static library is finished, and thereby get - openssl and the test programs linked against the shared library. - This still only happens when the keyword "shard" has been given to - the configuration scripts. - - NOTE: shared library support is still an experimental thing, and - backward binary compatibility is still not guaranteed. - ["Maciej W. Rozycki" and Richard Levitte] - - *) Add support for Subject Information Access extension. - [Peter Sylvester ] - - *) Make BUF_MEM_grow() behaviour more consistent: Initialise to zero - additional bytes when new memory had to be allocated, not just - when reusing an existing buffer. - [Bodo Moeller] - - *) New command line and configuration option 'utf8' for the req command. - This allows field values to be specified as UTF8 strings. - [Steve Henson] - - *) Add -multi and -mr options to "openssl speed" - giving multiple parallel - runs for the former and machine-readable output for the latter. - [Ben Laurie] - - *) Add '-noemailDN' option to 'openssl ca'. This prevents inclusion - of the e-mail address in the DN (i.e., it will go into a certificate - extension only). The new configuration file option 'email_in_dn = no' - has the same effect. - [Massimiliano Pala madwolf@openca.org] - - *) Change all functions with names starting with des_ to be starting - with DES_ instead. Add wrappers that are compatible with libdes, - but are named _ossl_old_des_*. Finally, add macros that map the - des_* symbols to the corresponding _ossl_old_des_* if libdes - compatibility is desired. If OpenSSL 0.9.6c compatibility is - desired, the des_* symbols will be mapped to DES_*, with one - exception. - - Since we provide two compatibility mappings, the user needs to - define the macro OPENSSL_DES_LIBDES_COMPATIBILITY if libdes - compatibility is desired. The default (i.e., when that macro - isn't defined) is OpenSSL 0.9.6c compatibility. - - There are also macros that enable and disable the support of old - des functions altogether. Those are OPENSSL_ENABLE_OLD_DES_SUPPORT - and OPENSSL_DISABLE_OLD_DES_SUPPORT. If none or both of those - are defined, the default will apply: to support the old des routines. - - In either case, one must include openssl/des.h to get the correct - definitions. Do not try to just include openssl/des_old.h, that - won't work. - - NOTE: This is a major break of an old API into a new one. Software - authors are encouraged to switch to the DES_ style functions. Some - time in the future, des_old.h and the libdes compatibility functions - will be disable (i.e. OPENSSL_DISABLE_OLD_DES_SUPPORT will be the - default), and then completely removed. - [Richard Levitte] - - *) Test for certificates which contain unsupported critical extensions. - If such a certificate is found during a verify operation it is - rejected by default: this behaviour can be overridden by either - handling the new error X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION or - by setting the verify flag X509_V_FLAG_IGNORE_CRITICAL. A new function - X509_supported_extension() has also been added which returns 1 if a - particular extension is supported. - [Steve Henson] - - *) Modify the behaviour of EVP cipher functions in similar way to digests - to retain compatibility with existing code. - [Steve Henson] - - *) Modify the behaviour of EVP_DigestInit() and EVP_DigestFinal() to retain - compatibility with existing code. In particular the 'ctx' parameter does - not have to be to be initialized before the call to EVP_DigestInit() and - it is tidied up after a call to EVP_DigestFinal(). New function - EVP_DigestFinal_ex() which does not tidy up the ctx. Similarly function - EVP_MD_CTX_copy() changed to not require the destination to be - initialized valid and new function EVP_MD_CTX_copy_ex() added which - requires the destination to be valid. - - Modify all the OpenSSL digest calls to use EVP_DigestInit_ex(), - EVP_DigestFinal_ex() and EVP_MD_CTX_copy_ex(). - [Steve Henson] - - *) Change ssl3_get_message (ssl/s3_both.c) and the functions using it - so that complete 'Handshake' protocol structures are kept in memory - instead of overwriting 'msg_type' and 'length' with 'body' data. - [Bodo Moeller] - - *) Add an implementation of SSL_add_dir_cert_subjects_to_stack for Win32. - [Massimo Santin via Richard Levitte] - - *) Major restructuring to the underlying ENGINE code. This includes - reduction of linker bloat, separation of pure "ENGINE" manipulation - (initialisation, etc) from functionality dealing with implementations - of specific crypto iterfaces. This change also introduces integrated - support for symmetric ciphers and digest implementations - so ENGINEs - can now accelerate these by providing EVP_CIPHER and EVP_MD - implementations of their own. This is detailed in crypto/engine/README - as it couldn't be adequately described here. However, there are a few - API changes worth noting - some RSA, DSA, DH, and RAND functions that - were changed in the original introduction of ENGINE code have now - reverted back - the hooking from this code to ENGINE is now a good - deal more passive and at run-time, operations deal directly with - RSA_METHODs, DSA_METHODs (etc) as they did before, rather than - dereferencing through an ENGINE pointer any more. Also, the ENGINE - functions dealing with BN_MOD_EXP[_CRT] handlers have been removed - - they were not being used by the framework as there is no concept of a - BIGNUM_METHOD and they could not be generalised to the new - 'ENGINE_TABLE' mechanism that underlies the new code. Similarly, - ENGINE_cpy() has been removed as it cannot be consistently defined in - the new code. - [Geoff Thorpe] - - *) Change ASN1_GENERALIZEDTIME_check() to allow fractional seconds. - [Steve Henson] - - *) Change mkdef.pl to sort symbols that get the same entry number, - and make sure the automatically generated functions ERR_load_* - become part of libeay.num as well. - [Richard Levitte] - - *) New function SSL_renegotiate_pending(). This returns true once - renegotiation has been requested (either SSL_renegotiate() call - or HelloRequest/ClientHello receveived from the peer) and becomes - false once a handshake has been completed. - (For servers, SSL_renegotiate() followed by SSL_do_handshake() - sends a HelloRequest, but does not ensure that a handshake takes - place. SSL_renegotiate_pending() is useful for checking if the - client has followed the request.) - [Bodo Moeller] - - *) New SSL option SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION. - By default, clients may request session resumption even during - renegotiation (if session ID contexts permit); with this option, - session resumption is possible only in the first handshake. - - SSL_OP_ALL is now 0x00000FFFL instead of 0x000FFFFFL. This makes - more bits available for options that should not be part of - SSL_OP_ALL (such as SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION). - [Bodo Moeller] - - *) Add some demos for certificate and certificate request creation. - [Steve Henson] - - *) Make maximum certificate chain size accepted from the peer application - settable (SSL*_get/set_max_cert_list()), as proposed by - "Douglas E. Engert" . - [Lutz Jaenicke] - - *) Add support for shared libraries for Unixware-7 - (Boyd Lynn Gerber ). - [Lutz Jaenicke] - - *) Add a "destroy" handler to ENGINEs that allows structural cleanup to - be done prior to destruction. Use this to unload error strings from - ENGINEs that load their own error strings. NB: This adds two new API - functions to "get" and "set" this destroy handler in an ENGINE. - [Geoff Thorpe] - - *) Alter all existing ENGINE implementations (except "openssl" and - "openbsd") to dynamically instantiate their own error strings. This - makes them more flexible to be built both as statically-linked ENGINEs - and self-contained shared-libraries loadable via the "dynamic" ENGINE. - Also, add stub code to each that makes building them as self-contained - shared-libraries easier (see README.ENGINE). - [Geoff Thorpe] - - *) Add a "dynamic" ENGINE that provides a mechanism for binding ENGINE - implementations into applications that are completely implemented in - self-contained shared-libraries. The "dynamic" ENGINE exposes control - commands that can be used to configure what shared-library to load and - to control aspects of the way it is handled. Also, made an update to - the README.ENGINE file that brings its information up-to-date and - provides some information and instructions on the "dynamic" ENGINE - (ie. how to use it, how to build "dynamic"-loadable ENGINEs, etc). - [Geoff Thorpe] - - *) Make it possible to unload ranges of ERR strings with a new - "ERR_unload_strings" function. - [Geoff Thorpe] - - *) Add a copy() function to EVP_MD. - [Ben Laurie] - - *) Make EVP_MD routines take a context pointer instead of just the - md_data void pointer. - [Ben Laurie] - - *) Add flags to EVP_MD and EVP_MD_CTX. EVP_MD_FLAG_ONESHOT indicates - that the digest can only process a single chunk of data - (typically because it is provided by a piece of - hardware). EVP_MD_CTX_FLAG_ONESHOT indicates that the application - is only going to provide a single chunk of data, and hence the - framework needn't accumulate the data for oneshot drivers. - [Ben Laurie] - - *) As with "ERR", make it possible to replace the underlying "ex_data" - functions. This change also alters the storage and management of global - ex_data state - it's now all inside ex_data.c and all "class" code (eg. - RSA, BIO, SSL_CTX, etc) no longer stores its own STACKS and per-class - index counters. The API functions that use this state have been changed - to take a "class_index" rather than pointers to the class's local STACK - and counter, and there is now an API function to dynamically create new - classes. This centralisation allows us to (a) plug a lot of the - thread-safety problems that existed, and (b) makes it possible to clean - up all allocated state using "CRYPTO_cleanup_all_ex_data()". W.r.t. (b) - such data would previously have always leaked in application code and - workarounds were in place to make the memory debugging turn a blind eye - to it. Application code that doesn't use this new function will still - leak as before, but their memory debugging output will announce it now - rather than letting it slide. - - Besides the addition of CRYPTO_cleanup_all_ex_data(), another API change - induced by the "ex_data" overhaul is that X509_STORE_CTX_init() now - has a return value to indicate success or failure. - [Geoff Thorpe] - - *) Make it possible to replace the underlying "ERR" functions such that the - global state (2 LHASH tables and 2 locks) is only used by the "default" - implementation. This change also adds two functions to "get" and "set" - the implementation prior to it being automatically set the first time - any other ERR function takes place. Ie. an application can call "get", - pass the return value to a module it has just loaded, and that module - can call its own "set" function using that value. This means the - module's "ERR" operations will use (and modify) the error state in the - application and not in its own statically linked copy of OpenSSL code. - [Geoff Thorpe] - - *) Give DH, DSA, and RSA types their own "**_up_ref()" function to increment - reference counts. This performs normal REF_PRINT/REF_CHECK macros on - the operation, and provides a more encapsulated way for external code - (crypto/evp/ and ssl/) to do this. Also changed the evp and ssl code - to use these functions rather than manually incrementing the counts. - - Also rename "DSO_up()" function to more descriptive "DSO_up_ref()". - [Geoff Thorpe] - - *) Add EVP test program. - [Ben Laurie] - - *) Add symmetric cipher support to ENGINE. Expect the API to change! - [Ben Laurie] - - *) New CRL functions: X509_CRL_set_version(), X509_CRL_set_issuer_name() - X509_CRL_set_lastUpdate(), X509_CRL_set_nextUpdate(), X509_CRL_sort(), - X509_REVOKED_set_serialNumber(), and X509_REVOKED_set_revocationDate(). - These allow a CRL to be built without having to access X509_CRL fields - directly. Modify 'ca' application to use new functions. - [Steve Henson] - - *) Move SSL_OP_TLS_ROLLBACK_BUG out of the SSL_OP_ALL list of recommended - bug workarounds. Rollback attack detection is a security feature. - The problem will only arise on OpenSSL servers when TLSv1 is not - available (sslv3_server_method() or SSL_OP_NO_TLSv1). - Software authors not wanting to support TLSv1 will have special reasons - for their choice and can explicitly enable this option. - [Bodo Moeller, Lutz Jaenicke] - - *) Rationalise EVP so it can be extended: don't include a union of - cipher/digest structures, add init/cleanup functions for EVP_MD_CTX - (similar to those existing for EVP_CIPHER_CTX). - Usage example: - - EVP_MD_CTX md; - - EVP_MD_CTX_init(&md); /* new function call */ - EVP_DigestInit(&md, EVP_sha1()); - EVP_DigestUpdate(&md, in, len); - EVP_DigestFinal(&md, out, NULL); - EVP_MD_CTX_cleanup(&md); /* new function call */ - - [Ben Laurie] - - *) Make DES key schedule conform to the usual scheme, as well as - correcting its structure. This means that calls to DES functions - now have to pass a pointer to a des_key_schedule instead of a - plain des_key_schedule (which was actually always a pointer - anyway): E.g., - - des_key_schedule ks; - - des_set_key_checked(..., &ks); - des_ncbc_encrypt(..., &ks, ...); - - (Note that a later change renames 'des_...' into 'DES_...'.) - [Ben Laurie] - - *) Initial reduction of linker bloat: the use of some functions, such as - PEM causes large amounts of unused functions to be linked in due to - poor organisation. For example pem_all.c contains every PEM function - which has a knock on effect of linking in large amounts of (unused) - ASN1 code. Grouping together similar functions and splitting unrelated - functions prevents this. - [Steve Henson] - - *) Cleanup of EVP macros. - [Ben Laurie] - - *) Change historical references to {NID,SN,LN}_des_ede and ede3 to add the - correct _ecb suffix. - [Ben Laurie] - - *) Add initial OCSP responder support to ocsp application. The - revocation information is handled using the text based index - use by the ca application. The responder can either handle - requests generated internally, supplied in files (for example - via a CGI script) or using an internal minimal server. - [Steve Henson] - - *) Add configuration choices to get zlib compression for TLS. - [Richard Levitte] - - *) Changes to Kerberos SSL for RFC 2712 compliance: - 1. Implemented real KerberosWrapper, instead of just using - KRB5 AP_REQ message. [Thanks to Simon Wilkinson ] - 2. Implemented optional authenticator field of KerberosWrapper. - - Added openssl-style ASN.1 macros for Kerberos ticket, ap_req, - and authenticator structs; see crypto/krb5/. - - Generalized Kerberos calls to support multiple Kerberos libraries. - [Vern Staats , - Jeffrey Altman - via Richard Levitte] - - *) Cause 'openssl speed' to use fully hard-coded DSA keys as it - already does with RSA. testdsa.h now has 'priv_key/pub_key' - values for each of the key sizes rather than having just - parameters (and 'speed' generating keys each time). - [Geoff Thorpe] - - *) Speed up EVP routines. - Before: -encrypt -type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes -des-cbc 4408.85k 5560.51k 5778.46k 5862.20k 5825.16k -des-cbc 4389.55k 5571.17k 5792.23k 5846.91k 5832.11k -des-cbc 4394.32k 5575.92k 5807.44k 5848.37k 5841.30k -decrypt -des-cbc 3482.66k 5069.49k 5496.39k 5614.16k 5639.28k -des-cbc 3480.74k 5068.76k 5510.34k 5609.87k 5635.52k -des-cbc 3483.72k 5067.62k 5504.60k 5708.01k 5724.80k - After: -encrypt -des-cbc 4660.16k 5650.19k 5807.19k 5827.13k 5783.32k -decrypt -des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k - [Ben Laurie] - - *) Added the OS2-EMX target. - ["Brian Havard" and Richard Levitte] - - *) Rewrite apps to use NCONF routines instead of the old CONF. New functions - to support NCONF routines in extension code. New function CONF_set_nconf() - to allow functions which take an NCONF to also handle the old LHASH - structure: this means that the old CONF compatible routines can be - retained (in particular wrt extensions) without having to duplicate the - code. New function X509V3_add_ext_nconf_sk to add extensions to a stack. - [Steve Henson] - - *) Enhance the general user interface with mechanisms for inner control - and with possibilities to have yes/no kind of prompts. - [Richard Levitte] - - *) Change all calls to low level digest routines in the library and - applications to use EVP. Add missing calls to HMAC_cleanup() and - don't assume HMAC_CTX can be copied using memcpy(). - [Verdon Walker , Steve Henson] - - *) Add the possibility to control engines through control names but with - arbitrary arguments instead of just a string. - Change the key loaders to take a UI_METHOD instead of a callback - function pointer. NOTE: this breaks binary compatibility with earlier - versions of OpenSSL [engine]. - Adapt the nCipher code for these new conditions and add a card insertion - callback. - [Richard Levitte] - - *) Enhance the general user interface with mechanisms to better support - dialog box interfaces, application-defined prompts, the possibility - to use defaults (for example default passwords from somewhere else) - and interrupts/cancellations. - [Richard Levitte] - - *) Tidy up PKCS#12 attribute handling. Add support for the CSP name - attribute in PKCS#12 files, add new -CSP option to pkcs12 utility. - [Steve Henson] - - *) Fix a memory leak in 'sk_dup()' in the case reallocation fails. (Also - tidy up some unnecessarily weird code in 'sk_new()'). - [Geoff, reported by Diego Tartara ] - - *) Change the key loading routines for ENGINEs to use the same kind - callback (pem_password_cb) as all other routines that need this - kind of callback. - [Richard Levitte] - - *) Increase ENTROPY_NEEDED to 32 bytes, as Rijndael can operate with - 256 bit (=32 byte) keys. Of course seeding with more entropy bytes - than this minimum value is recommended. - [Lutz Jaenicke] - - *) New random seeder for OpenVMS, using the system process statistics - that are easily reachable. - [Richard Levitte] - - *) Windows apparently can't transparently handle global - variables defined in DLLs. Initialisations such as: - - const ASN1_ITEM *it = &ASN1_INTEGER_it; - - wont compile. This is used by the any applications that need to - declare their own ASN1 modules. This was fixed by adding the option - EXPORT_VAR_AS_FN to all Win32 platforms, although this isn't strictly - needed for static libraries under Win32. - [Steve Henson] - - *) New functions X509_PURPOSE_set() and X509_TRUST_set() to handle - setting of purpose and trust fields. New X509_STORE trust and - purpose functions and tidy up setting in other SSL functions. - [Steve Henson] - - *) Add copies of X509_STORE_CTX fields and callbacks to X509_STORE - structure. These are inherited by X509_STORE_CTX when it is - initialised. This allows various defaults to be set in the - X509_STORE structure (such as flags for CRL checking and custom - purpose or trust settings) for functions which only use X509_STORE_CTX - internally such as S/MIME. - - Modify X509_STORE_CTX_purpose_inherit() so it only sets purposes and - trust settings if they are not set in X509_STORE. This allows X509_STORE - purposes and trust (in S/MIME for example) to override any set by default. - - Add command line options for CRL checking to smime, s_client and s_server - applications. - [Steve Henson] - - *) Initial CRL based revocation checking. If the CRL checking flag(s) - are set then the CRL is looked up in the X509_STORE structure and - its validity and signature checked, then if the certificate is found - in the CRL the verify fails with a revoked error. - - Various new CRL related callbacks added to X509_STORE_CTX structure. - - Command line options added to 'verify' application to support this. - - This needs some additional work, such as being able to handle multiple - CRLs with different times, extension based lookup (rather than just - by subject name) and ultimately more complete V2 CRL extension - handling. - [Steve Henson] - - *) Add a general user interface API (crypto/ui/). This is designed - to replace things like des_read_password and friends (backward - compatibility functions using this new API are provided). - The purpose is to remove prompting functions from the DES code - section as well as provide for prompting through dialog boxes in - a window system and the like. - [Richard Levitte] - - *) Add "ex_data" support to ENGINE so implementations can add state at a - per-structure level rather than having to store it globally. - [Geoff] - - *) Make it possible for ENGINE structures to be copied when retrieved by - ENGINE_by_id() if the ENGINE specifies a new flag: ENGINE_FLAGS_BY_ID_COPY. - This causes the "original" ENGINE structure to act like a template, - analogous to the RSA vs. RSA_METHOD type of separation. Because of this - operational state can be localised to each ENGINE structure, despite the - fact they all share the same "methods". New ENGINE structures returned in - this case have no functional references and the return value is the single - structural reference. This matches the single structural reference returned - by ENGINE_by_id() normally, when it is incremented on the pre-existing - ENGINE structure. - [Geoff] - - *) Fix ASN1 decoder when decoding type ANY and V_ASN1_OTHER: since this - needs to match any other type at all we need to manually clear the - tag cache. - [Steve Henson] - - *) Changes to the "openssl engine" utility to include; - - verbosity levels ('-v', '-vv', and '-vvv') that provide information - about an ENGINE's available control commands. - - executing control commands from command line arguments using the - '-pre' and '-post' switches. '-post' is only used if '-t' is - specified and the ENGINE is successfully initialised. The syntax for - the individual commands are colon-separated, for example; - openssl engine chil -pre FORK_CHECK:0 -pre SO_PATH:/lib/test.so - [Geoff] - - *) New dynamic control command support for ENGINEs. ENGINEs can now - declare their own commands (numbers), names (strings), descriptions, - and input types for run-time discovery by calling applications. A - subset of these commands are implicitly classed as "executable" - depending on their input type, and only these can be invoked through - the new string-based API function ENGINE_ctrl_cmd_string(). (Eg. this - can be based on user input, config files, etc). The distinction is - that "executable" commands cannot return anything other than a boolean - result and can only support numeric or string input, whereas some - discoverable commands may only be for direct use through - ENGINE_ctrl(), eg. supporting the exchange of binary data, function - pointers, or other custom uses. The "executable" commands are to - support parameterisations of ENGINE behaviour that can be - unambiguously defined by ENGINEs and used consistently across any - OpenSSL-based application. Commands have been added to all the - existing hardware-supporting ENGINEs, noticeably "SO_PATH" to allow - control over shared-library paths without source code alterations. - [Geoff] - - *) Changed all ENGINE implementations to dynamically allocate their - ENGINEs rather than declaring them statically. Apart from this being - necessary with the removal of the ENGINE_FLAGS_MALLOCED distinction, - this also allows the implementations to compile without using the - internal engine_int.h header. - [Geoff] - - *) Minor adjustment to "rand" code. RAND_get_rand_method() now returns a - 'const' value. Any code that should be able to modify a RAND_METHOD - should already have non-const pointers to it (ie. they should only - modify their own ones). - [Geoff] - - *) Made a variety of little tweaks to the ENGINE code. - - "atalla" and "ubsec" string definitions were moved from header files - to C code. "nuron" string definitions were placed in variables - rather than hard-coded - allowing parameterisation of these values - later on via ctrl() commands. - - Removed unused "#if 0"'d code. - - Fixed engine list iteration code so it uses ENGINE_free() to release - structural references. - - Constified the RAND_METHOD element of ENGINE structures. - - Constified various get/set functions as appropriate and added - missing functions (including a catch-all ENGINE_cpy that duplicates - all ENGINE values onto a new ENGINE except reference counts/state). - - Removed NULL parameter checks in get/set functions. Setting a method - or function to NULL is a way of cancelling out a previously set - value. Passing a NULL ENGINE parameter is just plain stupid anyway - and doesn't justify the extra error symbols and code. - - Deprecate the ENGINE_FLAGS_MALLOCED define and move the area for - flags from engine_int.h to engine.h. - - Changed prototypes for ENGINE handler functions (init(), finish(), - ctrl(), key-load functions, etc) to take an (ENGINE*) parameter. - [Geoff] - - *) Implement binary inversion algorithm for BN_mod_inverse in addition - to the algorithm using long division. The binary algorithm can be - used only if the modulus is odd. On 32-bit systems, it is faster - only for relatively small moduli (roughly 20-30% for 128-bit moduli, - roughly 5-15% for 256-bit moduli), so we use it only for moduli - up to 450 bits. In 64-bit environments, the binary algorithm - appears to be advantageous for much longer moduli; here we use it - for moduli up to 2048 bits. - [Bodo Moeller] - - *) Rewrite CHOICE field setting in ASN1_item_ex_d2i(). The old code - could not support the combine flag in choice fields. - [Steve Henson] - - *) Add a 'copy_extensions' option to the 'ca' utility. This copies - extensions from a certificate request to the certificate. - [Steve Henson] - - *) Allow multiple 'certopt' and 'nameopt' options to be separated - by commas. Add 'namopt' and 'certopt' options to the 'ca' config - file: this allows the display of the certificate about to be - signed to be customised, to allow certain fields to be included - or excluded and extension details. The old system didn't display - multicharacter strings properly, omitted fields not in the policy - and couldn't display additional details such as extensions. - [Steve Henson] - - *) Function EC_POINTs_mul for multiple scalar multiplication - of an arbitrary number of elliptic curve points - \sum scalars[i]*points[i], - optionally including the generator defined for the EC_GROUP: - scalar*generator + \sum scalars[i]*points[i]. - - EC_POINT_mul is a simple wrapper function for the typical case - that the point list has just one item (besides the optional - generator). - [Bodo Moeller] - - *) First EC_METHODs for curves over GF(p): - - EC_GFp_simple_method() uses the basic BN_mod_mul and BN_mod_sqr - operations and provides various method functions that can also - operate with faster implementations of modular arithmetic. - - EC_GFp_mont_method() reuses most functions that are part of - EC_GFp_simple_method, but uses Montgomery arithmetic. - - [Bodo Moeller; point addition and point doubling - implementation directly derived from source code provided by - Lenka Fibikova ] - - *) Framework for elliptic curves (crypto/ec/ec.h, crypto/ec/ec_lcl.h, - crypto/ec/ec_lib.c): - - Curves are EC_GROUP objects (with an optional group generator) - based on EC_METHODs that are built into the library. - - Points are EC_POINT objects based on EC_GROUP objects. - - Most of the framework would be able to handle curves over arbitrary - finite fields, but as there are no obvious types for fields other - than GF(p), some functions are limited to that for now. - [Bodo Moeller] - - *) Add the -HTTP option to s_server. It is similar to -WWW, but requires - that the file contains a complete HTTP response. - [Richard Levitte] - - *) Add the ec directory to mkdef.pl and mkfiles.pl. In mkdef.pl - change the def and num file printf format specifier from "%-40sXXX" - to "%-39s XXX". The latter will always guarantee a space after the - field while the former will cause them to run together if the field - is 40 of more characters long. - [Steve Henson] - - *) Constify the cipher and digest 'method' functions and structures - and modify related functions to take constant EVP_MD and EVP_CIPHER - pointers. - [Steve Henson] - - *) Hide BN_CTX structure details in bn_lcl.h instead of publishing them - in . Also further increase BN_CTX_NUM to 32. - [Bodo Moeller] - - *) Modify EVP_Digest*() routines so they now return values. Although the - internal software routines can never fail additional hardware versions - might. - [Steve Henson] - - *) Clean up crypto/err/err.h and change some error codes to avoid conflicts: - - Previously ERR_R_FATAL was too small and coincided with ERR_LIB_PKCS7 - (= ERR_R_PKCS7_LIB); it is now 64 instead of 32. - - ASN1 error codes - ERR_R_NESTED_ASN1_ERROR - ... - ERR_R_MISSING_ASN1_EOS - were 4 .. 9, conflicting with - ERR_LIB_RSA (= ERR_R_RSA_LIB) - ... - ERR_LIB_PEM (= ERR_R_PEM_LIB). - They are now 58 .. 63 (i.e., just below ERR_R_FATAL). - - Add new error code 'ERR_R_INTERNAL_ERROR'. - [Bodo Moeller] - - *) Don't overuse locks in crypto/err/err.c: For data retrieval, CRYPTO_r_lock - suffices. - [Bodo Moeller] - - *) New option '-subj arg' for 'openssl req' and 'openssl ca'. This - sets the subject name for a new request or supersedes the - subject name in a given request. Formats that can be parsed are - 'CN=Some Name, OU=myOU, C=IT' - and - 'CN=Some Name/OU=myOU/C=IT'. - - Add options '-batch' and '-verbose' to 'openssl req'. - [Massimiliano Pala ] - - *) Introduce the possibility to access global variables through - functions on platform were that's the best way to handle exporting - global variables in shared libraries. To enable this functionality, - one must configure with "EXPORT_VAR_AS_FN" or defined the C macro - "OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter - is normally done by Configure or something similar). - - To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL - in the source file (foo.c) like this: - - OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1; - OPENSSL_IMPLEMENT_GLOBAL(double,bar); - - To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL - and OPENSSL_GLOBAL_REF in the header file (foo.h) like this: - - OPENSSL_DECLARE_GLOBAL(int,foo); - #define foo OPENSSL_GLOBAL_REF(foo) - OPENSSL_DECLARE_GLOBAL(double,bar); - #define bar OPENSSL_GLOBAL_REF(bar) - - The #defines are very important, and therefore so is including the - header file everywhere where the defined globals are used. - - The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition - of ASN.1 items, but that structure is a bit different. - - The largest change is in util/mkdef.pl which has been enhanced with - better and easier to understand logic to choose which symbols should - go into the Windows .def files as well as a number of fixes and code - cleanup (among others, algorithm keywords are now sorted - lexicographically to avoid constant rewrites). - [Richard Levitte] - - *) In BN_div() keep a copy of the sign of 'num' before writing the - result to 'rm' because if rm==num the value will be overwritten - and produce the wrong result if 'num' is negative: this caused - problems with BN_mod() and BN_nnmod(). - [Steve Henson] - - *) Function OCSP_request_verify(). This checks the signature on an - OCSP request and verifies the signer certificate. The signer - certificate is just checked for a generic purpose and OCSP request - trust settings. - [Steve Henson] - - *) Add OCSP_check_validity() function to check the validity of OCSP - responses. OCSP responses are prepared in real time and may only - be a few seconds old. Simply checking that the current time lies - between thisUpdate and nextUpdate max reject otherwise valid responses - caused by either OCSP responder or client clock inaccuracy. Instead - we allow thisUpdate and nextUpdate to fall within a certain period of - the current time. The age of the response can also optionally be - checked. Two new options -validity_period and -status_age added to - ocsp utility. - [Steve Henson] - - *) If signature or public key algorithm is unrecognized print out its - OID rather that just UNKNOWN. - [Steve Henson] - - *) Change OCSP_cert_to_id() to tolerate a NULL subject certificate and - OCSP_cert_id_new() a NULL serialNumber. This allows a partial certificate - ID to be generated from the issuer certificate alone which can then be - passed to OCSP_id_issuer_cmp(). - [Steve Henson] - - *) New compilation option ASN1_ITEM_FUNCTIONS. This causes the new - ASN1 modules to export functions returning ASN1_ITEM pointers - instead of the ASN1_ITEM structures themselves. This adds several - new macros which allow the underlying ASN1 function/structure to - be accessed transparently. As a result code should not use ASN1_ITEM - references directly (such as &X509_it) but instead use the relevant - macros (such as ASN1_ITEM_rptr(X509)). This option is to allow - use of the new ASN1 code on platforms where exporting structures - is problematical (for example in shared libraries) but exporting - functions returning pointers to structures is not. - [Steve Henson] - - *) Add support for overriding the generation of SSL/TLS session IDs. - These callbacks can be registered either in an SSL_CTX or per SSL. - The purpose of this is to allow applications to control, if they wish, - the arbitrary values chosen for use as session IDs, particularly as it - can be useful for session caching in multiple-server environments. A - command-line switch for testing this (and any client code that wishes - to use such a feature) has been added to "s_server". - [Geoff Thorpe, Lutz Jaenicke] - - *) Modify mkdef.pl to recognise and parse preprocessor conditionals - of the form '#if defined(...) || defined(...) || ...' and - '#if !defined(...) && !defined(...) && ...'. This also avoids - the growing number of special cases it was previously handling. - [Richard Levitte] - - *) Make all configuration macros available for application by making - sure they are available in opensslconf.h, by giving them names starting - with "OPENSSL_" to avoid conflicts with other packages and by making - sure e_os2.h will cover all platform-specific cases together with - opensslconf.h. - Additionally, it is now possible to define configuration/platform- - specific names (called "system identities"). In the C code, these - are prefixed with "OPENSSL_SYSNAME_". e_os2.h will create another - macro with the name beginning with "OPENSSL_SYS_", which is determined - from "OPENSSL_SYSNAME_*" or compiler-specific macros depending on - what is available. - [Richard Levitte] - - *) New option -set_serial to 'req' and 'x509' this allows the serial - number to use to be specified on the command line. Previously self - signed certificates were hard coded with serial number 0 and the - CA options of 'x509' had to use a serial number in a file which was - auto incremented. - [Steve Henson] - - *) New options to 'ca' utility to support V2 CRL entry extensions. - Currently CRL reason, invalidity date and hold instruction are - supported. Add new CRL extensions to V3 code and some new objects. - [Steve Henson] - - *) New function EVP_CIPHER_CTX_set_padding() this is used to - disable standard block padding (aka PKCS#5 padding) in the EVP - API, which was previously mandatory. This means that the data is - not padded in any way and so the total length much be a multiple - of the block size, otherwise an error occurs. - [Steve Henson] - - *) Initial (incomplete) OCSP SSL support. - [Steve Henson] - - *) New function OCSP_parse_url(). This splits up a URL into its host, - port and path components: primarily to parse OCSP URLs. New -url - option to ocsp utility. - [Steve Henson] - - *) New nonce behavior. The return value of OCSP_check_nonce() now - reflects the various checks performed. Applications can decide - whether to tolerate certain situations such as an absent nonce - in a response when one was present in a request: the ocsp application - just prints out a warning. New function OCSP_add1_basic_nonce() - this is to allow responders to include a nonce in a response even if - the request is nonce-less. - [Steve Henson] - - *) Disable stdin buffering in load_cert (apps/apps.c) so that no certs are - skipped when using openssl x509 multiple times on a single input file, - e.g. "(openssl x509 -out cert1; openssl x509 -out cert2) ] - - *) New OCSP verify flag OCSP_TRUSTOTHER. When set the "other" certificates - passed by the function are trusted implicitly. If any of them signed the - response then it is assumed to be valid and is not verified. - [Steve Henson] - - *) In PKCS7_set_type() initialise content_type in PKCS7_ENC_CONTENT - to data. This was previously part of the PKCS7 ASN1 code. This - was causing problems with OpenSSL created PKCS#12 and PKCS#7 structures. - [Steve Henson, reported by Kenneth R. Robinette - ] - - *) Add CRYPTO_push_info() and CRYPTO_pop_info() calls to new ASN1 - routines: without these tracing memory leaks is very painful. - Fix leaks in PKCS12 and PKCS7 routines. - [Steve Henson] - - *) Make X509_time_adj() cope with the new behaviour of ASN1_TIME_new(). - Previously it initialised the 'type' argument to V_ASN1_UTCTIME which - effectively meant GeneralizedTime would never be used. Now it - is initialised to -1 but X509_time_adj() now has to check the value - and use ASN1_TIME_set() if the value is not V_ASN1_UTCTIME or - V_ASN1_GENERALIZEDTIME, without this it always uses GeneralizedTime. - [Steve Henson, reported by Kenneth R. Robinette - ] - - *) Fixes to BN_to_ASN1_INTEGER when bn is zero. This would previously - result in a zero length in the ASN1_INTEGER structure which was - not consistent with the structure when d2i_ASN1_INTEGER() was used - and would cause ASN1_INTEGER_cmp() to fail. Enhance s2i_ASN1_INTEGER() - to cope with hex and negative integers. Fix bug in i2a_ASN1_INTEGER() - where it did not print out a minus for negative ASN1_INTEGER. - [Steve Henson] - - *) Add summary printout to ocsp utility. The various functions which - convert status values to strings have been renamed to: - OCSP_response_status_str(), OCSP_cert_status_str() and - OCSP_crl_reason_str() and are no longer static. New options - to verify nonce values and to disable verification. OCSP response - printout format cleaned up. - [Steve Henson] - - *) Add additional OCSP certificate checks. These are those specified - in RFC2560. This consists of two separate checks: the CA of the - certificate being checked must either be the OCSP signer certificate - or the issuer of the OCSP signer certificate. In the latter case the - OCSP signer certificate must contain the OCSP signing extended key - usage. This check is performed by attempting to match the OCSP - signer or the OCSP signer CA to the issuerNameHash and issuerKeyHash - in the OCSP_CERTID structures of the response. - [Steve Henson] - - *) Initial OCSP certificate verification added to OCSP_basic_verify() - and related routines. This uses the standard OpenSSL certificate - verify routines to perform initial checks (just CA validity) and - to obtain the certificate chain. Then additional checks will be - performed on the chain. Currently the root CA is checked to see - if it is explicitly trusted for OCSP signing. This is used to set - a root CA as a global signing root: that is any certificate that - chains to that CA is an acceptable OCSP signing certificate. - [Steve Henson] - - *) New '-extfile ...' option to 'openssl ca' for reading X.509v3 - extensions from a separate configuration file. - As when reading extensions from the main configuration file, - the '-extensions ...' option may be used for specifying the - section to use. - [Massimiliano Pala ] - - *) New OCSP utility. Allows OCSP requests to be generated or - read. The request can be sent to a responder and the output - parsed, outputed or printed in text form. Not complete yet: - still needs to check the OCSP response validity. - [Steve Henson] - - *) New subcommands for 'openssl ca': - 'openssl ca -status ' prints the status of the cert with - the given serial number (according to the index file). - 'openssl ca -updatedb' updates the expiry status of certificates - in the index file. - [Massimiliano Pala ] - - *) New '-newreq-nodes' command option to CA.pl. This is like - '-newreq', but calls 'openssl req' with the '-nodes' option - so that the resulting key is not encrypted. - [Damien Miller ] - - *) New configuration for the GNU Hurd. - [Jonathan Bartlett via Richard Levitte] - - *) Initial code to implement OCSP basic response verify. This - is currently incomplete. Currently just finds the signer's - certificate and verifies the signature on the response. - [Steve Henson] - - *) New SSLeay_version code SSLEAY_DIR to determine the compiled-in - value of OPENSSLDIR. This is available via the new '-d' option - to 'openssl version', and is also included in 'openssl version -a'. - [Bodo Moeller] - - *) Allowing defining memory allocation callbacks that will be given - file name and line number information in additional arguments - (a const char* and an int). The basic functionality remains, as - well as the original possibility to just replace malloc(), - realloc() and free() by functions that do not know about these - additional arguments. To register and find out the current - settings for extended allocation functions, the following - functions are provided: - - CRYPTO_set_mem_ex_functions - CRYPTO_set_locked_mem_ex_functions - CRYPTO_get_mem_ex_functions - CRYPTO_get_locked_mem_ex_functions - - These work the same way as CRYPTO_set_mem_functions and friends. - CRYPTO_get_[locked_]mem_functions now writes 0 where such an - extended allocation function is enabled. - Similarly, CRYPTO_get_[locked_]mem_ex_functions writes 0 where - a conventional allocation function is enabled. - [Richard Levitte, Bodo Moeller] - - *) Finish off removing the remaining LHASH function pointer casts. - There should no longer be any prototype-casting required when using - the LHASH abstraction, and any casts that remain are "bugs". See - the callback types and macros at the head of lhash.h for details - (and "OBJ_cleanup" in crypto/objects/obj_dat.c as an example). - [Geoff Thorpe] - - *) Add automatic query of EGD sockets in RAND_poll() for the unix variant. - If /dev/[u]random devices are not available or do not return enough - entropy, EGD style sockets (served by EGD or PRNGD) will automatically - be queried. - The locations /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool, and - /etc/entropy will be queried once each in this sequence, quering stops - when enough entropy was collected without querying more sockets. - [Lutz Jaenicke] - - *) Change the Unix RAND_poll() variant to be able to poll several - random devices, as specified by DEVRANDOM, until a sufficient amount - of data has been collected. We spend at most 10 ms on each file - (select timeout) and read in non-blocking mode. DEVRANDOM now - defaults to the list "/dev/urandom", "/dev/random", "/dev/srandom" - (previously it was just the string "/dev/urandom"), so on typical - platforms the 10 ms delay will never occur. - Also separate out the Unix variant to its own file, rand_unix.c. - For VMS, there's a currently-empty rand_vms.c. - [Richard Levitte] - - *) Move OCSP client related routines to ocsp_cl.c. These - provide utility functions which an application needing - to issue a request to an OCSP responder and analyse the - response will typically need: as opposed to those which an - OCSP responder itself would need which will be added later. - - OCSP_request_sign() signs an OCSP request with an API similar - to PKCS7_sign(). OCSP_response_status() returns status of OCSP - response. OCSP_response_get1_basic() extracts basic response - from response. OCSP_resp_find_status(): finds and extracts status - information from an OCSP_CERTID structure (which will be created - when the request structure is built). These are built from lower - level functions which work on OCSP_SINGLERESP structures but - wont normally be used unless the application wishes to examine - extensions in the OCSP response for example. - - Replace nonce routines with a pair of functions. - OCSP_request_add1_nonce() adds a nonce value and optionally - generates a random value. OCSP_check_nonce() checks the - validity of the nonce in an OCSP response. - [Steve Henson] - - *) Change function OCSP_request_add() to OCSP_request_add0_id(). - This doesn't copy the supplied OCSP_CERTID and avoids the - need to free up the newly created id. Change return type - to OCSP_ONEREQ to return the internal OCSP_ONEREQ structure. - This can then be used to add extensions to the request. - Deleted OCSP_request_new(), since most of its functionality - is now in OCSP_REQUEST_new() (and the case insensitive name - clash) apart from the ability to set the request name which - will be added elsewhere. - [Steve Henson] - - *) Update OCSP API. Remove obsolete extensions argument from - various functions. Extensions are now handled using the new - OCSP extension code. New simple OCSP HTTP function which - can be used to send requests and parse the response. - [Steve Henson] - - *) Fix the PKCS#7 (S/MIME) code to work with new ASN1. Two new - ASN1_ITEM structures help with sign and verify. PKCS7_ATTR_SIGN - uses the special reorder version of SET OF to sort the attributes - and reorder them to match the encoded order. This resolves a long - standing problem: a verify on a PKCS7 structure just after signing - it used to fail because the attribute order did not match the - encoded order. PKCS7_ATTR_VERIFY does not reorder the attributes: - it uses the received order. This is necessary to tolerate some broken - software that does not order SET OF. This is handled by encoding - as a SEQUENCE OF but using implicit tagging (with UNIVERSAL class) - to produce the required SET OF. - [Steve Henson] - - *) Have mk1mf.pl generate the macros OPENSSL_BUILD_SHLIBCRYPTO and - OPENSSL_BUILD_SHLIBSSL and use them appropriately in the header - files to get correct declarations of the ASN.1 item variables. - [Richard Levitte] - - *) Rewrite of PKCS#12 code to use new ASN1 functionality. Replace many - PKCS#12 macros with real functions. Fix two unrelated ASN1 bugs: - asn1_check_tlen() would sometimes attempt to use 'ctx' when it was - NULL and ASN1_TYPE was not dereferenced properly in asn1_ex_c2i(). - New ASN1 macro: DECLARE_ASN1_ITEM() which just declares the relevant - ASN1_ITEM and no wrapper functions. - [Steve Henson] - - *) New functions or ASN1_item_d2i_fp() and ASN1_item_d2i_bio(). These - replace the old function pointer based I/O routines. Change most of - the *_d2i_bio() and *_d2i_fp() functions to use these. - [Steve Henson] - - *) Enhance mkdef.pl to be more accepting about spacing in C preprocessor - lines, recognice more "algorithms" that can be deselected, and make - it complain about algorithm deselection that isn't recognised. - [Richard Levitte] - - *) New ASN1 functions to handle dup, sign, verify, digest, pack and - unpack operations in terms of ASN1_ITEM. Modify existing wrappers - to use new functions. Add NO_ASN1_OLD which can be set to remove - some old style ASN1 functions: this can be used to determine if old - code will still work when these eventually go away. - [Steve Henson] - - *) New extension functions for OCSP structures, these follow the - same conventions as certificates and CRLs. - [Steve Henson] - - *) New function X509V3_add1_i2d(). This automatically encodes and - adds an extension. Its behaviour can be customised with various - flags to append, replace or delete. Various wrappers added for - certifcates and CRLs. - [Steve Henson] - - *) Fix to avoid calling the underlying ASN1 print routine when - an extension cannot be parsed. Correct a typo in the - OCSP_SERVICELOC extension. Tidy up print OCSP format. - [Steve Henson] - - *) Make mkdef.pl parse some of the ASN1 macros and add apropriate - entries for variables. - [Steve Henson] - - *) Add functionality to apps/openssl.c for detecting locking - problems: As the program is single-threaded, all we have - to do is register a locking callback using an array for - storing which locks are currently held by the program. - [Bodo Moeller] - - *) Use a lock around the call to CRYPTO_get_ex_new_index() in - SSL_get_ex_data_X509_STORE_idx(), which is used in - ssl_verify_cert_chain() and thus can be called at any time - during TLS/SSL handshakes so that thread-safety is essential. - Unfortunately, the ex_data design is not at all suited - for multi-threaded use, so it probably should be abolished. - [Bodo Moeller] - - *) Added Broadcom "ubsec" ENGINE to OpenSSL. - [Broadcom, tweaked and integrated by Geoff Thorpe] - - *) Move common extension printing code to new function - X509V3_print_extensions(). Reorganise OCSP print routines and - implement some needed OCSP ASN1 functions. Add OCSP extensions. - [Steve Henson] - - *) New function X509_signature_print() to remove duplication in some - print routines. - [Steve Henson] - - *) Add a special meaning when SET OF and SEQUENCE OF flags are both - set (this was treated exactly the same as SET OF previously). This - is used to reorder the STACK representing the structure to match the - encoding. This will be used to get round a problem where a PKCS7 - structure which was signed could not be verified because the STACK - order did not reflect the encoded order. - [Steve Henson] - - *) Reimplement the OCSP ASN1 module using the new code. - [Steve Henson] - - *) Update the X509V3 code to permit the use of an ASN1_ITEM structure - for its ASN1 operations. The old style function pointers still exist - for now but they will eventually go away. - [Steve Henson] - - *) Merge in replacement ASN1 code from the ASN1 branch. This almost - completely replaces the old ASN1 functionality with a table driven - encoder and decoder which interprets an ASN1_ITEM structure describing - the ASN1 module. Compatibility with the existing ASN1 API (i2d,d2i) is - largely maintained. Almost all of the old asn1_mac.h macro based ASN1 - has also been converted to the new form. - [Steve Henson] - - *) Change BN_mod_exp_recp so that negative moduli are tolerated - (the sign is ignored). Similarly, ignore the sign in BN_MONT_CTX_set - so that BN_mod_exp_mont and BN_mod_exp_mont_word work - for negative moduli. - [Bodo Moeller] - - *) Fix BN_uadd and BN_usub: Always return non-negative results instead - of not touching the result's sign bit. - [Bodo Moeller] - - *) BN_div bugfix: If the result is 0, the sign (res->neg) must not be - set. - [Bodo Moeller] - - *) Changed the LHASH code to use prototypes for callbacks, and created - macros to declare and implement thin (optionally static) functions - that provide type-safety and avoid function pointer casting for the - type-specific callbacks. - [Geoff Thorpe] - - *) Added Kerberos Cipher Suites to be used with TLS, as written in - RFC 2712. - [Veers Staats , - Jeffrey Altman , via Richard Levitte] - - *) Reformat the FAQ so the different questions and answers can be divided - in sections depending on the subject. - [Richard Levitte] - - *) Have the zlib compression code load ZLIB.DLL dynamically under - Windows. - [Richard Levitte] - - *) New function BN_mod_sqrt for computing square roots modulo a prime - (using the probabilistic Tonelli-Shanks algorithm unless - p == 3 (mod 4) or p == 5 (mod 8), which are cases that can - be handled deterministically). - [Lenka Fibikova , Bodo Moeller] - - *) Make BN_mod_inverse faster by explicitly handling small quotients - in the Euclid loop. (Speed gain about 20% for small moduli [256 or - 512 bits], about 30% for larger ones [1024 or 2048 bits].) - [Bodo Moeller] - - *) New function BN_kronecker. - [Bodo Moeller] - - *) Fix BN_gcd so that it works on negative inputs; the result is - positive unless both parameters are zero. - Previously something reasonably close to an infinite loop was - possible because numbers could be growing instead of shrinking - in the implementation of Euclid's algorithm. - [Bodo Moeller] - - *) Fix BN_is_word() and BN_is_one() macros to take into account the - sign of the number in question. - - Fix BN_is_word(a,w) to work correctly for w == 0. - - The old BN_is_word(a,w) macro is now called BN_abs_is_word(a,w) - because its test if the absolute value of 'a' equals 'w'. - Note that BN_abs_is_word does *not* handle w == 0 reliably; - it exists mostly for use in the implementations of BN_is_zero(), - BN_is_one(), and BN_is_word(). - [Bodo Moeller] - - *) New function BN_swap. - [Bodo Moeller] - - *) Use BN_nnmod instead of BN_mod in crypto/bn/bn_exp.c so that - the exponentiation functions are more likely to produce reasonable - results on negative inputs. - [Bodo Moeller] - - *) Change BN_mod_mul so that the result is always non-negative. - Previously, it could be negative if one of the factors was negative; - I don't think anyone really wanted that behaviour. - [Bodo Moeller] - - *) Move BN_mod_... functions into new file crypto/bn/bn_mod.c - (except for exponentiation, which stays in crypto/bn/bn_exp.c, - and BN_mod_mul_reciprocal, which stays in crypto/bn/bn_recp.c) - and add new functions: - - BN_nnmod - BN_mod_sqr - BN_mod_add - BN_mod_add_quick - BN_mod_sub - BN_mod_sub_quick - BN_mod_lshift1 - BN_mod_lshift1_quick - BN_mod_lshift - BN_mod_lshift_quick - - These functions always generate non-negative results. - - BN_nnmod otherwise is like BN_mod (if BN_mod computes a remainder r - such that |m| < r < 0, BN_nnmod will output rem + |m| instead). - - BN_mod_XXX_quick(r, a, [b,] m) generates the same result as - BN_mod_XXX(r, a, [b,] m, ctx), but requires that a [and b] - be reduced modulo m. - [Lenka Fibikova , Bodo Moeller] - -#if 0 - The following entry accidentily appeared in the CHANGES file - distributed with OpenSSL 0.9.7. The modifications described in - it do *not* apply to OpenSSL 0.9.7. - - *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there - was actually never needed) and in BN_mul(). The removal in BN_mul() - required a small change in bn_mul_part_recursive() and the addition - of the functions bn_cmp_part_words(), bn_sub_part_words() and - bn_add_part_words(), which do the same thing as bn_cmp_words(), - bn_sub_words() and bn_add_words() except they take arrays with - differing sizes. - [Richard Levitte] -#endif - - *) In 'openssl passwd', verify passwords read from the terminal - unless the '-salt' option is used (which usually means that - verification would just waste user's time since the resulting - hash is going to be compared with some given password hash) - or the new '-noverify' option is used. - - This is an incompatible change, but it does not affect - non-interactive use of 'openssl passwd' (passwords on the command - line, '-stdin' option, '-in ...' option) and thus should not - cause any problems. - [Bodo Moeller] - - *) Remove all references to RSAref, since there's no more need for it. - [Richard Levitte] - - *) Make DSO load along a path given through an environment variable - (SHLIB_PATH) with shl_load(). - [Richard Levitte] - - *) Constify the ENGINE code as a result of BIGNUM constification. - Also constify the RSA code and most things related to it. In a - few places, most notable in the depth of the ASN.1 code, ugly - casts back to non-const were required (to be solved at a later - time) - [Richard Levitte] - - *) Make it so the openssl application has all engines loaded by default. - [Richard Levitte] - - *) Constify the BIGNUM routines a little more. - [Richard Levitte] - - *) Add the following functions: - - ENGINE_load_cswift() - ENGINE_load_chil() - ENGINE_load_atalla() - ENGINE_load_nuron() - ENGINE_load_builtin_engines() - - That way, an application can itself choose if external engines that - are built-in in OpenSSL shall ever be used or not. The benefit is - that applications won't have to be linked with libdl or other dso - libraries unless it's really needed. - - Changed 'openssl engine' to load all engines on demand. - Changed the engine header files to avoid the duplication of some - declarations (they differed!). - [Richard Levitte] - - *) 'openssl engine' can now list capabilities. - [Richard Levitte] - - *) Better error reporting in 'openssl engine'. - [Richard Levitte] - - *) Never call load_dh_param(NULL) in s_server. - [Bodo Moeller] - - *) Add engine application. It can currently list engines by name and - identity, and test if they are actually available. - [Richard Levitte] - - *) Improve RPM specification file by forcing symbolic linking and making - sure the installed documentation is also owned by root.root. - [Damien Miller ] - - *) Give the OpenSSL applications more possibilities to make use of - keys (public as well as private) handled by engines. - [Richard Levitte] - - *) Add OCSP code that comes from CertCo. - [Richard Levitte] - - *) Add VMS support for the Rijndael code. - [Richard Levitte] - - *) Added untested support for Nuron crypto accelerator. - [Ben Laurie] - - *) Add support for external cryptographic devices. This code was - previously distributed separately as the "engine" branch. - [Geoff Thorpe, Richard Levitte] - - *) Rework the filename-translation in the DSO code. It is now possible to - have far greater control over how a "name" is turned into a filename - depending on the operating environment and any oddities about the - different shared library filenames on each system. - [Geoff Thorpe] - - *) Support threads on FreeBSD-elf in Configure. - [Richard Levitte] - - *) Fix for SHA1 assembly problem with MASM: it produces - warnings about corrupt line number information when assembling - with debugging information. This is caused by the overlapping - of two sections. - [Bernd Matthes , Steve Henson] - - *) NCONF changes. - NCONF_get_number() has no error checking at all. As a replacement, - NCONF_get_number_e() is defined (_e for "error checking") and is - promoted strongly. The old NCONF_get_number is kept around for - binary backward compatibility. - Make it possible for methods to load from something other than a BIO, - by providing a function pointer that is given a name instead of a BIO. - For example, this could be used to load configuration data from an - LDAP server. - [Richard Levitte] - - *) Fix for non blocking accept BIOs. Added new I/O special reason - BIO_RR_ACCEPT to cover this case. Previously use of accept BIOs - with non blocking I/O was not possible because no retry code was - implemented. Also added new SSL code SSL_WANT_ACCEPT to cover - this case. - [Steve Henson] - - *) Added the beginnings of Rijndael support. - [Ben Laurie] - - *) Fix for bug in DirectoryString mask setting. Add support for - X509_NAME_print_ex() in 'req' and X509_print_ex() function - to allow certificate printing to more controllable, additional - 'certopt' option to 'x509' to allow new printing options to be - set. - [Steve Henson] - - *) Clean old EAY MD5 hack from e_os.h. - [Richard Levitte] - - Changes between 0.9.6l and 0.9.6m [17 Mar 2004] - - *) Fix null-pointer assignment in do_change_cipher_spec() revealed - by using the Codenomicon TLS Test Tool (CVE-2004-0079) - [Joe Orton, Steve Henson] - - Changes between 0.9.6k and 0.9.6l [04 Nov 2003] - - *) Fix additional bug revealed by the NISCC test suite: - - Stop bug triggering large recursion when presented with - certain ASN.1 tags (CVE-2003-0851) - [Steve Henson] - - Changes between 0.9.6j and 0.9.6k [30 Sep 2003] - - *) Fix various bugs revealed by running the NISCC test suite: - - Stop out of bounds reads in the ASN1 code when presented with - invalid tags (CVE-2003-0543 and CVE-2003-0544). - - If verify callback ignores invalid public key errors don't try to check - certificate signature with the NULL public key. - - [Steve Henson] - - *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate - if the server requested one: as stated in TLS 1.0 and SSL 3.0 - specifications. - [Steve Henson] - - *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional - extra data after the compression methods not only for TLS 1.0 - but also for SSL 3.0 (as required by the specification). - [Bodo Moeller; problem pointed out by Matthias Loepfe] - - *) Change X509_certificate_type() to mark the key as exported/exportable - when it's 512 *bits* long, not 512 bytes. - [Richard Levitte] - - Changes between 0.9.6i and 0.9.6j [10 Apr 2003] - - *) Countermeasure against the Klima-Pokorny-Rosa extension of - Bleichbacher's attack on PKCS #1 v1.5 padding: treat - a protocol version number mismatch like a decryption error - in ssl3_get_client_key_exchange (ssl/s3_srvr.c). - [Bodo Moeller] - - *) Turn on RSA blinding by default in the default implementation - to avoid a timing attack. Applications that don't want it can call - RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING. - They would be ill-advised to do so in most cases. - [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller] - - *) Change RSA blinding code so that it works when the PRNG is not - seeded (in this case, the secret RSA exponent is abused as - an unpredictable seed -- if it is not unpredictable, there - is no point in blinding anyway). Make RSA blinding thread-safe - by remembering the creator's thread ID in rsa->blinding and - having all other threads use local one-time blinding factors - (this requires more computation than sharing rsa->blinding, but - avoids excessive locking; and if an RSA object is not shared - between threads, blinding will still be very fast). - [Bodo Moeller] - - Changes between 0.9.6h and 0.9.6i [19 Feb 2003] - - *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked - via timing by performing a MAC computation even if incorrrect - block cipher padding has been found. This is a countermeasure - against active attacks where the attacker has to distinguish - between bad padding and a MAC verification error. (CVE-2003-0078) - - [Bodo Moeller; problem pointed out by Brice Canvel (EPFL), - Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and - Martin Vuagnoux (EPFL, Ilion)] - - Changes between 0.9.6g and 0.9.6h [5 Dec 2002] - - *) New function OPENSSL_cleanse(), which is used to cleanse a section of - memory from it's contents. This is done with a counter that will - place alternating values in each byte. This can be used to solve - two issues: 1) the removal of calls to memset() by highly optimizing - compilers, and 2) cleansing with other values than 0, since those can - be read through on certain media, for example a swap space on disk. - [Geoff Thorpe] - - *) Bugfix: client side session caching did not work with external caching, - because the session->cipher setting was not restored when reloading - from the external cache. This problem was masked, when - SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set. - (Found by Steve Haslam .) - [Lutz Jaenicke] - - *) Fix client_certificate (ssl/s2_clnt.c): The permissible total - length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33. - [Zeev Lieber ] - - *) Undo an undocumented change introduced in 0.9.6e which caused - repeated calls to OpenSSL_add_all_ciphers() and - OpenSSL_add_all_digests() to be ignored, even after calling - EVP_cleanup(). - [Richard Levitte] - - *) Change the default configuration reader to deal with last line not - being properly terminated. - [Richard Levitte] - - *) Change X509_NAME_cmp() so it applies the special rules on handling - DN values that are of type PrintableString, as well as RDNs of type - emailAddress where the value has the type ia5String. - [stefank@valicert.com via Richard Levitte] - - *) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half - the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently - doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be - the bitwise-OR of the two for use by the majority of applications - wanting this behaviour, and update the docs. The documented - behaviour and actual behaviour were inconsistent and had been - changing anyway, so this is more a bug-fix than a behavioural - change. - [Geoff Thorpe, diagnosed by Nadav Har'El] - - *) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c - (the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes). - [Bodo Moeller] - - *) Fix initialization code race conditions in - SSLv23_method(), SSLv23_client_method(), SSLv23_server_method(), - SSLv2_method(), SSLv2_client_method(), SSLv2_server_method(), - SSLv3_method(), SSLv3_client_method(), SSLv3_server_method(), - TLSv1_method(), TLSv1_client_method(), TLSv1_server_method(), - ssl2_get_cipher_by_char(), - ssl3_get_cipher_by_char(). - [Patrick McCormick , Bodo Moeller] - - *) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after - the cached sessions are flushed, as the remove_cb() might use ex_data - contents. Bug found by Sam Varshavchik - (see [openssl.org #212]). - [Geoff Thorpe, Lutz Jaenicke] - - *) Fix typo in OBJ_txt2obj which incorrectly passed the content - length, instead of the encoding length to d2i_ASN1_OBJECT. - [Steve Henson] - - Changes between 0.9.6f and 0.9.6g [9 Aug 2002] - - *) [In 0.9.6g-engine release:] - Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall'). - [Lynn Gazis ] - - Changes between 0.9.6e and 0.9.6f [8 Aug 2002] - - *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX - and get fix the header length calculation. - [Florian Weimer , - Alon Kantor (and others), - Steve Henson] - - *) Use proper error handling instead of 'assertions' in buffer - overflow checks added in 0.9.6e. This prevents DoS (the - assertions could call abort()). - [Arne Ansper , Bodo Moeller] - - Changes between 0.9.6d and 0.9.6e [30 Jul 2002] - - *) Add various sanity checks to asn1_get_length() to reject - the ASN1 length bytes if they exceed sizeof(long), will appear - negative or the content length exceeds the length of the - supplied buffer. - [Steve Henson, Adi Stav , James Yonan ] - - *) Fix cipher selection routines: ciphers without encryption had no flags - for the cipher strength set and where therefore not handled correctly - by the selection routines (PR #130). - [Lutz Jaenicke] - - *) Fix EVP_dsa_sha macro. - [Nils Larsch] - - *) New option - SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS - for disabling the SSL 3.0/TLS 1.0 CBC vulnerability countermeasure - that was added in OpenSSL 0.9.6d. - - As the countermeasure turned out to be incompatible with some - broken SSL implementations, the new option is part of SSL_OP_ALL. - SSL_OP_ALL is usually employed when compatibility with weird SSL - implementations is desired (e.g. '-bugs' option to 's_client' and - 's_server'), so the new option is automatically set in many - applications. - [Bodo Moeller] - - *) Changes in security patch: - - Changes marked "(CHATS)" were sponsored by the Defense Advanced - Research Projects Agency (DARPA) and Air Force Research Laboratory, - Air Force Materiel Command, USAF, under agreement number - F30602-01-2-0537. - - *) Add various sanity checks to asn1_get_length() to reject - the ASN1 length bytes if they exceed sizeof(long), will appear - negative or the content length exceeds the length of the - supplied buffer. (CVE-2002-0659) - [Steve Henson, Adi Stav , James Yonan ] - - *) Assertions for various potential buffer overflows, not known to - happen in practice. - [Ben Laurie (CHATS)] - - *) Various temporary buffers to hold ASCII versions of integers were - too small for 64 bit platforms. (CVE-2002-0655) - [Matthew Byng-Maddick and Ben Laurie (CHATS)> - - *) Remote buffer overflow in SSL3 protocol - an attacker could - supply an oversized session ID to a client. (CVE-2002-0656) - [Ben Laurie (CHATS)] - - *) Remote buffer overflow in SSL2 protocol - an attacker could - supply an oversized client master key. (CVE-2002-0656) - [Ben Laurie (CHATS)] - - Changes between 0.9.6c and 0.9.6d [9 May 2002] - - *) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not - encoded as NULL) with id-dsa-with-sha1. - [Nils Larsch ; problem pointed out by Bodo Moeller] - - *) Check various X509_...() return values in apps/req.c. - [Nils Larsch ] - - *) Fix BASE64 decode (EVP_DecodeUpdate) for data with CR/LF ended lines: - an end-of-file condition would erronously be flagged, when the CRLF - was just at the end of a processed block. The bug was discovered when - processing data through a buffering memory BIO handing the data to a - BASE64-decoding BIO. Bug fund and patch submitted by Pavel Tsekov - and Nedelcho Stanev. - [Lutz Jaenicke] - - *) Implement a countermeasure against a vulnerability recently found - in CBC ciphersuites in SSL 3.0/TLS 1.0: Send an empty fragment - before application data chunks to avoid the use of known IVs - with data potentially chosen by the attacker. - [Bodo Moeller] - - *) Fix length checks in ssl3_get_client_hello(). - [Bodo Moeller] - - *) TLS/SSL library bugfix: use s->s3->in_read_app_data differently - to prevent ssl3_read_internal() from incorrectly assuming that - ssl3_read_bytes() found application data while handshake - processing was enabled when in fact s->s3->in_read_app_data was - merely automatically cleared during the initial handshake. - [Bodo Moeller; problem pointed out by Arne Ansper ] - - *) Fix object definitions for Private and Enterprise: they were not - recognized in their shortname (=lowercase) representation. Extend - obj_dat.pl to issue an error when using undefined keywords instead - of silently ignoring the problem (Svenning Sorensen - ). - [Lutz Jaenicke] - - *) Fix DH_generate_parameters() so that it works for 'non-standard' - generators, i.e. generators other than 2 and 5. (Previously, the - code did not properly initialise the 'add' and 'rem' values to - BN_generate_prime().) - - In the new general case, we do not insist that 'generator' is - actually a primitive root: This requirement is rather pointless; - a generator of the order-q subgroup is just as good, if not - better. - [Bodo Moeller] - - *) Map new X509 verification errors to alerts. Discovered and submitted by - Tom Wu . - [Lutz Jaenicke] - - *) Fix ssl3_pending() (ssl/s3_lib.c) to prevent SSL_pending() from - returning non-zero before the data has been completely received - when using non-blocking I/O. - [Bodo Moeller; problem pointed out by John Hughes] - - *) Some of the ciphers missed the strength entry (SSL_LOW etc). - [Ben Laurie, Lutz Jaenicke] - - *) Fix bug in SSL_clear(): bad sessions were not removed (found by - Yoram Zahavi ). - [Lutz Jaenicke] - - *) Add information about CygWin 1.3 and on, and preserve proper - configuration for the versions before that. - [Corinna Vinschen and Richard Levitte] - - *) Make removal from session cache (SSL_CTX_remove_session()) more robust: - check whether we deal with a copy of a session and do not delete from - the cache in this case. Problem reported by "Izhar Shoshani Levi" - . - [Lutz Jaenicke] - - *) Do not store session data into the internal session cache, if it - is never intended to be looked up (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP - flag is set). Proposed by Aslam . - [Lutz Jaenicke] - - *) Have ASN1_BIT_STRING_set_bit() really clear a bit when the requested - value is 0. - [Richard Levitte] - - *) [In 0.9.6d-engine release:] - Fix a crashbug and a logic bug in hwcrhk_load_pubkey(). - [Toomas Kiisk via Richard Levitte] - - *) Add the configuration target linux-s390x. - [Neale Ferguson via Richard Levitte] - - *) The earlier bugfix for the SSL3_ST_SW_HELLO_REQ_C case of - ssl3_accept (ssl/s3_srvr.c) incorrectly used a local flag - variable as an indication that a ClientHello message has been - received. As the flag value will be lost between multiple - invocations of ssl3_accept when using non-blocking I/O, the - function may not be aware that a handshake has actually taken - place, thus preventing a new session from being added to the - session cache. - - To avoid this problem, we now set s->new_session to 2 instead of - using a local variable. - [Lutz Jaenicke, Bodo Moeller] - - *) Bugfix: Return -1 from ssl3_get_server_done (ssl3/s3_clnt.c) - if the SSL_R_LENGTH_MISMATCH error is detected. - [Geoff Thorpe, Bodo Moeller] - - *) New 'shared_ldflag' column in Configure platform table. - [Richard Levitte] - - *) Fix EVP_CIPHER_mode macro. - ["Dan S. Camper" ] - - *) Fix ssl3_read_bytes (ssl/s3_pkt.c): To ignore messages of unknown - type, we must throw them away by setting rr->length to 0. - [D P Chang ] - - Changes between 0.9.6b and 0.9.6c [21 dec 2001] - - *) Fix BN_rand_range bug pointed out by Dominikus Scherkl - . (The previous implementation - worked incorrectly for those cases where range = 10..._2 and - 3*range is two bits longer than range.) - [Bodo Moeller] - - *) Only add signing time to PKCS7 structures if it is not already - present. - [Steve Henson] - - *) Fix crypto/objects/objects.h: "ld-ce" should be "id-ce", - OBJ_ld_ce should be OBJ_id_ce. - Also some ip-pda OIDs in crypto/objects/objects.txt were - incorrect (cf. RFC 3039). - [Matt Cooper, Frederic Giudicelli, Bodo Moeller] - - *) Release CRYPTO_LOCK_DYNLOCK when CRYPTO_destroy_dynlockid() - returns early because it has nothing to do. - [Andy Schneider ] - - *) [In 0.9.6c-engine release:] - Fix mutex callback return values in crypto/engine/hw_ncipher.c. - [Andy Schneider ] - - *) [In 0.9.6c-engine release:] - Add support for Cryptographic Appliance's keyserver technology. - (Use engine 'keyclient') - [Cryptographic Appliances and Geoff Thorpe] - - *) Add a configuration entry for OS/390 Unix. The C compiler 'c89' - is called via tools/c89.sh because arguments have to be - rearranged (all '-L' options must appear before the first object - modules). - [Richard Shapiro ] - - *) [In 0.9.6c-engine release:] - Add support for Broadcom crypto accelerator cards, backported - from 0.9.7. - [Broadcom, Nalin Dahyabhai , Mark Cox] - - *) [In 0.9.6c-engine release:] - Add support for SureWare crypto accelerator cards from - Baltimore Technologies. (Use engine 'sureware') - [Baltimore Technologies and Mark Cox] - - *) [In 0.9.6c-engine release:] - Add support for crypto accelerator cards from Accelerated - Encryption Processing, www.aep.ie. (Use engine 'aep') - [AEP Inc. and Mark Cox] - - *) Add a configuration entry for gcc on UnixWare. - [Gary Benson ] - - *) Change ssl/s2_clnt.c and ssl/s2_srvr.c so that received handshake - messages are stored in a single piece (fixed-length part and - variable-length part combined) and fix various bugs found on the way. - [Bodo Moeller] - - *) Disable caching in BIO_gethostbyname(), directly use gethostbyname() - instead. BIO_gethostbyname() does not know what timeouts are - appropriate, so entries would stay in cache even when they have - become invalid. - [Bodo Moeller; problem pointed out by Rich Salz - - *) Change ssl23_get_client_hello (ssl/s23_srvr.c) behaviour when - faced with a pathologically small ClientHello fragment that does - not contain client_version: Instead of aborting with an error, - simply choose the highest available protocol version (i.e., - TLS 1.0 unless it is disabled). In practice, ClientHello - messages are never sent like this, but this change gives us - strictly correct behaviour at least for TLS. - [Bodo Moeller] - - *) Fix SSL handshake functions and SSL_clear() such that SSL_clear() - never resets s->method to s->ctx->method when called from within - one of the SSL handshake functions. - [Bodo Moeller; problem pointed out by Niko Baric] - - *) In ssl3_get_client_hello (ssl/s3_srvr.c), generate a fatal alert - (sent using the client's version number) if client_version is - smaller than the protocol version in use. Also change - ssl23_get_client_hello (ssl/s23_srvr.c) to select TLS 1.0 if - the client demanded SSL 3.0 but only TLS 1.0 is enabled; then - the client will at least see that alert. - [Bodo Moeller] - - *) Fix ssl3_get_message (ssl/s3_both.c) to handle message fragmentation - correctly. - [Bodo Moeller] - - *) Avoid infinite loop in ssl3_get_message (ssl/s3_both.c) if a - client receives HelloRequest while in a handshake. - [Bodo Moeller; bug noticed by Andy Schneider ] - - *) Bugfix in ssl3_accept (ssl/s3_srvr.c): Case SSL3_ST_SW_HELLO_REQ_C - should end in 'break', not 'goto end' which circuments various - cleanups done in state SSL_ST_OK. But session related stuff - must be disabled for SSL_ST_OK in the case that we just sent a - HelloRequest. - - Also avoid some overhead by not calling ssl_init_wbio_buffer() - before just sending a HelloRequest. - [Bodo Moeller, Eric Rescorla ] - - *) Fix ssl/s3_enc.c, ssl/t1_enc.c and ssl/s3_pkt.c so that we don't - reveal whether illegal block cipher padding was found or a MAC - verification error occured. (Neither SSLerr() codes nor alerts - are directly visible to potential attackers, but the information - may leak via logfiles.) - - Similar changes are not required for the SSL 2.0 implementation - because the number of padding bytes is sent in clear for SSL 2.0, - and the extra bytes are just ignored. However ssl/s2_pkt.c - failed to verify that the purported number of padding bytes is in - the legal range. - [Bodo Moeller] - - *) Add OpenUNIX-8 support including shared libraries - (Boyd Lynn Gerber ). - [Lutz Jaenicke] - - *) Improve RSA_padding_check_PKCS1_OAEP() check again to avoid - 'wristwatch attack' using huge encoding parameters (cf. - James H. Manger's CRYPTO 2001 paper). Note that the - RSA_PKCS1_OAEP_PADDING case of RSA_private_decrypt() does not use - encoding parameters and hence was not vulnerable. - [Bodo Moeller] - - *) BN_sqr() bug fix. - [Ulf Möller, reported by Jim Ellis ] - - *) Rabin-Miller test analyses assume uniformly distributed witnesses, - so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() - followed by modular reduction. - [Bodo Moeller; pointed out by Adam Young ] - - *) Add BN_pseudo_rand_range() with obvious functionality: BN_rand_range() - equivalent based on BN_pseudo_rand() instead of BN_rand(). - [Bodo Moeller] - - *) s3_srvr.c: allow sending of large client certificate lists (> 16 kB). - This function was broken, as the check for a new client hello message - to handle SGC did not allow these large messages. - (Tracked down by "Douglas E. Engert" .) - [Lutz Jaenicke] - - *) Add alert descriptions for TLSv1 to SSL_alert_desc_string[_long](). - [Lutz Jaenicke] - - *) Fix buggy behaviour of BIO_get_num_renegotiates() and BIO_ctrl() - for BIO_C_GET_WRITE_BUF_SIZE ("Stephen Hinton" ). - [Lutz Jaenicke] - - *) Rework the configuration and shared library support for Tru64 Unix. - The configuration part makes use of modern compiler features and - still retains old compiler behavior for those that run older versions - of the OS. The shared library support part includes a variant that - uses the RPATH feature, and is available through the special - configuration target "alpha-cc-rpath", which will never be selected - automatically. - [Tim Mooney via Richard Levitte] - - *) In ssl3_get_key_exchange (ssl/s3_clnt.c), call ssl3_get_message() - with the same message size as in ssl3_get_certificate_request(). - Otherwise, if no ServerKeyExchange message occurs, CertificateRequest - messages might inadvertently be reject as too long. - [Petr Lampa ] - - *) Enhanced support for IA-64 Unix platforms (well, Linux and HP-UX). - [Andy Polyakov] - - *) Modified SSL library such that the verify_callback that has been set - specificly for an SSL object with SSL_set_verify() is actually being - used. Before the change, a verify_callback set with this function was - ignored and the verify_callback() set in the SSL_CTX at the time of - the call was used. New function X509_STORE_CTX_set_verify_cb() introduced - to allow the necessary settings. - [Lutz Jaenicke] - - *) Initialize static variable in crypto/dsa/dsa_lib.c and crypto/dh/dh_lib.c - explicitly to NULL, as at least on Solaris 8 this seems not always to be - done automatically (in contradiction to the requirements of the C - standard). This made problems when used from OpenSSH. - [Lutz Jaenicke] - - *) In OpenSSL 0.9.6a and 0.9.6b, crypto/dh/dh_key.c ignored - dh->length and always used - - BN_rand_range(priv_key, dh->p). - - BN_rand_range() is not necessary for Diffie-Hellman, and this - specific range makes Diffie-Hellman unnecessarily inefficient if - dh->length (recommended exponent length) is much smaller than the - length of dh->p. We could use BN_rand_range() if the order of - the subgroup was stored in the DH structure, but we only have - dh->length. - - So switch back to - - BN_rand(priv_key, l, ...) - - where 'l' is dh->length if this is defined, or BN_num_bits(dh->p)-1 - otherwise. - [Bodo Moeller] - - *) In - - RSA_eay_public_encrypt - RSA_eay_private_decrypt - RSA_eay_private_encrypt (signing) - RSA_eay_public_decrypt (signature verification) - - (default implementations for RSA_public_encrypt, - RSA_private_decrypt, RSA_private_encrypt, RSA_public_decrypt), - always reject numbers >= n. - [Bodo Moeller] - - *) In crypto/rand/md_rand.c, use a new short-time lock CRYPTO_LOCK_RAND2 - to synchronize access to 'locking_thread'. This is necessary on - systems where access to 'locking_thread' (an 'unsigned long' - variable) is not atomic. - [Bodo Moeller] - - *) In crypto/rand/md_rand.c, set 'locking_thread' to current thread's ID - *before* setting the 'crypto_lock_rand' flag. The previous code had - a race condition if 0 is a valid thread ID. - [Travis Vitek ] - - *) Add support for shared libraries under Irix. - [Albert Chin-A-Young ] - - *) Add configuration option to build on Linux on both big-endian and - little-endian MIPS. - [Ralf Baechle ] - - *) Add the possibility to create shared libraries on HP-UX. - [Richard Levitte] - - Changes between 0.9.6a and 0.9.6b [9 Jul 2001] - - *) Change ssleay_rand_bytes (crypto/rand/md_rand.c) - to avoid a SSLeay/OpenSSL PRNG weakness pointed out by - Markku-Juhani O. Saarinen : - PRNG state recovery was possible based on the output of - one PRNG request appropriately sized to gain knowledge on - 'md' followed by enough consecutive 1-byte PRNG requests - to traverse all of 'state'. - - 1. When updating 'md_local' (the current thread's copy of 'md') - during PRNG output generation, hash all of the previous - 'md_local' value, not just the half used for PRNG output. - - 2. Make the number of bytes from 'state' included into the hash - independent from the number of PRNG bytes requested. - - The first measure alone would be sufficient to avoid - Markku-Juhani's attack. (Actually it had never occurred - to me that the half of 'md_local' used for chaining was the - half from which PRNG output bytes were taken -- I had always - assumed that the secret half would be used.) The second - measure makes sure that additional data from 'state' is never - mixed into 'md_local' in small portions; this heuristically - further strengthens the PRNG. - [Bodo Moeller] - - *) Fix crypto/bn/asm/mips3.s. - [Andy Polyakov] - - *) When only the key is given to "enc", the IV is undefined. Print out - an error message in this case. - [Lutz Jaenicke] - - *) Handle special case when X509_NAME is empty in X509 printing routines. - [Steve Henson] - - *) In dsa_do_verify (crypto/dsa/dsa_ossl.c), verify that r and s are - positive and less than q. - [Bodo Moeller] - - *) Don't change *pointer in CRYPTO_add_lock() is add_lock_callback is - used: it isn't thread safe and the add_lock_callback should handle - that itself. - [Paul Rose ] - - *) Verify that incoming data obeys the block size in - ssl3_enc (ssl/s3_enc.c) and tls1_enc (ssl/t1_enc.c). - [Bodo Moeller] - - *) Fix OAEP check. - [Ulf Möller, Bodo Möller] - - *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 - RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 - when fixing the server behaviour for backwards-compatible 'client - hello' messages. (Note that the attack is impractical against - SSL 3.0 and TLS 1.0 anyway because length and version checking - means that the probability of guessing a valid ciphertext is - around 2^-40; see section 5 in Bleichenbacher's CRYPTO '98 - paper.) - - Before 0.9.5, the countermeasure (hide the error by generating a - random 'decryption result') did not work properly because - ERR_clear_error() was missing, meaning that SSL_get_error() would - detect the supposedly ignored error. - - Both problems are now fixed. - [Bodo Moeller] - - *) In crypto/bio/bf_buff.c, increase DEFAULT_BUFFER_SIZE to 4096 - (previously it was 1024). - [Bodo Moeller] - - *) Fix for compatibility mode trust settings: ignore trust settings - unless some valid trust or reject settings are present. - [Steve Henson] - - *) Fix for blowfish EVP: its a variable length cipher. - [Steve Henson] - - *) Fix various bugs related to DSA S/MIME verification. Handle missing - parameters in DSA public key structures and return an error in the - DSA routines if parameters are absent. - [Steve Henson] - - *) In versions up to 0.9.6, RAND_file_name() resorted to file ".rnd" - in the current directory if neither $RANDFILE nor $HOME was set. - RAND_file_name() in 0.9.6a returned NULL in this case. This has - caused some confusion to Windows users who haven't defined $HOME. - Thus RAND_file_name() is changed again: e_os.h can define a - DEFAULT_HOME, which will be used if $HOME is not set. - For Windows, we use "C:"; on other platforms, we still require - environment variables. - - *) Move 'if (!initialized) RAND_poll()' into regions protected by - CRYPTO_LOCK_RAND. This is not strictly necessary, but avoids - having multiple threads call RAND_poll() concurrently. - [Bodo Moeller] - - *) In crypto/rand/md_rand.c, replace 'add_do_not_lock' flag by a - combination of a flag and a thread ID variable. - Otherwise while one thread is in ssleay_rand_bytes (which sets the - flag), *other* threads can enter ssleay_add_bytes without obeying - the CRYPTO_LOCK_RAND lock (and may even illegally release the lock - that they do not hold after the first thread unsets add_do_not_lock). - [Bodo Moeller] - - *) Change bctest again: '-x' expressions are not available in all - versions of 'test'. - [Bodo Moeller] - - Changes between 0.9.6 and 0.9.6a [5 Apr 2001] - - *) Fix a couple of memory leaks in PKCS7_dataDecode() - [Steve Henson, reported by Heyun Zheng ] - - *) Change Configure and Makefiles to provide EXE_EXT, which will contain - the default extension for executables, if any. Also, make the perl - scripts that use symlink() to test if it really exists and use "cp" - if it doesn't. All this made OpenSSL compilable and installable in - CygWin. - [Richard Levitte] - - *) Fix for asn1_GetSequence() for indefinite length constructed data. - If SEQUENCE is length is indefinite just set c->slen to the total - amount of data available. - [Steve Henson, reported by shige@FreeBSD.org] - [This change does not apply to 0.9.7.] - - *) Change bctest to avoid here-documents inside command substitution - (workaround for FreeBSD /bin/sh bug). - For compatibility with Ultrix, avoid shell functions (introduced - in the bctest version that searches along $PATH). - [Bodo Moeller] - - *) Rename 'des_encrypt' to 'des_encrypt1'. This avoids the clashes - with des_encrypt() defined on some operating systems, like Solaris - and UnixWare. - [Richard Levitte] - - *) Check the result of RSA-CRT (see D. Boneh, R. DeMillo, R. Lipton: - On the Importance of Eliminating Errors in Cryptographic - Computations, J. Cryptology 14 (2001) 2, 101-119, - http://theory.stanford.edu/~dabo/papers/faults.ps.gz). - [Ulf Moeller] - - *) MIPS assembler BIGNUM division bug fix. - [Andy Polyakov] - - *) Disabled incorrect Alpha assembler code. - [Richard Levitte] - - *) Fix PKCS#7 decode routines so they correctly update the length - after reading an EOC for the EXPLICIT tag. - [Steve Henson] - [This change does not apply to 0.9.7.] - - *) Fix bug in PKCS#12 key generation routines. This was triggered - if a 3DES key was generated with a 0 initial byte. Include - PKCS12_BROKEN_KEYGEN compilation option to retain the old - (but broken) behaviour. - [Steve Henson] - - *) Enhance bctest to search for a working bc along $PATH and print - it when found. - [Tim Rice via Richard Levitte] - - *) Fix memory leaks in err.c: free err_data string if necessary; - don't write to the wrong index in ERR_set_error_data. - [Bodo Moeller] - - *) Implement ssl23_peek (analogous to ssl23_read), which previously - did not exist. - [Bodo Moeller] - - *) Replace rdtsc with _emit statements for VC++ version 5. - [Jeremy Cooper ] - - *) Make it possible to reuse SSLv2 sessions. - [Richard Levitte] - - *) In copy_email() check for >= 0 as a return value for - X509_NAME_get_index_by_NID() since 0 is a valid index. - [Steve Henson reported by Massimiliano Pala ] - - *) Avoid coredump with unsupported or invalid public keys by checking if - X509_get_pubkey() fails in PKCS7_verify(). Fix memory leak when - PKCS7_verify() fails with non detached data. - [Steve Henson] - - *) Don't use getenv in library functions when run as setuid/setgid. - New function OPENSSL_issetugid(). - [Ulf Moeller] - - *) Avoid false positives in memory leak detection code (crypto/mem_dbg.c) - due to incorrect handling of multi-threading: - - 1. Fix timing glitch in the MemCheck_off() portion of CRYPTO_mem_ctrl(). - - 2. Fix logical glitch in is_MemCheck_on() aka CRYPTO_is_mem_check_on(). - - 3. Count how many times MemCheck_off() has been called so that - nested use can be treated correctly. This also avoids - inband-signalling in the previous code (which relied on the - assumption that thread ID 0 is impossible). - [Bodo Moeller] - - *) Add "-rand" option also to s_client and s_server. - [Lutz Jaenicke] - - *) Fix CPU detection on Irix 6.x. - [Kurt Hockenbury and - "Bruce W. Forsberg" ] - - *) Fix X509_NAME bug which produced incorrect encoding if X509_NAME - was empty. - [Steve Henson] - [This change does not apply to 0.9.7.] - - *) Use the cached encoding of an X509_NAME structure rather than - copying it. This is apparently the reason for the libsafe "errors" - but the code is actually correct. - [Steve Henson] - - *) Add new function BN_rand_range(), and fix DSA_sign_setup() to prevent - Bleichenbacher's DSA attack. - Extend BN_[pseudo_]rand: As before, top=1 forces the highest two bits - to be set and top=0 forces the highest bit to be set; top=-1 is new - and leaves the highest bit random. - [Ulf Moeller, Bodo Moeller] - - *) In the NCONF_...-based implementations for CONF_... queries - (crypto/conf/conf_lib.c), if the input LHASH is NULL, avoid using - a temporary CONF structure with the data component set to NULL - (which gives segmentation faults in lh_retrieve). - Instead, use NULL for the CONF pointer in CONF_get_string and - CONF_get_number (which may use environment variables) and directly - return NULL from CONF_get_section. - [Bodo Moeller] - - *) Fix potential buffer overrun for EBCDIC. - [Ulf Moeller] - - *) Tolerate nonRepudiation as being valid for S/MIME signing and certSign - keyUsage if basicConstraints absent for a CA. - [Steve Henson] - - *) Make SMIME_write_PKCS7() write mail header values with a format that - is more generally accepted (no spaces before the semicolon), since - some programs can't parse those values properly otherwise. Also make - sure BIO's that break lines after each write do not create invalid - headers. - [Richard Levitte] - - *) Make the CRL encoding routines work with empty SEQUENCE OF. The - macros previously used would not encode an empty SEQUENCE OF - and break the signature. - [Steve Henson] - [This change does not apply to 0.9.7.] - - *) Zero the premaster secret after deriving the master secret in - DH ciphersuites. - [Steve Henson] - - *) Add some EVP_add_digest_alias registrations (as found in - OpenSSL_add_all_digests()) to SSL_library_init() - aka OpenSSL_add_ssl_algorithms(). This provides improved - compatibility with peers using X.509 certificates - with unconventional AlgorithmIdentifier OIDs. - [Bodo Moeller] - - *) Fix for Irix with NO_ASM. - ["Bruce W. Forsberg" ] - - *) ./config script fixes. - [Ulf Moeller, Richard Levitte] - - *) Fix 'openssl passwd -1'. - [Bodo Moeller] - - *) Change PKCS12_key_gen_asc() so it can cope with non null - terminated strings whose length is passed in the passlen - parameter, for example from PEM callbacks. This was done - by adding an extra length parameter to asc2uni(). - [Steve Henson, reported by ] - - *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn - call failed, free the DSA structure. - [Bodo Moeller] - - *) Fix to uni2asc() to cope with zero length Unicode strings. - These are present in some PKCS#12 files. - [Steve Henson] - - *) Increase s2->wbuf allocation by one byte in ssl2_new (ssl/s2_lib.c). - Otherwise do_ssl_write (ssl/s2_pkt.c) will write beyond buffer limits - when writing a 32767 byte record. - [Bodo Moeller; problem reported by Eric Day ] - - *) In RSA_eay_public_{en,ed}crypt and RSA_eay_mod_exp (rsa_eay.c), - obtain lock CRYPTO_LOCK_RSA before setting rsa->_method_mod_{n,p,q}. - - (RSA objects have a reference count access to which is protected - by CRYPTO_LOCK_RSA [see rsa_lib.c, s3_srvr.c, ssl_cert.c, ssl_rsa.c], - so they are meant to be shared between threads.) - [Bodo Moeller, Geoff Thorpe; original patch submitted by - "Reddie, Steven" ] - - *) Fix a deadlock in CRYPTO_mem_leaks(). - [Bodo Moeller] - - *) Use better test patterns in bntest. - [Ulf Möller] - - *) rand_win.c fix for Borland C. - [Ulf Möller] - - *) BN_rshift bugfix for n == 0. - [Bodo Moeller] - - *) Add a 'bctest' script that checks for some known 'bc' bugs - so that 'make test' does not abort just because 'bc' is broken. - [Bodo Moeller] - - *) Store verify_result within SSL_SESSION also for client side to - avoid potential security hole. (Re-used sessions on the client side - always resulted in verify_result==X509_V_OK, not using the original - result of the server certificate verification.) - [Lutz Jaenicke] - - *) Fix ssl3_pending: If the record in s->s3->rrec is not of type - SSL3_RT_APPLICATION_DATA, return 0. - Similarly, change ssl2_pending to return 0 if SSL_in_init(s) is true. - [Bodo Moeller] - - *) Fix SSL_peek: - Both ssl2_peek and ssl3_peek, which were totally broken in earlier - releases, have been re-implemented by renaming the previous - implementations of ssl2_read and ssl3_read to ssl2_read_internal - and ssl3_read_internal, respectively, and adding 'peek' parameters - to them. The new ssl[23]_{read,peek} functions are calls to - ssl[23]_read_internal with the 'peek' flag set appropriately. - A 'peek' parameter has also been added to ssl3_read_bytes, which - does the actual work for ssl3_read_internal. - [Bodo Moeller] - - *) Initialise "ex_data" member of RSA/DSA/DH structures prior to calling - the method-specific "init()" handler. Also clean up ex_data after - calling the method-specific "finish()" handler. Previously, this was - happening the other way round. - [Geoff Thorpe] - - *) Increase BN_CTX_NUM (the number of BIGNUMs in a BN_CTX) to 16. - The previous value, 12, was not always sufficient for BN_mod_exp(). - [Bodo Moeller] - - *) Make sure that shared libraries get the internal name engine with - the full version number and not just 0. This should mark the - shared libraries as not backward compatible. Of course, this should - be changed again when we can guarantee backward binary compatibility. - [Richard Levitte] - - *) Fix typo in get_cert_by_subject() in by_dir.c - [Jean-Marc Desperrier ] - - *) Rework the system to generate shared libraries: - - - Make note of the expected extension for the shared libraries and - if there is a need for symbolic links from for example libcrypto.so.0 - to libcrypto.so.0.9.7. There is extended info in Configure for - that. - - - Make as few rebuilds of the shared libraries as possible. - - - Still avoid linking the OpenSSL programs with the shared libraries. - - - When installing, install the shared libraries separately from the - static ones. - [Richard Levitte] - - *) Fix SSL_CTX_set_read_ahead macro to actually use its argument. - - Copy SSL_CTX's read_ahead flag to SSL object directly in SSL_new - and not in SSL_clear because the latter is also used by the - accept/connect functions; previously, the settings made by - SSL_set_read_ahead would be lost during the handshake. - [Bodo Moeller; problems reported by Anders Gertz ] - - *) Correct util/mkdef.pl to be selective about disabled algorithms. - Previously, it would create entries for disableed algorithms no - matter what. - [Richard Levitte] - - *) Added several new manual pages for SSL_* function. - [Lutz Jaenicke] - - Changes between 0.9.5a and 0.9.6 [24 Sep 2000] - - *) In ssl23_get_client_hello, generate an error message when faced - with an initial SSL 3.0/TLS record that is too small to contain the - first two bytes of the ClientHello message, i.e. client_version. - (Note that this is a pathologic case that probably has never happened - in real life.) The previous approach was to use the version number - from the record header as a substitute; but our protocol choice - should not depend on that one because it is not authenticated - by the Finished messages. - [Bodo Moeller] - - *) More robust randomness gathering functions for Windows. - [Jeffrey Altman ] - - *) For compatibility reasons if the flag X509_V_FLAG_ISSUER_CHECK is - not set then we don't setup the error code for issuer check errors - to avoid possibly overwriting other errors which the callback does - handle. If an application does set the flag then we assume it knows - what it is doing and can handle the new informational codes - appropriately. - [Steve Henson] - - *) Fix for a nasty bug in ASN1_TYPE handling. ASN1_TYPE is used for - a general "ANY" type, as such it should be able to decode anything - including tagged types. However it didn't check the class so it would - wrongly interpret tagged types in the same way as their universal - counterpart and unknown types were just rejected. Changed so that the - tagged and unknown types are handled in the same way as a SEQUENCE: - that is the encoding is stored intact. There is also a new type - "V_ASN1_OTHER" which is used when the class is not universal, in this - case we have no idea what the actual type is so we just lump them all - together. - [Steve Henson] - - *) On VMS, stdout may very well lead to a file that is written to - in a record-oriented fashion. That means that every write() will - write a separate record, which will be read separately by the - programs trying to read from it. This can be very confusing. - - The solution is to put a BIO filter in the way that will buffer - text until a linefeed is reached, and then write everything a - line at a time, so every record written will be an actual line, - not chunks of lines and not (usually doesn't happen, but I've - seen it once) several lines in one record. BIO_f_linebuffer() is - the answer. - - Currently, it's a VMS-only method, because that's where it has - been tested well enough. - [Richard Levitte] - - *) Remove 'optimized' squaring variant in BN_mod_mul_montgomery, - it can return incorrect results. - (Note: The buggy variant was not enabled in OpenSSL 0.9.5a, - but it was in 0.9.6-beta[12].) - [Bodo Moeller] - - *) Disable the check for content being present when verifying detached - signatures in pk7_smime.c. Some versions of Netscape (wrongly) - include zero length content when signing messages. - [Steve Henson] - - *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR - BIO_ctrl (for BIO pairs). - [Bodo Möller] - - *) Add DSO method for VMS. - [Richard Levitte] - - *) Bug fix: Montgomery multiplication could produce results with the - wrong sign. - [Ulf Möller] - - *) Add RPM specification openssl.spec and modify it to build three - packages. The default package contains applications, application - documentation and run-time libraries. The devel package contains - include files, static libraries and function documentation. The - doc package contains the contents of the doc directory. The original - openssl.spec was provided by Damien Miller . - [Richard Levitte] - - *) Add a large number of documentation files for many SSL routines. - [Lutz Jaenicke ] - - *) Add a configuration entry for Sony News 4. - [NAKAJI Hiroyuki ] - - *) Don't set the two most significant bits to one when generating a - random number < q in the DSA library. - [Ulf Möller] - - *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default - behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if - the underlying transport is blocking) if a handshake took place. - (The default behaviour is needed by applications such as s_client - and s_server that use select() to determine when to use SSL_read; - but for applications that know in advance when to expect data, it - just makes things more complicated.) - [Bodo Moeller] - - *) Add RAND_egd_bytes(), which gives control over the number of bytes read - from EGD. - [Ben Laurie] - - *) Add a few more EBCDIC conditionals that make `req' and `x509' - work better on such systems. - [Martin Kraemer ] - - *) Add two demo programs for PKCS12_parse() and PKCS12_create(). - Update PKCS12_parse() so it copies the friendlyName and the - keyid to the certificates aux info. - [Steve Henson] - - *) Fix bug in PKCS7_verify() which caused an infinite loop - if there was more than one signature. - [Sven Uszpelkat ] - - *) Major change in util/mkdef.pl to include extra information - about each symbol, as well as presentig variables as well - as functions. This change means that there's n more need - to rebuild the .num files when some algorithms are excluded. - [Richard Levitte] - - *) Allow the verify time to be set by an application, - rather than always using the current time. - [Steve Henson] - - *) Phase 2 verify code reorganisation. The certificate - verify code now looks up an issuer certificate by a - number of criteria: subject name, authority key id - and key usage. It also verifies self signed certificates - by the same criteria. The main comparison function is - X509_check_issued() which performs these checks. - - Lot of changes were necessary in order to support this - without completely rewriting the lookup code. - - Authority and subject key identifier are now cached. - - The LHASH 'certs' is X509_STORE has now been replaced - by a STACK_OF(X509_OBJECT). This is mainly because an - LHASH can't store or retrieve multiple objects with - the same hash value. - - As a result various functions (which were all internal - use only) have changed to handle the new X509_STORE - structure. This will break anything that messed round - with X509_STORE internally. - - The functions X509_STORE_add_cert() now checks for an - exact match, rather than just subject name. - - The X509_STORE API doesn't directly support the retrieval - of multiple certificates matching a given criteria, however - this can be worked round by performing a lookup first - (which will fill the cache with candidate certificates) - and then examining the cache for matches. This is probably - the best we can do without throwing out X509_LOOKUP - entirely (maybe later...). - - The X509_VERIFY_CTX structure has been enhanced considerably. - - All certificate lookup operations now go via a get_issuer() - callback. Although this currently uses an X509_STORE it - can be replaced by custom lookups. This is a simple way - to bypass the X509_STORE hackery necessary to make this - work and makes it possible to use more efficient techniques - in future. A very simple version which uses a simple - STACK for its trusted certificate store is also provided - using X509_STORE_CTX_trusted_stack(). - - The verify_cb() and verify() callbacks now have equivalents - in the X509_STORE_CTX structure. - - X509_STORE_CTX also has a 'flags' field which can be used - to customise the verify behaviour. - [Steve Henson] - - *) Add new PKCS#7 signing option PKCS7_NOSMIMECAP which - excludes S/MIME capabilities. - [Steve Henson] - - *) When a certificate request is read in keep a copy of the - original encoding of the signed data and use it when outputing - again. Signatures then use the original encoding rather than - a decoded, encoded version which may cause problems if the - request is improperly encoded. - [Steve Henson] - - *) For consistency with other BIO_puts implementations, call - buffer_write(b, ...) directly in buffer_puts instead of calling - BIO_write(b, ...). - - In BIO_puts, increment b->num_write as in BIO_write. - [Peter.Sylvester@EdelWeb.fr] - - *) Fix BN_mul_word for the case where the word is 0. (We have to use - BN_zero, we may not return a BIGNUM with an array consisting of - words set to zero.) - [Bodo Moeller] - - *) Avoid calling abort() from within the library when problems are - detected, except if preprocessor symbols have been defined - (such as REF_CHECK, BN_DEBUG etc.). - [Bodo Moeller] - - *) New openssl application 'rsautl'. This utility can be - used for low level RSA operations. DER public key - BIO/fp routines also added. - [Steve Henson] - - *) New Configure entry and patches for compiling on QNX 4. - [Andreas Schneider ] - - *) A demo state-machine implementation was sponsored by - Nuron (http://www.nuron.com/) and is now available in - demos/state_machine. - [Ben Laurie] - - *) New options added to the 'dgst' utility for signature - generation and verification. - [Steve Henson] - - *) Unrecognized PKCS#7 content types are now handled via a - catch all ASN1_TYPE structure. This allows unsupported - types to be stored as a "blob" and an application can - encode and decode it manually. - [Steve Henson] - - *) Fix various signed/unsigned issues to make a_strex.c - compile under VC++. - [Oscar Jacobsson ] - - *) ASN1 fixes. i2d_ASN1_OBJECT was not returning the correct - length if passed a buffer. ASN1_INTEGER_to_BN failed - if passed a NULL BN and its argument was negative. - [Steve Henson, pointed out by Sven Heiberg ] - - *) Modification to PKCS#7 encoding routines to output definite - length encoding. Since currently the whole structures are in - memory there's not real point in using indefinite length - constructed encoding. However if OpenSSL is compiled with - the flag PKCS7_INDEFINITE_ENCODING the old form is used. - [Steve Henson] - - *) Added BIO_vprintf() and BIO_vsnprintf(). - [Richard Levitte] - - *) Added more prefixes to parse for in the the strings written - through a logging bio, to cover all the levels that are available - through syslog. The prefixes are now: - - PANIC, EMERG, EMR => LOG_EMERG - ALERT, ALR => LOG_ALERT - CRIT, CRI => LOG_CRIT - ERROR, ERR => LOG_ERR - WARNING, WARN, WAR => LOG_WARNING - NOTICE, NOTE, NOT => LOG_NOTICE - INFO, INF => LOG_INFO - DEBUG, DBG => LOG_DEBUG - - and as before, if none of those prefixes are present at the - beginning of the string, LOG_ERR is chosen. - - On Win32, the LOG_* levels are mapped according to this: - - LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR => EVENTLOG_ERROR_TYPE - LOG_WARNING => EVENTLOG_WARNING_TYPE - LOG_NOTICE, LOG_INFO, LOG_DEBUG => EVENTLOG_INFORMATION_TYPE - - [Richard Levitte] - - *) Made it possible to reconfigure with just the configuration - argument "reconf" or "reconfigure". The command line arguments - are stored in Makefile.ssl in the variable CONFIGURE_ARGS, - and are retrieved from there when reconfiguring. - [Richard Levitte] - - *) MD4 implemented. - [Assar Westerlund , Richard Levitte] - - *) Add the arguments -CAfile and -CApath to the pkcs12 utility. - [Richard Levitte] - - *) The obj_dat.pl script was messing up the sorting of object - names. The reason was that it compared the quoted version - of strings as a result "OCSP" > "OCSP Signing" because - " > SPACE. Changed script to store unquoted versions of - names and add quotes on output. It was also omitting some - names from the lookup table if they were given a default - value (that is if SN is missing it is given the same - value as LN and vice versa), these are now added on the - grounds that if an object has a name we should be able to - look it up. Finally added warning output when duplicate - short or long names are found. - [Steve Henson] - - *) Changes needed for Tandem NSK. - [Scott Uroff ] - - *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in - RSA_padding_check_SSLv23(), special padding was never detected - and thus the SSL 3.0/TLS 1.0 countermeasure against protocol - version rollback attacks was not effective. - - In s23_clnt.c, don't use special rollback-attack detection padding - (RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the - client; similarly, in s23_srvr.c, don't do the rollback check if - SSL 2.0 is the only protocol enabled in the server. - [Bodo Moeller] - - *) Make it possible to get hexdumps of unprintable data with 'openssl - asn1parse'. By implication, the functions ASN1_parse_dump() and - BIO_dump_indent() are added. - [Richard Levitte] - - *) New functions ASN1_STRING_print_ex() and X509_NAME_print_ex() - these print out strings and name structures based on various - flags including RFC2253 support and proper handling of - multibyte characters. Added options to the 'x509' utility - to allow the various flags to be set. - [Steve Henson] - - *) Various fixes to use ASN1_TIME instead of ASN1_UTCTIME. - Also change the functions X509_cmp_current_time() and - X509_gmtime_adj() work with an ASN1_TIME structure, - this will enable certificates using GeneralizedTime in validity - dates to be checked. - [Steve Henson] - - *) Make the NEG_PUBKEY_BUG code (which tolerates invalid - negative public key encodings) on by default, - NO_NEG_PUBKEY_BUG can be set to disable it. - [Steve Henson] - - *) New function c2i_ASN1_OBJECT() which acts on ASN1_OBJECT - content octets. An i2c_ASN1_OBJECT is unnecessary because - the encoding can be trivially obtained from the structure. - [Steve Henson] - - *) crypto/err.c locking bugfix: Use write locks (CRYPTO_w_[un]lock), - not read locks (CRYPTO_r_[un]lock). - [Bodo Moeller] - - *) A first attempt at creating official support for shared - libraries through configuration. I've kept it so the - default is static libraries only, and the OpenSSL programs - are always statically linked for now, but there are - preparations for dynamic linking in place. - This has been tested on Linux and Tru64. - [Richard Levitte] - - *) Randomness polling function for Win9x, as described in: - Peter Gutmann, Software Generation of Practically Strong - Random Numbers. - [Ulf Möller] - - *) Fix so PRNG is seeded in req if using an already existing - DSA key. - [Steve Henson] - - *) New options to smime application. -inform and -outform - allow alternative formats for the S/MIME message including - PEM and DER. The -content option allows the content to be - specified separately. This should allow things like Netscape - form signing output easier to verify. - [Steve Henson] - - *) Fix the ASN1 encoding of tags using the 'long form'. - [Steve Henson] - - *) New ASN1 functions, i2c_* and c2i_* for INTEGER and BIT - STRING types. These convert content octets to and from the - underlying type. The actual tag and length octets are - already assumed to have been read in and checked. These - are needed because all other string types have virtually - identical handling apart from the tag. By having versions - of the ASN1 functions that just operate on content octets - IMPLICIT tagging can be handled properly. It also allows - the ASN1_ENUMERATED code to be cut down because ASN1_ENUMERATED - and ASN1_INTEGER are identical apart from the tag. - [Steve Henson] - - *) Change the handling of OID objects as follows: - - - New object identifiers are inserted in objects.txt, following - the syntax given in objects.README. - - objects.pl is used to process obj_mac.num and create a new - obj_mac.h. - - obj_dat.pl is used to create a new obj_dat.h, using the data in - obj_mac.h. - - This is currently kind of a hack, and the perl code in objects.pl - isn't very elegant, but it works as I intended. The simplest way - to check that it worked correctly is to look in obj_dat.h and - check the array nid_objs and make sure the objects haven't moved - around (this is important!). Additions are OK, as well as - consistent name changes. - [Richard Levitte] - - *) Add BSD-style MD5-based passwords to 'openssl passwd' (option '-1'). - [Bodo Moeller] - - *) Addition of the command line parameter '-rand file' to 'openssl req'. - The given file adds to whatever has already been seeded into the - random pool through the RANDFILE configuration file option or - environment variable, or the default random state file. - [Richard Levitte] - - *) mkstack.pl now sorts each macro group into lexical order. - Previously the output order depended on the order the files - appeared in the directory, resulting in needless rewriting - of safestack.h . - [Steve Henson] - - *) Patches to make OpenSSL compile under Win32 again. Mostly - work arounds for the VC++ problem that it treats func() as - func(void). Also stripped out the parts of mkdef.pl that - added extra typesafe functions: these no longer exist. - [Steve Henson] - - *) Reorganisation of the stack code. The macros are now all - collected in safestack.h . Each macro is defined in terms of - a "stack macro" of the form SKM_(type, a, b). The - DEBUG_SAFESTACK is now handled in terms of function casts, - this has the advantage of retaining type safety without the - use of additional functions. If DEBUG_SAFESTACK is not defined - then the non typesafe macros are used instead. Also modified the - mkstack.pl script to handle the new form. Needs testing to see - if which (if any) compilers it chokes and maybe make DEBUG_SAFESTACK - the default if no major problems. Similar behaviour for ASN1_SET_OF - and PKCS12_STACK_OF. - [Steve Henson] - - *) When some versions of IIS use the 'NET' form of private key the - key derivation algorithm is different. Normally MD5(password) is - used as a 128 bit RC4 key. In the modified case - MD5(MD5(password) + "SGCKEYSALT") is used insted. Added some - new functions i2d_RSA_NET(), d2i_RSA_NET() etc which are the same - as the old Netscape_RSA functions except they have an additional - 'sgckey' parameter which uses the modified algorithm. Also added - an -sgckey command line option to the rsa utility. Thanks to - Adrian Peck for posting details of the modified - algorithm to openssl-dev. - [Steve Henson] - - *) The evp_local.h macros were using 'c.##kname' which resulted in - invalid expansion on some systems (SCO 5.0.5 for example). - Corrected to 'c.kname'. - [Phillip Porch ] - - *) New X509_get1_email() and X509_REQ_get1_email() functions that return - a STACK of email addresses from a certificate or request, these look - in the subject name and the subject alternative name extensions and - omit any duplicate addresses. - [Steve Henson] - - *) Re-implement BN_mod_exp2_mont using independent (and larger) windows. - This makes DSA verification about 2 % faster. - [Bodo Moeller] - - *) Increase maximum window size in BN_mod_exp_... to 6 bits instead of 5 - (meaning that now 2^5 values will be precomputed, which is only 4 KB - plus overhead for 1024 bit moduli). - This makes exponentiations about 0.5 % faster for 1024 bit - exponents (as measured by "openssl speed rsa2048"). - [Bodo Moeller] - - *) Rename memory handling macros to avoid conflicts with other - software: - Malloc => OPENSSL_malloc - Malloc_locked => OPENSSL_malloc_locked - Realloc => OPENSSL_realloc - Free => OPENSSL_free - [Richard Levitte] - - *) New function BN_mod_exp_mont_word for small bases (roughly 15% - faster than BN_mod_exp_mont, i.e. 7% for a full DH exchange). - [Bodo Moeller] - - *) CygWin32 support. - [John Jarvie ] - - *) The type-safe stack code has been rejigged. It is now only compiled - in when OpenSSL is configured with the DEBUG_SAFESTACK option and - by default all type-specific stack functions are "#define"d back to - standard stack functions. This results in more streamlined output - but retains the type-safety checking possibilities of the original - approach. - [Geoff Thorpe] - - *) The STACK code has been cleaned up, and certain type declarations - that didn't make a lot of sense have been brought in line. This has - also involved a cleanup of sorts in safestack.h to more correctly - map type-safe stack functions onto their plain stack counterparts. - This work has also resulted in a variety of "const"ifications of - lots of the code, especially "_cmp" operations which should normally - be prototyped with "const" parameters anyway. - [Geoff Thorpe] - - *) When generating bytes for the first time in md_rand.c, 'stir the pool' - by seeding with STATE_SIZE dummy bytes (with zero entropy count). - (The PRNG state consists of two parts, the large pool 'state' and 'md', - where all of 'md' is used each time the PRNG is used, but 'state' - is used only indexed by a cyclic counter. As entropy may not be - well distributed from the beginning, 'md' is important as a - chaining variable. However, the output function chains only half - of 'md', i.e. 80 bits. ssleay_rand_add, on the other hand, chains - all of 'md', and seeding with STATE_SIZE dummy bytes will result - in all of 'state' being rewritten, with the new values depending - on virtually all of 'md'. This overcomes the 80 bit limitation.) - [Bodo Moeller] - - *) In ssl/s2_clnt.c and ssl/s3_clnt.c, call ERR_clear_error() when - the handshake is continued after ssl_verify_cert_chain(); - otherwise, if SSL_VERIFY_NONE is set, remaining error codes - can lead to 'unexplainable' connection aborts later. - [Bodo Moeller; problem tracked down by Lutz Jaenicke] - - *) Major EVP API cipher revision. - Add hooks for extra EVP features. This allows various cipher - parameters to be set in the EVP interface. Support added for variable - key length ciphers via the EVP_CIPHER_CTX_set_key_length() function and - setting of RC2 and RC5 parameters. - - Modify EVP_OpenInit() and EVP_SealInit() to cope with variable key length - ciphers. - - Remove lots of duplicated code from the EVP library. For example *every* - cipher init() function handles the 'iv' in the same way according to the - cipher mode. They also all do nothing if the 'key' parameter is NULL and - for CFB and OFB modes they zero ctx->num. - - New functionality allows removal of S/MIME code RC2 hack. - - Most of the routines have the same form and so can be declared in terms - of macros. - - By shifting this to the top level EVP_CipherInit() it can be removed from - all individual ciphers. If the cipher wants to handle IVs or keys - differently it can set the EVP_CIPH_CUSTOM_IV or EVP_CIPH_ALWAYS_CALL_INIT - flags. - - Change lots of functions like EVP_EncryptUpdate() to now return a - value: although software versions of the algorithms cannot fail - any installed hardware versions can. - [Steve Henson] - - *) Implement SSL_OP_TLS_ROLLBACK_BUG: In ssl3_get_client_key_exchange, if - this option is set, tolerate broken clients that send the negotiated - protocol version number instead of the requested protocol version - number. - [Bodo Moeller] - - *) Call dh_tmp_cb (set by ..._TMP_DH_CB) with correct 'is_export' flag; - i.e. non-zero for export ciphersuites, zero otherwise. - Previous versions had this flag inverted, inconsistent with - rsa_tmp_cb (..._TMP_RSA_CB). - [Bodo Moeller; problem reported by Amit Chopra] - - *) Add missing DSA library text string. Work around for some IIS - key files with invalid SEQUENCE encoding. - [Steve Henson] - - *) Add a document (doc/standards.txt) that list all kinds of standards - and so on that are implemented in OpenSSL. - [Richard Levitte] - - *) Enhance c_rehash script. Old version would mishandle certificates - with the same subject name hash and wouldn't handle CRLs at all. - Added -fingerprint option to crl utility, to support new c_rehash - features. - [Steve Henson] - - *) Eliminate non-ANSI declarations in crypto.h and stack.h. - [Ulf Möller] - - *) Fix for SSL server purpose checking. Server checking was - rejecting certificates which had extended key usage present - but no ssl client purpose. - [Steve Henson, reported by Rene Grosser ] - - *) Make PKCS#12 code work with no password. The PKCS#12 spec - is a little unclear about how a blank password is handled. - Since the password in encoded as a BMPString with terminating - double NULL a zero length password would end up as just the - double NULL. However no password at all is different and is - handled differently in the PKCS#12 key generation code. NS - treats a blank password as zero length. MSIE treats it as no - password on export: but it will try both on import. We now do - the same: PKCS12_parse() tries zero length and no password if - the password is set to "" or NULL (NULL is now a valid password: - it wasn't before) as does the pkcs12 application. - [Steve Henson] - - *) Bugfixes in apps/x509.c: Avoid a memory leak; and don't use - perror when PEM_read_bio_X509_REQ fails, the error message must - be obtained from the error queue. - [Bodo Moeller] - - *) Avoid 'thread_hash' memory leak in crypto/err/err.c by freeing - it in ERR_remove_state if appropriate, and change ERR_get_state - accordingly to avoid race conditions (this is necessary because - thread_hash is no longer constant once set). - [Bodo Moeller] - - *) Bugfix for linux-elf makefile.one. - [Ulf Möller] - - *) RSA_get_default_method() will now cause a default - RSA_METHOD to be chosen if one doesn't exist already. - Previously this was only set during a call to RSA_new() - or RSA_new_method(NULL) meaning it was possible for - RSA_get_default_method() to return NULL. - [Geoff Thorpe] - - *) Added native name translation to the existing DSO code - that will convert (if the flag to do so is set) filenames - that are sufficiently small and have no path information - into a canonical native form. Eg. "blah" converted to - "libblah.so" or "blah.dll" etc. - [Geoff Thorpe] - - *) New function ERR_error_string_n(e, buf, len) which is like - ERR_error_string(e, buf), but writes at most 'len' bytes - including the 0 terminator. For ERR_error_string_n, 'buf' - may not be NULL. - [Damien Miller , Bodo Moeller] - - *) CONF library reworked to become more general. A new CONF - configuration file reader "class" is implemented as well as a - new functions (NCONF_*, for "New CONF") to handle it. The now - old CONF_* functions are still there, but are reimplemented to - work in terms of the new functions. Also, a set of functions - to handle the internal storage of the configuration data is - provided to make it easier to write new configuration file - reader "classes" (I can definitely see something reading a - configuration file in XML format, for example), called _CONF_*, - or "the configuration storage API"... - - The new configuration file reading functions are: - - NCONF_new, NCONF_free, NCONF_load, NCONF_load_fp, NCONF_load_bio, - NCONF_get_section, NCONF_get_string, NCONF_get_numbre - - NCONF_default, NCONF_WIN32 - - NCONF_dump_fp, NCONF_dump_bio - - NCONF_default and NCONF_WIN32 are method (or "class") choosers, - NCONF_new creates a new CONF object. This works in the same way - as other interfaces in OpenSSL, like the BIO interface. - NCONF_dump_* dump the internal storage of the configuration file, - which is useful for debugging. All other functions take the same - arguments as the old CONF_* functions wth the exception of the - first that must be a `CONF *' instead of a `LHASH *'. - - To make it easer to use the new classes with the old CONF_* functions, - the function CONF_set_default_method is provided. - [Richard Levitte] - - *) Add '-tls1' option to 'openssl ciphers', which was already - mentioned in the documentation but had not been implemented. - (This option is not yet really useful because even the additional - experimental TLS 1.0 ciphers are currently treated as SSL 3.0 ciphers.) - [Bodo Moeller] - - *) Initial DSO code added into libcrypto for letting OpenSSL (and - OpenSSL-based applications) load shared libraries and bind to - them in a portable way. - [Geoff Thorpe, with contributions from Richard Levitte] - - Changes between 0.9.5 and 0.9.5a [1 Apr 2000] - - *) Make sure _lrotl and _lrotr are only used with MSVC. - - *) Use lock CRYPTO_LOCK_RAND correctly in ssleay_rand_status - (the default implementation of RAND_status). - - *) Rename openssl x509 option '-crlext', which was added in 0.9.5, - to '-clrext' (= clear extensions), as intended and documented. - [Bodo Moeller; inconsistency pointed out by Michael Attili - ] - - *) Fix for HMAC. It wasn't zeroing the rest of the block if the key length - was larger than the MD block size. - [Steve Henson, pointed out by Yost William ] - - *) Modernise PKCS12_parse() so it uses STACK_OF(X509) for its ca argument - fix a leak when the ca argument was passed as NULL. Stop X509_PUBKEY_set() - using the passed key: if the passed key was a private key the result - of X509_print(), for example, would be to print out all the private key - components. - [Steve Henson] - - *) des_quad_cksum() byte order bug fix. - [Ulf Möller, using the problem description in krb4-0.9.7, where - the solution is attributed to Derrick J Brashear ] - - *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly - discouraged. - [Steve Henson, pointed out by Brian Korver ] - - *) For easily testing in shell scripts whether some command - 'openssl XXX' exists, the new pseudo-command 'openssl no-XXX' - returns with exit code 0 iff no command of the given name is available. - 'no-XXX' is printed in this case, 'XXX' otherwise. In both cases, - the output goes to stdout and nothing is printed to stderr. - Additional arguments are always ignored. - - Since for each cipher there is a command of the same name, - the 'no-cipher' compilation switches can be tested this way. - - ('openssl no-XXX' is not able to detect pseudo-commands such - as 'quit', 'list-XXX-commands', or 'no-XXX' itself.) - [Bodo Moeller] - - *) Update test suite so that 'make test' succeeds in 'no-rsa' configuration. - [Bodo Moeller] - - *) For SSL_[CTX_]set_tmp_dh, don't create a DH key if SSL_OP_SINGLE_DH_USE - is set; it will be thrown away anyway because each handshake creates - its own key. - ssl_cert_dup, which is used by SSL_new, now copies DH keys in addition - to parameters -- in previous versions (since OpenSSL 0.9.3) the - 'default key' from SSL_CTX_set_tmp_dh would always be lost, meanining - you effectivly got SSL_OP_SINGLE_DH_USE when using this macro. - [Bodo Moeller] - - *) New s_client option -ign_eof: EOF at stdin is ignored, and - 'Q' and 'R' lose their special meanings (quit/renegotiate). - This is part of what -quiet does; unlike -quiet, -ign_eof - does not suppress any output. - [Richard Levitte] - - *) Add compatibility options to the purpose and trust code. The - purpose X509_PURPOSE_ANY is "any purpose" which automatically - accepts a certificate or CA, this was the previous behaviour, - with all the associated security issues. - - X509_TRUST_COMPAT is the old trust behaviour: only and - automatically trust self signed roots in certificate store. A - new trust setting X509_TRUST_DEFAULT is used to specify that - a purpose has no associated trust setting and it should instead - use the value in the default purpose. - [Steve Henson] - - *) Fix the PKCS#8 DSA private key code so it decodes keys again - and fix a memory leak. - [Steve Henson] - - *) In util/mkerr.pl (which implements 'make errors'), preserve - reason strings from the previous version of the .c file, as - the default to have only downcase letters (and digits) in - automatically generated reasons codes is not always appropriate. - [Bodo Moeller] - - *) In ERR_load_ERR_strings(), build an ERR_LIB_SYS error reason table - using strerror. Previously, ERR_reason_error_string() returned - library names as reason strings for SYSerr; but SYSerr is a special - case where small numbers are errno values, not library numbers. - [Bodo Moeller] - - *) Add '-dsaparam' option to 'openssl dhparam' application. This - converts DSA parameters into DH parameters. (When creating parameters, - DSA_generate_parameters is used.) - [Bodo Moeller] - - *) Include 'length' (recommended exponent length) in C code generated - by 'openssl dhparam -C'. - [Bodo Moeller] - - *) The second argument to set_label in perlasm was already being used - so couldn't be used as a "file scope" flag. Moved to third argument - which was free. - [Steve Henson] - - *) In PEM_ASN1_write_bio and some other functions, use RAND_pseudo_bytes - instead of RAND_bytes for encryption IVs and salts. - [Bodo Moeller] - - *) Include RAND_status() into RAND_METHOD instead of implementing - it only for md_rand.c Otherwise replacing the PRNG by calling - RAND_set_rand_method would be impossible. - [Bodo Moeller] - - *) Don't let DSA_generate_key() enter an infinite loop if the random - number generation fails. - [Bodo Moeller] - - *) New 'rand' application for creating pseudo-random output. - [Bodo Moeller] - - *) Added configuration support for Linux/IA64 - [Rolf Haberrecker ] - - *) Assembler module support for Mingw32. - [Ulf Möller] - - *) Shared library support for HPUX (in shlib/). - [Lutz Jaenicke and Anonymous] - - *) Shared library support for Solaris gcc. - [Lutz Behnke ] - - Changes between 0.9.4 and 0.9.5 [28 Feb 2000] - - *) PKCS7_encrypt() was adding text MIME headers twice because they - were added manually and by SMIME_crlf_copy(). - [Steve Henson] - - *) In bntest.c don't call BN_rand with zero bits argument. - [Steve Henson, pointed out by Andrew W. Gray ] - - *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] - case was implemented. This caused BN_div_recp() to fail occasionally. - [Ulf Möller] - - *) Add an optional second argument to the set_label() in the perl - assembly language builder. If this argument exists and is set - to 1 it signals that the assembler should use a symbol whose - scope is the entire file, not just the current function. This - is needed with MASM which uses the format label:: for this scope. - [Steve Henson, pointed out by Peter Runestig ] - - *) Change the ASN1 types so they are typedefs by default. Before - almost all types were #define'd to ASN1_STRING which was causing - STACK_OF() problems: you couldn't declare STACK_OF(ASN1_UTF8STRING) - for example. - [Steve Henson] - - *) Change names of new functions to the new get1/get0 naming - convention: After 'get1', the caller owns a reference count - and has to call ..._free; 'get0' returns a pointer to some - data structure without incrementing reference counters. - (Some of the existing 'get' functions increment a reference - counter, some don't.) - Similarly, 'set1' and 'add1' functions increase reference - counters or duplicate objects. - [Steve Henson] - - *) Allow for the possibility of temp RSA key generation failure: - the code used to assume it always worked and crashed on failure. - [Steve Henson] - - *) Fix potential buffer overrun problem in BIO_printf(). - [Ulf Möller, using public domain code by Patrick Powell; problem - pointed out by David Sacerdote ] - - *) Support EGD . New functions - RAND_egd() and RAND_status(). In the command line application, - the EGD socket can be specified like a seed file using RANDFILE - or -rand. - [Ulf Möller] - - *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. - Some CAs (e.g. Verisign) distribute certificates in this form. - [Steve Henson] - - *) Remove the SSL_ALLOW_ADH compile option and set the default cipher - list to exclude them. This means that no special compilation option - is needed to use anonymous DH: it just needs to be included in the - cipher list. - [Steve Henson] - - *) Change the EVP_MD_CTX_type macro so its meaning consistent with - EVP_MD_type. The old functionality is available in a new macro called - EVP_MD_md(). Change code that uses it and update docs. - [Steve Henson] - - *) ..._ctrl functions now have corresponding ..._callback_ctrl functions - where the 'void *' argument is replaced by a function pointer argument. - Previously 'void *' was abused to point to functions, which works on - many platforms, but is not correct. As these functions are usually - called by macros defined in OpenSSL header files, most source code - should work without changes. - [Richard Levitte] - - *) (which is created by Configure) now contains - sections with information on -D... compiler switches used for - compiling the library so that applications can see them. To enable - one of these sections, a pre-processor symbol OPENSSL_..._DEFINES - must be defined. E.g., - #define OPENSSL_ALGORITHM_DEFINES - #include - defines all pertinent NO_ symbols, such as NO_IDEA, NO_RSA, etc. - [Richard Levitte, Ulf and Bodo Möller] - - *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS - record layer. - [Bodo Moeller] - - *) Change the 'other' type in certificate aux info to a STACK_OF - X509_ALGOR. Although not an AlgorithmIdentifier as such it has - the required ASN1 format: arbitrary types determined by an OID. - [Steve Henson] - - *) Add some PEM_write_X509_REQ_NEW() functions and a command line - argument to 'req'. This is not because the function is newer or - better than others it just uses the work 'NEW' in the certificate - request header lines. Some software needs this. - [Steve Henson] - - *) Reorganise password command line arguments: now passwords can be - obtained from various sources. Delete the PEM_cb function and make - it the default behaviour: i.e. if the callback is NULL and the - usrdata argument is not NULL interpret it as a null terminated pass - phrase. If usrdata and the callback are NULL then the pass phrase - is prompted for as usual. - [Steve Henson] - - *) Add support for the Compaq Atalla crypto accelerator. If it is installed, - the support is automatically enabled. The resulting binaries will - autodetect the card and use it if present. - [Ben Laurie and Compaq Inc.] - - *) Work around for Netscape hang bug. This sends certificate request - and server done in one record. Since this is perfectly legal in the - SSL/TLS protocol it isn't a "bug" option and is on by default. See - the bugs/SSLv3 entry for more info. - [Steve Henson] - - *) HP-UX tune-up: new unified configs, HP C compiler bug workaround. - [Andy Polyakov] - - *) Add -rand argument to smime and pkcs12 applications and read/write - of seed file. - [Steve Henson] - - *) New 'passwd' tool for crypt(3) and apr1 password hashes. - [Bodo Moeller] - - *) Add command line password options to the remaining applications. - [Steve Henson] - - *) Bug fix for BN_div_recp() for numerators with an even number of - bits. - [Ulf Möller] - - *) More tests in bntest.c, and changed test_bn output. - [Ulf Möller] - - *) ./config recognizes MacOS X now. - [Andy Polyakov] - - *) Bug fix for BN_div() when the first words of num and divsor are - equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). - [Ulf Möller] - - *) Add support for various broken PKCS#8 formats, and command line - options to produce them. - [Steve Henson] - - *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to - get temporary BIGNUMs from a BN_CTX. - [Ulf Möller] - - *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() - for p == 0. - [Ulf Möller] - - *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and - include a #define from the old name to the new. The original intent - was that statically linked binaries could for example just call - SSLeay_add_all_ciphers() to just add ciphers to the table and not - link with digests. This never worked becayse SSLeay_add_all_digests() - and SSLeay_add_all_ciphers() were in the same source file so calling - one would link with the other. They are now in separate source files. - [Steve Henson] - - *) Add a new -notext option to 'ca' and a -pubkey option to 'spkac'. - [Steve Henson] - - *) Use a less unusual form of the Miller-Rabin primality test (it used - a binary algorithm for exponentiation integrated into the Miller-Rabin - loop, our standard modexp algorithms are faster). - [Bodo Moeller] - - *) Support for the EBCDIC character set completed. - [Martin Kraemer ] - - *) Source code cleanups: use const where appropriate, eliminate casts, - use void * instead of char * in lhash. - [Ulf Möller] - - *) Bugfix: ssl3_send_server_key_exchange was not restartable - (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of - this the server could overwrite ephemeral keys that the client - has already seen). - [Bodo Moeller] - - *) Turn DSA_is_prime into a macro that calls BN_is_prime, - using 50 iterations of the Rabin-Miller test. - - DSA_generate_parameters now uses BN_is_prime_fasttest (with 50 - iterations of the Rabin-Miller test as required by the appendix - to FIPS PUB 186[-1]) instead of DSA_is_prime. - As BN_is_prime_fasttest includes trial division, DSA parameter - generation becomes much faster. - - This implies a change for the callback functions in DSA_is_prime - and DSA_generate_parameters: The callback function is called once - for each positive witness in the Rabin-Miller test, not just - occasionally in the inner loop; and the parameters to the - callback function now provide an iteration count for the outer - loop rather than for the current invocation of the inner loop. - DSA_generate_parameters additionally can call the callback - function with an 'iteration count' of -1, meaning that a - candidate has passed the trial division test (when q is generated - from an application-provided seed, trial division is skipped). - [Bodo Moeller] - - *) New function BN_is_prime_fasttest that optionally does trial - division before starting the Rabin-Miller test and has - an additional BN_CTX * argument (whereas BN_is_prime always - has to allocate at least one BN_CTX). - 'callback(1, -1, cb_arg)' is called when a number has passed the - trial division stage. - [Bodo Moeller] - - *) Fix for bug in CRL encoding. The validity dates weren't being handled - as ASN1_TIME. - [Steve Henson] - - *) New -pkcs12 option to CA.pl script to write out a PKCS#12 file. - [Steve Henson] - - *) New function BN_pseudo_rand(). - [Ulf Möller] - - *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) - bignum version of BN_from_montgomery() with the working code from - SSLeay 0.9.0 (the word based version is faster anyway), and clean up - the comments. - [Ulf Möller] - - *) Avoid a race condition in s2_clnt.c (function get_server_hello) that - made it impossible to use the same SSL_SESSION data structure in - SSL2 clients in multiple threads. - [Bodo Moeller] - - *) The return value of RAND_load_file() no longer counts bytes obtained - by stat(). RAND_load_file(..., -1) is new and uses the complete file - to seed the PRNG (previously an explicit byte count was required). - [Ulf Möller, Bodo Möller] - - *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes - used (char *) instead of (void *) and had casts all over the place. - [Steve Henson] - - *) Make BN_generate_prime() return NULL on error if ret!=NULL. - [Ulf Möller] - - *) Retain source code compatibility for BN_prime_checks macro: - BN_is_prime(..., BN_prime_checks, ...) now uses - BN_prime_checks_for_size to determine the appropriate number of - Rabin-Miller iterations. - [Ulf Möller] - - *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to - DH_CHECK_P_NOT_SAFE_PRIME. - (Check if this is true? OpenPGP calls them "strong".) - [Ulf Möller] - - *) Merge the functionality of "dh" and "gendh" programs into a new program - "dhparam". The old programs are retained for now but will handle DH keys - (instead of parameters) in future. - [Steve Henson] - - *) Make the ciphers, s_server and s_client programs check the return values - when a new cipher list is set. - [Steve Henson] - - *) Enhance the SSL/TLS cipher mechanism to correctly handle the TLS 56bit - ciphers. Before when the 56bit ciphers were enabled the sorting was - wrong. - - The syntax for the cipher sorting has been extended to support sorting by - cipher-strength (using the strength_bits hard coded in the tables). - The new command is "@STRENGTH" (see also doc/apps/ciphers.pod). - - Fix a bug in the cipher-command parser: when supplying a cipher command - string with an "undefined" symbol (neither command nor alphanumeric - [A-Za-z0-9], ssl_set_cipher_list used to hang in an endless loop. Now - an error is flagged. - - Due to the strength-sorting extension, the code of the - ssl_create_cipher_list() function was completely rearranged. I hope that - the readability was also increased :-) - [Lutz Jaenicke ] - - *) Minor change to 'x509' utility. The -CAcreateserial option now uses 1 - for the first serial number and places 2 in the serial number file. This - avoids problems when the root CA is created with serial number zero and - the first user certificate has the same issuer name and serial number - as the root CA. - [Steve Henson] - - *) Fixes to X509_ATTRIBUTE utilities, change the 'req' program so it uses - the new code. Add documentation for this stuff. - [Steve Henson] - - *) Changes to X509_ATTRIBUTE utilities. These have been renamed from - X509_*() to X509at_*() on the grounds that they don't handle X509 - structures and behave in an analagous way to the X509v3 functions: - they shouldn't be called directly but wrapper functions should be used - instead. - - So we also now have some wrapper functions that call the X509at functions - when passed certificate requests. (TO DO: similar things can be done with - PKCS#7 signed and unsigned attributes, PKCS#12 attributes and a few other - things. Some of these need some d2i or i2d and print functionality - because they handle more complex structures.) - [Steve Henson] - - *) Add missing #ifndefs that caused missing symbols when building libssl - as a shared library without RSA. Use #ifndef NO_SSL2 instead of - NO_RSA in ssl/s2*.c. - [Kris Kennaway , modified by Ulf Möller] - - *) Precautions against using the PRNG uninitialized: RAND_bytes() now - has a return value which indicates the quality of the random data - (1 = ok, 0 = not seeded). Also an error is recorded on the thread's - error queue. New function RAND_pseudo_bytes() generates output that is - guaranteed to be unique but not unpredictable. RAND_add is like - RAND_seed, but takes an extra argument for an entropy estimate - (RAND_seed always assumes full entropy). - [Ulf Möller] - - *) Do more iterations of Rabin-Miller probable prime test (specifically, - 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes - instead of only 2 for all lengths; see BN_prime_checks_for_size definition - in crypto/bn/bn_prime.c for the complete table). This guarantees a - false-positive rate of at most 2^-80 for random input. - [Bodo Moeller] - - *) Rewrite ssl3_read_n (ssl/s3_pkt.c) avoiding a couple of bugs. - [Bodo Moeller] - - *) New function X509_CTX_rget_chain() (renamed to X509_CTX_get1_chain - in the 0.9.5 release), this returns the chain - from an X509_CTX structure with a dup of the stack and all - the X509 reference counts upped: so the stack will exist - after X509_CTX_cleanup() has been called. Modify pkcs12.c - to use this. - - Also make SSL_SESSION_print() print out the verify return - code. - [Steve Henson] - - *) Add manpage for the pkcs12 command. Also change the default - behaviour so MAC iteration counts are used unless the new - -nomaciter option is used. This improves file security and - only older versions of MSIE (4.0 for example) need it. - [Steve Henson] - - *) Honor the no-xxx Configure options when creating .DEF files. - [Ulf Möller] - - *) Add PKCS#10 attributes to field table: challengePassword, - unstructuredName and unstructuredAddress. These are taken from - draft PKCS#9 v2.0 but are compatible with v1.2 provided no - international characters are used. - - More changes to X509_ATTRIBUTE code: allow the setting of types - based on strings. Remove the 'loc' parameter when adding - attributes because these will be a SET OF encoding which is sorted - in ASN1 order. - [Steve Henson] - - *) Initial changes to the 'req' utility to allow request generation - automation. This will allow an application to just generate a template - file containing all the field values and have req construct the - request. - - Initial support for X509_ATTRIBUTE handling. Stacks of these are - used all over the place including certificate requests and PKCS#7 - structures. They are currently handled manually where necessary with - some primitive wrappers for PKCS#7. The new functions behave in a - manner analogous to the X509 extension functions: they allow - attributes to be looked up by NID and added. - - Later something similar to the X509V3 code would be desirable to - automatically handle the encoding, decoding and printing of the - more complex types. The string types like challengePassword can - be handled by the string table functions. - - Also modified the multi byte string table handling. Now there is - a 'global mask' which masks out certain types. The table itself - can use the flag STABLE_NO_MASK to ignore the mask setting: this - is useful when for example there is only one permissible type - (as in countryName) and using the mask might result in no valid - types at all. - [Steve Henson] - - *) Clean up 'Finished' handling, and add functions SSL_get_finished and - SSL_get_peer_finished to allow applications to obtain the latest - Finished messages sent to the peer or expected from the peer, - respectively. (SSL_get_peer_finished is usually the Finished message - actually received from the peer, otherwise the protocol will be aborted.) - - As the Finished message are message digests of the complete handshake - (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - be used for external authentication procedures when the authentication - provided by SSL/TLS is not desired or is not enough. - [Bodo Moeller] - - *) Enhanced support for Alpha Linux is added. Now ./config checks if - the host supports BWX extension and if Compaq C is present on the - $PATH. Just exploiting of the BWX extension results in 20-30% - performance kick for some algorithms, e.g. DES and RC4 to mention - a couple. Compaq C in turn generates ~20% faster code for MD5 and - SHA1. - [Andy Polyakov] - - *) Add support for MS "fast SGC". This is arguably a violation of the - SSL3/TLS protocol. Netscape SGC does two handshakes: the first with - weak crypto and after checking the certificate is SGC a second one - with strong crypto. MS SGC stops the first handshake after receiving - the server certificate message and sends a second client hello. Since - a server will typically do all the time consuming operations before - expecting any further messages from the client (server key exchange - is the most expensive) there is little difference between the two. - - To get OpenSSL to support MS SGC we have to permit a second client - hello message after we have sent server done. In addition we have to - reset the MAC if we do get this second client hello. - [Steve Henson] - - *) Add a function 'd2i_AutoPrivateKey()' this will automatically decide - if a DER encoded private key is RSA or DSA traditional format. Changed - d2i_PrivateKey_bio() to use it. This is only needed for the "traditional" - format DER encoded private key. Newer code should use PKCS#8 format which - has the key type encoded in the ASN1 structure. Added DER private key - support to pkcs8 application. - [Steve Henson] - - *) SSL 3/TLS 1 servers now don't request certificates when an anonymous - ciphersuites has been selected (as required by the SSL 3/TLS 1 - specifications). Exception: When SSL_VERIFY_FAIL_IF_NO_PEER_CERT - is set, we interpret this as a request to violate the specification - (the worst that can happen is a handshake failure, and 'correct' - behaviour would result in a handshake failure anyway). - [Bodo Moeller] - - *) In SSL_CTX_add_session, take into account that there might be multiple - SSL_SESSION structures with the same session ID (e.g. when two threads - concurrently obtain them from an external cache). - The internal cache can handle only one SSL_SESSION with a given ID, - so if there's a conflict, we now throw out the old one to achieve - consistency. - [Bodo Moeller] - - *) Add OIDs for idea and blowfish in CBC mode. This will allow both - to be used in PKCS#5 v2.0 and S/MIME. Also add checking to - some routines that use cipher OIDs: some ciphers do not have OIDs - defined and so they cannot be used for S/MIME and PKCS#5 v2.0 for - example. - [Steve Henson] - - *) Simplify the trust setting structure and code. Now we just have - two sequences of OIDs for trusted and rejected settings. These will - typically have values the same as the extended key usage extension - and any application specific purposes. - - The trust checking code now has a default behaviour: it will just - check for an object with the same NID as the passed id. Functions can - be provided to override either the default behaviour or the behaviour - for a given id. SSL client, server and email already have functions - in place for compatibility: they check the NID and also return "trusted" - if the certificate is self signed. - [Steve Henson] - - *) Add d2i,i2d bio/fp functions for PrivateKey: these convert the - traditional format into an EVP_PKEY structure. - [Steve Henson] - - *) Add a password callback function PEM_cb() which either prompts for - a password if usr_data is NULL or otherwise assumes it is a null - terminated password. Allow passwords to be passed on command line - environment or config files in a few more utilities. - [Steve Henson] - - *) Add a bunch of DER and PEM functions to handle PKCS#8 format private - keys. Add some short names for PKCS#8 PBE algorithms and allow them - to be specified on the command line for the pkcs8 and pkcs12 utilities. - Update documentation. - [Steve Henson] - - *) Support for ASN1 "NULL" type. This could be handled before by using - ASN1_TYPE but there wasn't any function that would try to read a NULL - and produce an error if it couldn't. For compatibility we also have - ASN1_NULL_new() and ASN1_NULL_free() functions but these are faked and - don't allocate anything because they don't need to. - [Steve Henson] - - *) Initial support for MacOS is now provided. Examine INSTALL.MacOS - for details. - [Andy Polyakov, Roy Woods ] - - *) Rebuild of the memory allocation routines used by OpenSSL code and - possibly others as well. The purpose is to make an interface that - provide hooks so anyone can build a separate set of allocation and - deallocation routines to be used by OpenSSL, for example memory - pool implementations, or something else, which was previously hard - since Malloc(), Realloc() and Free() were defined as macros having - the values malloc, realloc and free, respectively (except for Win32 - compilations). The same is provided for memory debugging code. - OpenSSL already comes with functionality to find memory leaks, but - this gives people a chance to debug other memory problems. - - With these changes, a new set of functions and macros have appeared: - - CRYPTO_set_mem_debug_functions() [F] - CRYPTO_get_mem_debug_functions() [F] - CRYPTO_dbg_set_options() [F] - CRYPTO_dbg_get_options() [F] - CRYPTO_malloc_debug_init() [M] - - The memory debug functions are NULL by default, unless the library - is compiled with CRYPTO_MDEBUG or friends is defined. If someone - wants to debug memory anyway, CRYPTO_malloc_debug_init() (which - gives the standard debugging functions that come with OpenSSL) or - CRYPTO_set_mem_debug_functions() (tells OpenSSL to use functions - provided by the library user) must be used. When the standard - debugging functions are used, CRYPTO_dbg_set_options can be used to - request additional information: - CRYPTO_dbg_set_options(V_CYRPTO_MDEBUG_xxx) corresponds to setting - the CRYPTO_MDEBUG_xxx macro when compiling the library. - - Also, things like CRYPTO_set_mem_functions will always give the - expected result (the new set of functions is used for allocation - and deallocation) at all times, regardless of platform and compiler - options. - - To finish it up, some functions that were never use in any other - way than through macros have a new API and new semantic: - - CRYPTO_dbg_malloc() - CRYPTO_dbg_realloc() - CRYPTO_dbg_free() - - All macros of value have retained their old syntax. - [Richard Levitte and Bodo Moeller] - - *) Some S/MIME fixes. The OID for SMIMECapabilities was wrong, the - ordering of SMIMECapabilities wasn't in "strength order" and there - was a missing NULL in the AlgorithmIdentifier for the SHA1 signature - algorithm. - [Steve Henson] - - *) Some ASN1 types with illegal zero length encoding (INTEGER, - ENUMERATED and OBJECT IDENTIFIER) choked the ASN1 routines. - [Frans Heymans , modified by Steve Henson] - - *) Merge in my S/MIME library for OpenSSL. This provides a simple - S/MIME API on top of the PKCS#7 code, a MIME parser (with enough - functionality to handle multipart/signed properly) and a utility - called 'smime' to call all this stuff. This is based on code I - originally wrote for Celo who have kindly allowed it to be - included in OpenSSL. - [Steve Henson] - - *) Add variants des_set_key_checked and des_set_key_unchecked of - des_set_key (aka des_key_sched). Global variable des_check_key - decides which of these is called by des_set_key; this way - des_check_key behaves as it always did, but applications and - the library itself, which was buggy for des_check_key == 1, - have a cleaner way to pick the version they need. - [Bodo Moeller] - - *) New function PKCS12_newpass() which changes the password of a - PKCS12 structure. - [Steve Henson] - - *) Modify X509_TRUST and X509_PURPOSE so it also uses a static and - dynamic mix. In both cases the ids can be used as an index into the - table. Also modified the X509_TRUST_add() and X509_PURPOSE_add() - functions so they accept a list of the field values and the - application doesn't need to directly manipulate the X509_TRUST - structure. - [Steve Henson] - - *) Modify the ASN1_STRING_TABLE stuff so it also uses bsearch and doesn't - need initialising. - [Steve Henson] - - *) Modify the way the V3 extension code looks up extensions. This now - works in a similar way to the object code: we have some "standard" - extensions in a static table which is searched with OBJ_bsearch() - and the application can add dynamic ones if needed. The file - crypto/x509v3/ext_dat.h now has the info: this file needs to be - updated whenever a new extension is added to the core code and kept - in ext_nid order. There is a simple program 'tabtest.c' which checks - this. New extensions are not added too often so this file can readily - be maintained manually. - - There are two big advantages in doing things this way. The extensions - can be looked up immediately and no longer need to be "added" using - X509V3_add_standard_extensions(): this function now does nothing. - [Side note: I get *lots* of email saying the extension code doesn't - work because people forget to call this function] - Also no dynamic allocation is done unless new extensions are added: - so if we don't add custom extensions there is no need to call - X509V3_EXT_cleanup(). - [Steve Henson] - - *) Modify enc utility's salting as follows: make salting the default. Add a - magic header, so unsalted files fail gracefully instead of just decrypting - to garbage. This is because not salting is a big security hole, so people - should be discouraged from doing it. - [Ben Laurie] - - *) Fixes and enhancements to the 'x509' utility. It allowed a message - digest to be passed on the command line but it only used this - parameter when signing a certificate. Modified so all relevant - operations are affected by the digest parameter including the - -fingerprint and -x509toreq options. Also -x509toreq choked if a - DSA key was used because it didn't fix the digest. - [Steve Henson] - - *) Initial certificate chain verify code. Currently tests the untrusted - certificates for consistency with the verify purpose (which is set - when the X509_STORE_CTX structure is set up) and checks the pathlength. - - There is a NO_CHAIN_VERIFY compilation option to keep the old behaviour: - this is because it will reject chains with invalid extensions whereas - every previous version of OpenSSL and SSLeay made no checks at all. - - Trust code: checks the root CA for the relevant trust settings. Trust - settings have an initial value consistent with the verify purpose: e.g. - if the verify purpose is for SSL client use it expects the CA to be - trusted for SSL client use. However the default value can be changed to - permit custom trust settings: one example of this would be to only trust - certificates from a specific "secure" set of CAs. - - Also added X509_STORE_CTX_new() and X509_STORE_CTX_free() functions - which should be used for version portability: especially since the - verify structure is likely to change more often now. - - SSL integration. Add purpose and trust to SSL_CTX and SSL and functions - to set them. If not set then assume SSL clients will verify SSL servers - and vice versa. - - Two new options to the verify program: -untrusted allows a set of - untrusted certificates to be passed in and -purpose which sets the - intended purpose of the certificate. If a purpose is set then the - new chain verify code is used to check extension consistency. - [Steve Henson] - - *) Support for the authority information access extension. - [Steve Henson] - - *) Modify RSA and DSA PEM read routines to transparently handle - PKCS#8 format private keys. New *_PUBKEY_* functions that handle - public keys in a format compatible with certificate - SubjectPublicKeyInfo structures. Unfortunately there were already - functions called *_PublicKey_* which used various odd formats so - these are retained for compatibility: however the DSA variants were - never in a public release so they have been deleted. Changed dsa/rsa - utilities to handle the new format: note no releases ever handled public - keys so we should be OK. - - The primary motivation for this change is to avoid the same fiasco - that dogs private keys: there are several incompatible private key - formats some of which are standard and some OpenSSL specific and - require various evil hacks to allow partial transparent handling and - even then it doesn't work with DER formats. Given the option anything - other than PKCS#8 should be dumped: but the other formats have to - stay in the name of compatibility. - - With public keys and the benefit of hindsight one standard format - is used which works with EVP_PKEY, RSA or DSA structures: though - it clearly returns an error if you try to read the wrong kind of key. - - Added a -pubkey option to the 'x509' utility to output the public key. - Also rename the EVP_PKEY_get_*() to EVP_PKEY_rget_*() - (renamed to EVP_PKEY_get1_*() in the OpenSSL 0.9.5 release) and add - EVP_PKEY_rset_*() functions (renamed to EVP_PKEY_set1_*()) - that do the same as the EVP_PKEY_assign_*() except they up the - reference count of the added key (they don't "swallow" the - supplied key). - [Steve Henson] - - *) Fixes to crypto/x509/by_file.c the code to read in certificates and - CRLs would fail if the file contained no certificates or no CRLs: - added a new function to read in both types and return the number - read: this means that if none are read it will be an error. The - DER versions of the certificate and CRL reader would always fail - because it isn't possible to mix certificates and CRLs in DER format - without choking one or the other routine. Changed this to just read - a certificate: this is the best we can do. Also modified the code - in apps/verify.c to take notice of return codes: it was previously - attempting to read in certificates from NULL pointers and ignoring - any errors: this is one reason why the cert and CRL reader seemed - to work. It doesn't check return codes from the default certificate - routines: these may well fail if the certificates aren't installed. - [Steve Henson] - - *) Code to support otherName option in GeneralName. - [Steve Henson] - - *) First update to verify code. Change the verify utility - so it warns if it is passed a self signed certificate: - for consistency with the normal behaviour. X509_verify - has been modified to it will now verify a self signed - certificate if *exactly* the same certificate appears - in the store: it was previously impossible to trust a - single self signed certificate. This means that: - openssl verify ss.pem - now gives a warning about a self signed certificate but - openssl verify -CAfile ss.pem ss.pem - is OK. - [Steve Henson] - - *) For servers, store verify_result in SSL_SESSION data structure - (and add it to external session representation). - This is needed when client certificate verifications fails, - but an application-provided verification callback (set by - SSL_CTX_set_cert_verify_callback) allows accepting the session - anyway (i.e. leaves x509_store_ctx->error != X509_V_OK - but returns 1): When the session is reused, we have to set - ssl->verify_result to the appropriate error code to avoid - security holes. - [Bodo Moeller, problem pointed out by Lutz Jaenicke] - - *) Fix a bug in the new PKCS#7 code: it didn't consider the - case in PKCS7_dataInit() where the signed PKCS7 structure - didn't contain any existing data because it was being created. - [Po-Cheng Chen , slightly modified by Steve Henson] - - *) Add a salt to the key derivation routines in enc.c. This - forms the first 8 bytes of the encrypted file. Also add a - -S option to allow a salt to be input on the command line. - [Steve Henson] - - *) New function X509_cmp(). Oddly enough there wasn't a function - to compare two certificates. We do this by working out the SHA1 - hash and comparing that. X509_cmp() will be needed by the trust - code. - [Steve Henson] - - *) SSL_get1_session() is like SSL_get_session(), but increments - the reference count in the SSL_SESSION returned. - [Geoff Thorpe ] - - *) Fix for 'req': it was adding a null to request attributes. - Also change the X509_LOOKUP and X509_INFO code to handle - certificate auxiliary information. - [Steve Henson] - - *) Add support for 40 and 64 bit RC2 and RC4 algorithms: document - the 'enc' command. - [Steve Henson] - - *) Add the possibility to add extra information to the memory leak - detecting output, to form tracebacks, showing from where each - allocation was originated: CRYPTO_push_info("constant string") adds - the string plus current file name and line number to a per-thread - stack, CRYPTO_pop_info() does the obvious, CRYPTO_remove_all_info() - is like calling CYRPTO_pop_info() until the stack is empty. - Also updated memory leak detection code to be multi-thread-safe. - [Richard Levitte] - - *) Add options -text and -noout to pkcs7 utility and delete the - encryption options which never did anything. Update docs. - [Steve Henson] - - *) Add options to some of the utilities to allow the pass phrase - to be included on either the command line (not recommended on - OSes like Unix) or read from the environment. Update the - manpages and fix a few bugs. - [Steve Henson] - - *) Add a few manpages for some of the openssl commands. - [Steve Henson] - - *) Fix the -revoke option in ca. It was freeing up memory twice, - leaking and not finding already revoked certificates. - [Steve Henson] - - *) Extensive changes to support certificate auxiliary information. - This involves the use of X509_CERT_AUX structure and X509_AUX - functions. An X509_AUX function such as PEM_read_X509_AUX() - can still read in a certificate file in the usual way but it - will also read in any additional "auxiliary information". By - doing things this way a fair degree of compatibility can be - retained: existing certificates can have this information added - using the new 'x509' options. - - Current auxiliary information includes an "alias" and some trust - settings. The trust settings will ultimately be used in enhanced - certificate chain verification routines: currently a certificate - can only be trusted if it is self signed and then it is trusted - for all purposes. - [Steve Henson] - - *) Fix assembler for Alpha (tested only on DEC OSF not Linux or *BSD). - The problem was that one of the replacement routines had not been working - since SSLeay releases. For now the offending routine has been replaced - with non-optimised assembler. Even so, this now gives around 95% - performance improvement for 1024 bit RSA signs. - [Mark Cox] - - *) Hack to fix PKCS#7 decryption when used with some unorthodox RC2 - handling. Most clients have the effective key size in bits equal to - the key length in bits: so a 40 bit RC2 key uses a 40 bit (5 byte) key. - A few however don't do this and instead use the size of the decrypted key - to determine the RC2 key length and the AlgorithmIdentifier to determine - the effective key length. In this case the effective key length can still - be 40 bits but the key length can be 168 bits for example. This is fixed - by manually forcing an RC2 key into the EVP_PKEY structure because the - EVP code can't currently handle unusual RC2 key sizes: it always assumes - the key length and effective key length are equal. - [Steve Henson] - - *) Add a bunch of functions that should simplify the creation of - X509_NAME structures. Now you should be able to do: - X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC, "Steve", -1, -1, 0); - and have it automatically work out the correct field type and fill in - the structures. The more adventurous can try: - X509_NAME_add_entry_by_txt(nm, field, MBSTRING_UTF8, str, -1, -1, 0); - and it will (hopefully) work out the correct multibyte encoding. - [Steve Henson] - - *) Change the 'req' utility to use the new field handling and multibyte - copy routines. Before the DN field creation was handled in an ad hoc - way in req, ca, and x509 which was rather broken and didn't support - BMPStrings or UTF8Strings. Since some software doesn't implement - BMPStrings or UTF8Strings yet, they can be enabled using the config file - using the dirstring_type option. See the new comment in the default - openssl.cnf for more info. - [Steve Henson] - - *) Make crypto/rand/md_rand.c more robust: - - Assure unique random numbers after fork(). - - Make sure that concurrent threads access the global counter and - md serializably so that we never lose entropy in them - or use exactly the same state in multiple threads. - Access to the large state is not always serializable because - the additional locking could be a performance killer, and - md should be large enough anyway. - [Bodo Moeller] - - *) New file apps/app_rand.c with commonly needed functionality - for handling the random seed file. - - Use the random seed file in some applications that previously did not: - ca, - dsaparam -genkey (which also ignored its '-rand' option), - s_client, - s_server, - x509 (when signing). - Except on systems with /dev/urandom, it is crucial to have a random - seed file at least for key creation, DSA signing, and for DH exchanges; - for RSA signatures we could do without one. - - gendh and gendsa (unlike genrsa) used to read only the first byte - of each file listed in the '-rand' option. The function as previously - found in genrsa is now in app_rand.c and is used by all programs - that support '-rand'. - [Bodo Moeller] - - *) In RAND_write_file, use mode 0600 for creating files; - don't just chmod when it may be too late. - [Bodo Moeller] - - *) Report an error from X509_STORE_load_locations - when X509_LOOKUP_load_file or X509_LOOKUP_add_dir failed. - [Bill Perry] - - *) New function ASN1_mbstring_copy() this copies a string in either - ASCII, Unicode, Universal (4 bytes per character) or UTF8 format - into an ASN1_STRING type. A mask of permissible types is passed - and it chooses the "minimal" type to use or an error if not type - is suitable. - [Steve Henson] - - *) Add function equivalents to the various macros in asn1.h. The old - macros are retained with an M_ prefix. Code inside the library can - use the M_ macros. External code (including the openssl utility) - should *NOT* in order to be "shared library friendly". - [Steve Henson] - - *) Add various functions that can check a certificate's extensions - to see if it usable for various purposes such as SSL client, - server or S/MIME and CAs of these types. This is currently - VERY EXPERIMENTAL but will ultimately be used for certificate chain - verification. Also added a -purpose flag to x509 utility to - print out all the purposes. - [Steve Henson] - - *) Add a CRYPTO_EX_DATA to X509 certificate structure and associated - functions. - [Steve Henson] - - *) New X509V3_{X509,CRL,REVOKED}_get_d2i() functions. These will search - for, obtain and decode and extension and obtain its critical flag. - This allows all the necessary extension code to be handled in a - single function call. - [Steve Henson] - - *) RC4 tune-up featuring 30-40% performance improvement on most RISC - platforms. See crypto/rc4/rc4_enc.c for further details. - [Andy Polyakov] - - *) New -noout option to asn1parse. This causes no output to be produced - its main use is when combined with -strparse and -out to extract data - from a file (which may not be in ASN.1 format). - [Steve Henson] - - *) Fix for pkcs12 program. It was hashing an invalid certificate pointer - when producing the local key id. - [Richard Levitte ] - - *) New option -dhparam in s_server. This allows a DH parameter file to be - stated explicitly. If it is not stated then it tries the first server - certificate file. The previous behaviour hard coded the filename - "server.pem". - [Steve Henson] - - *) Add -pubin and -pubout options to the rsa and dsa commands. These allow - a public key to be input or output. For example: - openssl rsa -in key.pem -pubout -out pubkey.pem - Also added necessary DSA public key functions to handle this. - [Steve Henson] - - *) Fix so PKCS7_dataVerify() doesn't crash if no certificates are contained - in the message. This was handled by allowing - X509_find_by_issuer_and_serial() to tolerate a NULL passed to it. - [Steve Henson, reported by Sampo Kellomaki ] - - *) Fix for bug in d2i_ASN1_bytes(): other ASN1 functions add an extra null - to the end of the strings whereas this didn't. This would cause problems - if strings read with d2i_ASN1_bytes() were later modified. - [Steve Henson, reported by Arne Ansper ] - - *) Fix for base64 decode bug. When a base64 bio reads only one line of - data and it contains EOF it will end up returning an error. This is - caused by input 46 bytes long. The cause is due to the way base64 - BIOs find the start of base64 encoded data. They do this by trying a - trial decode on each line until they find one that works. When they - do a flag is set and it starts again knowing it can pass all the - data directly through the decoder. Unfortunately it doesn't reset - the context it uses. This means that if EOF is reached an attempt - is made to pass two EOFs through the context and this causes the - resulting error. This can also cause other problems as well. As is - usual with these problems it takes *ages* to find and the fix is - trivial: move one line. - [Steve Henson, reported by ian@uns.ns.ac.yu (Ivan Nejgebauer) ] - - *) Ugly workaround to get s_client and s_server working under Windows. The - old code wouldn't work because it needed to select() on sockets and the - tty (for keypresses and to see if data could be written). Win32 only - supports select() on sockets so we select() with a 1s timeout on the - sockets and then see if any characters are waiting to be read, if none - are present then we retry, we also assume we can always write data to - the tty. This isn't nice because the code then blocks until we've - received a complete line of data and it is effectively polling the - keyboard at 1s intervals: however it's quite a bit better than not - working at all :-) A dedicated Windows application might handle this - with an event loop for example. - [Steve Henson] - - *) Enhance RSA_METHOD structure. Now there are two extra methods, rsa_sign - and rsa_verify. When the RSA_FLAGS_SIGN_VER option is set these functions - will be called when RSA_sign() and RSA_verify() are used. This is useful - if rsa_pub_dec() and rsa_priv_enc() equivalents are not available. - For this to work properly RSA_public_decrypt() and RSA_private_encrypt() - should *not* be used: RSA_sign() and RSA_verify() must be used instead. - This necessitated the support of an extra signature type NID_md5_sha1 - for SSL signatures and modifications to the SSL library to use it instead - of calling RSA_public_decrypt() and RSA_private_encrypt(). - [Steve Henson] - - *) Add new -verify -CAfile and -CApath options to the crl program, these - will lookup a CRL issuers certificate and verify the signature in a - similar way to the verify program. Tidy up the crl program so it - no longer accesses structures directly. Make the ASN1 CRL parsing a bit - less strict. It will now permit CRL extensions even if it is not - a V2 CRL: this will allow it to tolerate some broken CRLs. - [Steve Henson] - - *) Initialize all non-automatic variables each time one of the openssl - sub-programs is started (this is necessary as they may be started - multiple times from the "OpenSSL>" prompt). - [Lennart Bang, Bodo Moeller] - - *) Preliminary compilation option RSA_NULL which disables RSA crypto without - removing all other RSA functionality (this is what NO_RSA does). This - is so (for example) those in the US can disable those operations covered - by the RSA patent while allowing storage and parsing of RSA keys and RSA - key generation. - [Steve Henson] - - *) Non-copying interface to BIO pairs. - (still largely untested) - [Bodo Moeller] - - *) New function ANS1_tag2str() to convert an ASN1 tag to a descriptive - ASCII string. This was handled independently in various places before. - [Steve Henson] - - *) New functions UTF8_getc() and UTF8_putc() that parse and generate - UTF8 strings a character at a time. - [Steve Henson] - - *) Use client_version from client hello to select the protocol - (s23_srvr.c) and for RSA client key exchange verification - (s3_srvr.c), as required by the SSL 3.0/TLS 1.0 specifications. - [Bodo Moeller] - - *) Add various utility functions to handle SPKACs, these were previously - handled by poking round in the structure internals. Added new function - NETSCAPE_SPKI_print() to print out SPKAC and a new utility 'spkac' to - print, verify and generate SPKACs. Based on an original idea from - Massimiliano Pala but extensively modified. - [Steve Henson] - - *) RIPEMD160 is operational on all platforms and is back in 'make test'. - [Andy Polyakov] - - *) Allow the config file extension section to be overwritten on the - command line. Based on an original idea from Massimiliano Pala - . The new option is called -extensions - and can be applied to ca, req and x509. Also -reqexts to override - the request extensions in req and -crlexts to override the crl extensions - in ca. - [Steve Henson] - - *) Add new feature to the SPKAC handling in ca. Now you can include - the same field multiple times by preceding it by "XXXX." for example: - 1.OU="Unit name 1" - 2.OU="Unit name 2" - this is the same syntax as used in the req config file. - [Steve Henson] - - *) Allow certificate extensions to be added to certificate requests. These - are specified in a 'req_extensions' option of the req section of the - config file. They can be printed out with the -text option to req but - are otherwise ignored at present. - [Steve Henson] - - *) Fix a horrible bug in enc_read() in crypto/evp/bio_enc.c: if the first - data read consists of only the final block it would not decrypted because - EVP_CipherUpdate() would correctly report zero bytes had been decrypted. - A misplaced 'break' also meant the decrypted final block might not be - copied until the next read. - [Steve Henson] - - *) Initial support for DH_METHOD. Again based on RSA_METHOD. Also added - a few extra parameters to the DH structure: these will be useful if - for example we want the value of 'q' or implement X9.42 DH. - [Steve Henson] - - *) Initial support for DSA_METHOD. This is based on the RSA_METHOD and - provides hooks that allow the default DSA functions or functions on a - "per key" basis to be replaced. This allows hardware acceleration and - hardware key storage to be handled without major modification to the - library. Also added low level modexp hooks and CRYPTO_EX structure and - associated functions. - [Steve Henson] - - *) Add a new flag to memory BIOs, BIO_FLAG_MEM_RDONLY. This marks the BIO - as "read only": it can't be written to and the buffer it points to will - not be freed. Reading from a read only BIO is much more efficient than - a normal memory BIO. This was added because there are several times when - an area of memory needs to be read from a BIO. The previous method was - to create a memory BIO and write the data to it, this results in two - copies of the data and an O(n^2) reading algorithm. There is a new - function BIO_new_mem_buf() which creates a read only memory BIO from - an area of memory. Also modified the PKCS#7 routines to use read only - memory BIOs. - [Steve Henson] - - *) Bugfix: ssl23_get_client_hello did not work properly when called in - state SSL23_ST_SR_CLNT_HELLO_B, i.e. when the first 7 bytes of - a SSLv2-compatible client hello for SSLv3 or TLSv1 could be read, - but a retry condition occured while trying to read the rest. - [Bodo Moeller] - - *) The PKCS7_ENC_CONTENT_new() function was setting the content type as - NID_pkcs7_encrypted by default: this was wrong since this should almost - always be NID_pkcs7_data. Also modified the PKCS7_set_type() to handle - the encrypted data type: this is a more sensible place to put it and it - allows the PKCS#12 code to be tidied up that duplicated this - functionality. - [Steve Henson] - - *) Changed obj_dat.pl script so it takes its input and output files on - the command line. This should avoid shell escape redirection problems - under Win32. - [Steve Henson] - - *) Initial support for certificate extension requests, these are included - in things like Xenroll certificate requests. Included functions to allow - extensions to be obtained and added. - [Steve Henson] - - *) -crlf option to s_client and s_server for sending newlines as - CRLF (as required by many protocols). - [Bodo Moeller] - - Changes between 0.9.3a and 0.9.4 [09 Aug 1999] - - *) Install libRSAglue.a when OpenSSL is built with RSAref. - [Ralf S. Engelschall] - - *) A few more ``#ifndef NO_FP_API / #endif'' pairs for consistency. - [Andrija Antonijevic ] - - *) Fix -startdate and -enddate (which was missing) arguments to 'ca' - program. - [Steve Henson] - - *) New function DSA_dup_DH, which duplicates DSA parameters/keys as - DH parameters/keys (q is lost during that conversion, but the resulting - DH parameters contain its length). - - For 1024-bit p, DSA_generate_parameters followed by DSA_dup_DH is - much faster than DH_generate_parameters (which creates parameters - where p = 2*q + 1), and also the smaller q makes DH computations - much more efficient (160-bit exponentiation instead of 1024-bit - exponentiation); so this provides a convenient way to support DHE - ciphersuites in SSL/TLS servers (see ssl/ssltest.c). It is of - utter importance to use - SSL_CTX_set_options(s_ctx, SSL_OP_SINGLE_DH_USE); - or - SSL_set_options(s_ctx, SSL_OP_SINGLE_DH_USE); - when such DH parameters are used, because otherwise small subgroup - attacks may become possible! - [Bodo Moeller] - - *) Avoid memory leak in i2d_DHparams. - [Bodo Moeller] - - *) Allow the -k option to be used more than once in the enc program: - this allows the same encrypted message to be read by multiple recipients. - [Steve Henson] - - *) New function OBJ_obj2txt(buf, buf_len, a, no_name), this converts - an ASN1_OBJECT to a text string. If the "no_name" parameter is set then - it will always use the numerical form of the OID, even if it has a short - or long name. - [Steve Henson] - - *) Added an extra RSA flag: RSA_FLAG_EXT_PKEY. Previously the rsa_mod_exp - method only got called if p,q,dmp1,dmq1,iqmp components were present, - otherwise bn_mod_exp was called. In the case of hardware keys for example - no private key components need be present and it might store extra data - in the RSA structure, which cannot be accessed from bn_mod_exp. - By setting RSA_FLAG_EXT_PKEY rsa_mod_exp will always be called for - private key operations. - [Steve Henson] - - *) Added support for SPARC Linux. - [Andy Polyakov] - - *) pem_password_cb function type incompatibly changed from - typedef int pem_password_cb(char *buf, int size, int rwflag); - to - ....(char *buf, int size, int rwflag, void *userdata); - so that applications can pass data to their callbacks: - The PEM[_ASN1]_{read,write}... functions and macros now take an - additional void * argument, which is just handed through whenever - the password callback is called. - [Damien Miller ; tiny changes by Bodo Moeller] - - New function SSL_CTX_set_default_passwd_cb_userdata. - - Compatibility note: As many C implementations push function arguments - onto the stack in reverse order, the new library version is likely to - interoperate with programs that have been compiled with the old - pem_password_cb definition (PEM_whatever takes some data that - happens to be on the stack as its last argument, and the callback - just ignores this garbage); but there is no guarantee whatsoever that - this will work. - - *) The -DPLATFORM="\"$(PLATFORM)\"" definition and the similar -DCFLAGS=... - (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused - problems not only on Windows, but also on some Unix platforms. - To avoid problematic command lines, these definitions are now in an - auto-generated file crypto/buildinf.h (created by crypto/Makefile.ssl - for standard "make" builds, by util/mk1mf.pl for "mk1mf" builds). - [Bodo Moeller] - - *) MIPS III/IV assembler module is reimplemented. - [Andy Polyakov] - - *) More DES library cleanups: remove references to srand/rand and - delete an unused file. - [Ulf Möller] - - *) Add support for the the free Netwide assembler (NASM) under Win32, - since not many people have MASM (ml) and it can be hard to obtain. - This is currently experimental but it seems to work OK and pass all - the tests. Check out INSTALL.W32 for info. - [Steve Henson] - - *) Fix memory leaks in s3_clnt.c: All non-anonymous SSL3/TLS1 connections - without temporary keys kept an extra copy of the server key, - and connections with temporary keys did not free everything in case - of an error. - [Bodo Moeller] - - *) New function RSA_check_key and new openssl rsa option -check - for verifying the consistency of RSA keys. - [Ulf Moeller, Bodo Moeller] - - *) Various changes to make Win32 compile work: - 1. Casts to avoid "loss of data" warnings in p5_crpt2.c - 2. Change unsigned int to int in b_dump.c to avoid "signed/unsigned - comparison" warnings. - 3. Add sk__sort to DEF file generator and do make update. - [Steve Henson] - - *) Add a debugging option to PKCS#5 v2 key generation function: when - you #define DEBUG_PKCS5V2 passwords, salts, iteration counts and - derived keys are printed to stderr. - [Steve Henson] - - *) Copy the flags in ASN1_STRING_dup(). - [Roman E. Pavlov ] - - *) The x509 application mishandled signing requests containing DSA - keys when the signing key was also DSA and the parameters didn't match. - - It was supposed to omit the parameters when they matched the signing key: - the verifying software was then supposed to automatically use the CA's - parameters if they were absent from the end user certificate. - - Omitting parameters is no longer recommended. The test was also - the wrong way round! This was probably due to unusual behaviour in - EVP_cmp_parameters() which returns 1 if the parameters match. - This meant that parameters were omitted when they *didn't* match and - the certificate was useless. Certificates signed with 'ca' didn't have - this bug. - [Steve Henson, reported by Doug Erickson ] - - *) Memory leak checking (-DCRYPTO_MDEBUG) had some problems. - The interface is as follows: - Applications can use - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) aka MemCheck_start(), - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) aka MemCheck_stop(); - "off" is now the default. - The library internally uses - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) aka MemCheck_off(), - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE) aka MemCheck_on() - to disable memory-checking temporarily. - - Some inconsistent states that previously were possible (and were - even the default) are now avoided. - - -DCRYPTO_MDEBUG_TIME is new and additionally stores the current time - with each memory chunk allocated; this is occasionally more helpful - than just having a counter. - - -DCRYPTO_MDEBUG_THREAD is also new and adds the thread ID. - - -DCRYPTO_MDEBUG_ALL enables all of the above, plus any future - extensions. - [Bodo Moeller] - - *) Introduce "mode" for SSL structures (with defaults in SSL_CTX), - which largely parallels "options", but is for changing API behaviour, - whereas "options" are about protocol behaviour. - Initial "mode" flags are: - - SSL_MODE_ENABLE_PARTIAL_WRITE Allow SSL_write to report success when - a single record has been written. - SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER Don't insist that SSL_write - retries use the same buffer location. - (But all of the contents must be - copied!) - [Bodo Moeller] - - *) Bugfix: SSL_set_options ignored its parameter, only SSL_CTX_set_options - worked. - - *) Fix problems with no-hmac etc. - [Ulf Möller, pointed out by Brian Wellington ] - - *) New functions RSA_get_default_method(), RSA_set_method() and - RSA_get_method(). These allows replacement of RSA_METHODs without having - to mess around with the internals of an RSA structure. - [Steve Henson] - - *) Fix memory leaks in DSA_do_sign and DSA_is_prime. - Also really enable memory leak checks in openssl.c and in some - test programs. - [Chad C. Mulligan, Bodo Moeller] - - *) Fix a bug in d2i_ASN1_INTEGER() and i2d_ASN1_INTEGER() which can mess - up the length of negative integers. This has now been simplified to just - store the length when it is first determined and use it later, rather - than trying to keep track of where data is copied and updating it to - point to the end. - [Steve Henson, reported by Brien Wheeler - ] - - *) Add a new function PKCS7_signatureVerify. This allows the verification - of a PKCS#7 signature but with the signing certificate passed to the - function itself. This contrasts with PKCS7_dataVerify which assumes the - certificate is present in the PKCS#7 structure. This isn't always the - case: certificates can be omitted from a PKCS#7 structure and be - distributed by "out of band" means (such as a certificate database). - [Steve Henson] - - *) Complete the PEM_* macros with DECLARE_PEM versions to replace the - function prototypes in pem.h, also change util/mkdef.pl to add the - necessary function names. - [Steve Henson] - - *) mk1mf.pl (used by Windows builds) did not properly read the - options set by Configure in the top level Makefile, and Configure - was not even able to write more than one option correctly. - Fixed, now "no-idea no-rc5 -DCRYPTO_MDEBUG" etc. works as intended. - [Bodo Moeller] - - *) New functions CONF_load_bio() and CONF_load_fp() to allow a config - file to be loaded from a BIO or FILE pointer. The BIO version will - for example allow memory BIOs to contain config info. - [Steve Henson] - - *) New function "CRYPTO_num_locks" that returns CRYPTO_NUM_LOCKS. - Whoever hopes to achieve shared-library compatibility across versions - must use this, not the compile-time macro. - (Exercise 0.9.4: Which is the minimum library version required by - such programs?) - Note: All this applies only to multi-threaded programs, others don't - need locks. - [Bodo Moeller] - - *) Add missing case to s3_clnt.c state machine -- one of the new SSL tests - through a BIO pair triggered the default case, i.e. - SSLerr(...,SSL_R_UNKNOWN_STATE). - [Bodo Moeller] - - *) New "BIO pair" concept (crypto/bio/bss_bio.c) so that applications - can use the SSL library even if none of the specific BIOs is - appropriate. - [Bodo Moeller] - - *) Fix a bug in i2d_DSAPublicKey() which meant it returned the wrong value - for the encoded length. - [Jeon KyoungHo ] - - *) Add initial documentation of the X509V3 functions. - [Steve Henson] - - *) Add a new pair of functions PEM_write_PKCS8PrivateKey() and - PEM_write_bio_PKCS8PrivateKey() that are equivalent to - PEM_write_PrivateKey() and PEM_write_bio_PrivateKey() but use the more - secure PKCS#8 private key format with a high iteration count. - [Steve Henson] - - *) Fix determination of Perl interpreter: A perl or perl5 - _directory_ in $PATH was also accepted as the interpreter. - [Ralf S. Engelschall] - - *) Fix demos/sign/sign.c: well there wasn't anything strictly speaking - wrong with it but it was very old and did things like calling - PEM_ASN1_read() directly and used MD5 for the hash not to mention some - unusual formatting. - [Steve Henson] - - *) Fix demos/selfsign.c: it used obsolete and deleted functions, changed - to use the new extension code. - [Steve Henson] - - *) Implement the PEM_read/PEM_write functions in crypto/pem/pem_all.c - with macros. This should make it easier to change their form, add extra - arguments etc. Fix a few PEM prototypes which didn't have cipher as a - constant. - [Steve Henson] - - *) Add to configuration table a new entry that can specify an alternative - name for unistd.h (for pre-POSIX systems); we need this for NeXTstep, - according to Mark Crispin . - [Bodo Moeller] - -#if 0 - *) DES CBC did not update the IV. Weird. - [Ben Laurie] -#else - des_cbc_encrypt does not update the IV, but des_ncbc_encrypt does. - Changing the behaviour of the former might break existing programs -- - where IV updating is needed, des_ncbc_encrypt can be used. -#endif - - *) When bntest is run from "make test" it drives bc to check its - calculations, as well as internally checking them. If an internal check - fails, it needs to cause bc to give a non-zero result or make test carries - on without noticing the failure. Fixed. - [Ben Laurie] - - *) DES library cleanups. - [Ulf Möller] - - *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be - used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit - ciphers. NOTE: although the key derivation function has been verified - against some published test vectors it has not been extensively tested - yet. Added a -v2 "cipher" option to pkcs8 application to allow the use - of v2.0. - [Steve Henson] - - *) Instead of "mkdir -p", which is not fully portable, use new - Perl script "util/mkdir-p.pl". - [Bodo Moeller] - - *) Rewrite the way password based encryption (PBE) is handled. It used to - assume that the ASN1 AlgorithmIdentifier parameter was a PBEParameter - structure. This was true for the PKCS#5 v1.5 and PKCS#12 PBE algorithms - but doesn't apply to PKCS#5 v2.0 where it can be something else. Now - the 'parameter' field of the AlgorithmIdentifier is passed to the - underlying key generation function so it must do its own ASN1 parsing. - This has also changed the EVP_PBE_CipherInit() function which now has a - 'parameter' argument instead of literal salt and iteration count values - and the function EVP_PBE_ALGOR_CipherInit() has been deleted. - [Steve Henson] - - *) Support for PKCS#5 v1.5 compatible password based encryption algorithms - and PKCS#8 functionality. New 'pkcs8' application linked to openssl. - Needed to change the PEM_STRING_EVP_PKEY value which was just "PRIVATE - KEY" because this clashed with PKCS#8 unencrypted string. Since this - value was just used as a "magic string" and not used directly its - value doesn't matter. - [Steve Henson] - - *) Introduce some semblance of const correctness to BN. Shame C doesn't - support mutable. - [Ben Laurie] - - *) "linux-sparc64" configuration (ultrapenguin). - [Ray Miller ] - "linux-sparc" configuration. - [Christian Forster ] - - *) config now generates no-xxx options for missing ciphers. - [Ulf Möller] - - *) Support the EBCDIC character set (work in progress). - File ebcdic.c not yet included because it has a different license. - [Martin Kraemer ] - - *) Support BS2000/OSD-POSIX. - [Martin Kraemer ] - - *) Make callbacks for key generation use void * instead of char *. - [Ben Laurie] - - *) Make S/MIME samples compile (not yet tested). - [Ben Laurie] - - *) Additional typesafe stacks. - [Ben Laurie] - - *) New configuration variants "bsdi-elf-gcc" (BSD/OS 4.x). - [Bodo Moeller] - - - Changes between 0.9.3 and 0.9.3a [29 May 1999] - - *) New configuration variant "sco5-gcc". - - *) Updated some demos. - [Sean O Riordain, Wade Scholine] - - *) Add missing BIO_free at exit of pkcs12 application. - [Wu Zhigang] - - *) Fix memory leak in conf.c. - [Steve Henson] - - *) Updates for Win32 to assembler version of MD5. - [Steve Henson] - - *) Set #! path to perl in apps/der_chop to where we found it - instead of using a fixed path. - [Bodo Moeller] - - *) SHA library changes for irix64-mips4-cc. - [Andy Polyakov] - - *) Improvements for VMS support. - [Richard Levitte] - - - Changes between 0.9.2b and 0.9.3 [24 May 1999] - - *) Bignum library bug fix. IRIX 6 passes "make test" now! - This also avoids the problems with SC4.2 and unpatched SC5. - [Andy Polyakov ] - - *) New functions sk_num, sk_value and sk_set to replace the previous macros. - These are required because of the typesafe stack would otherwise break - existing code. If old code used a structure member which used to be STACK - and is now STACK_OF (for example cert in a PKCS7_SIGNED structure) with - sk_num or sk_value it would produce an error because the num, data members - are not present in STACK_OF. Now it just produces a warning. sk_set - replaces the old method of assigning a value to sk_value - (e.g. sk_value(x, i) = y) which the library used in a few cases. Any code - that does this will no longer work (and should use sk_set instead) but - this could be regarded as a "questionable" behaviour anyway. - [Steve Henson] - - *) Fix most of the other PKCS#7 bugs. The "experimental" code can now - correctly handle encrypted S/MIME data. - [Steve Henson] - - *) Change type of various DES function arguments from des_cblock - (which means, in function argument declarations, pointer to char) - to des_cblock * (meaning pointer to array with 8 char elements), - which allows the compiler to do more typechecking; it was like - that back in SSLeay, but with lots of ugly casts. - - Introduce new type const_des_cblock. - [Bodo Moeller] - - *) Reorganise the PKCS#7 library and get rid of some of the more obvious - problems: find RecipientInfo structure that matches recipient certificate - and initialise the ASN1 structures properly based on passed cipher. - [Steve Henson] - - *) Belatedly make the BN tests actually check the results. - [Ben Laurie] - - *) Fix the encoding and decoding of negative ASN1 INTEGERS and conversion - to and from BNs: it was completely broken. New compilation option - NEG_PUBKEY_BUG to allow for some broken certificates that encode public - key elements as negative integers. - [Steve Henson] - - *) Reorganize and speed up MD5. - [Andy Polyakov ] - - *) VMS support. - [Richard Levitte ] - - *) New option -out to asn1parse to allow the parsed structure to be - output to a file. This is most useful when combined with the -strparse - option to examine the output of things like OCTET STRINGS. - [Steve Henson] - - *) Make SSL library a little more fool-proof by not requiring any longer - that SSL_set_{accept,connect}_state be called before - SSL_{accept,connect} may be used (SSL_set_..._state is omitted - in many applications because usually everything *appeared* to work as - intended anyway -- now it really works as intended). - [Bodo Moeller] - - *) Move openssl.cnf out of lib/. - [Ulf Möller] - - *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall - -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes - -Wmissing-declarations -Wnested-externs -Winline'' with EGCS 1.1.2+ - [Ralf S. Engelschall] - - *) Various fixes to the EVP and PKCS#7 code. It may now be able to - handle PKCS#7 enveloped data properly. - [Sebastian Akerman , modified by Steve] - - *) Create a duplicate of the SSL_CTX's CERT in SSL_new instead of - copying pointers. The cert_st handling is changed by this in - various ways (and thus what used to be known as ctx->default_cert - is now called ctx->cert, since we don't resort to s->ctx->[default_]cert - any longer when s->cert does not give us what we need). - ssl_cert_instantiate becomes obsolete by this change. - As soon as we've got the new code right (possibly it already is?), - we have solved a couple of bugs of the earlier code where s->cert - was used as if it could not have been shared with other SSL structures. - - Note that using the SSL API in certain dirty ways now will result - in different behaviour than observed with earlier library versions: - Changing settings for an SSL_CTX *ctx after having done s = SSL_new(ctx) - does not influence s as it used to. - - In order to clean up things more thoroughly, inside SSL_SESSION - we don't use CERT any longer, but a new structure SESS_CERT - that holds per-session data (if available); currently, this is - the peer's certificate chain and, for clients, the server's certificate - and temporary key. CERT holds only those values that can have - meaningful defaults in an SSL_CTX. - [Bodo Moeller] - - *) New function X509V3_EXT_i2d() to create an X509_EXTENSION structure - from the internal representation. Various PKCS#7 fixes: remove some - evil casts and set the enc_dig_alg field properly based on the signing - key type. - [Steve Henson] - - *) Allow PKCS#12 password to be set from the command line or the - environment. Let 'ca' get its config file name from the environment - variables "OPENSSL_CONF" or "SSLEAY_CONF" (for consistency with 'req' - and 'x509'). - [Steve Henson] - - *) Allow certificate policies extension to use an IA5STRING for the - organization field. This is contrary to the PKIX definition but - VeriSign uses it and IE5 only recognises this form. Document 'x509' - extension option. - [Steve Henson] - - *) Add PEDANTIC compiler flag to allow compilation with gcc -pedantic, - without disallowing inline assembler and the like for non-pedantic builds. - [Ben Laurie] - - *) Support Borland C++ builder. - [Janez Jere , modified by Ulf Möller] - - *) Support Mingw32. - [Ulf Möller] - - *) SHA-1 cleanups and performance enhancements. - [Andy Polyakov ] - - *) Sparc v8plus assembler for the bignum library. - [Andy Polyakov ] - - *) Accept any -xxx and +xxx compiler options in Configure. - [Ulf Möller] - - *) Update HPUX configuration. - [Anonymous] - - *) Add missing sk__unshift() function to safestack.h - [Ralf S. Engelschall] - - *) New function SSL_CTX_use_certificate_chain_file that sets the - "extra_cert"s in addition to the certificate. (This makes sense - only for "PEM" format files, as chains as a whole are not - DER-encoded.) - [Bodo Moeller] - - *) Support verify_depth from the SSL API. - x509_vfy.c had what can be considered an off-by-one-error: - Its depth (which was not part of the external interface) - was actually counting the number of certificates in a chain; - now it really counts the depth. - [Bodo Moeller] - - *) Bugfix in crypto/x509/x509_cmp.c: The SSLerr macro was used - instead of X509err, which often resulted in confusing error - messages since the error codes are not globally unique - (e.g. an alleged error in ssl3_accept when a certificate - didn't match the private key). - - *) New function SSL_CTX_set_session_id_context that allows to set a default - value (so that you don't need SSL_set_session_id_context for each - connection using the SSL_CTX). - [Bodo Moeller] - - *) OAEP decoding bug fix. - [Ulf Möller] - - *) Support INSTALL_PREFIX for package builders, as proposed by - David Harris. - [Bodo Moeller] - - *) New Configure options "threads" and "no-threads". For systems - where the proper compiler options are known (currently Solaris - and Linux), "threads" is the default. - [Bodo Moeller] - - *) New script util/mklink.pl as a faster substitute for util/mklink.sh. - [Bodo Moeller] - - *) Install various scripts to $(OPENSSLDIR)/misc, not to - $(INSTALLTOP)/bin -- they shouldn't clutter directories - such as /usr/local/bin. - [Bodo Moeller] - - *) "make linux-shared" to build shared libraries. - [Niels Poppe ] - - *) New Configure option no- (rsa, idea, rc5, ...). - [Ulf Möller] - - *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for - extension adding in x509 utility. - [Steve Henson] - - *) Remove NOPROTO sections and error code comments. - [Ulf Möller] - - *) Partial rewrite of the DEF file generator to now parse the ANSI - prototypes. - [Steve Henson] - - *) New Configure options --prefix=DIR and --openssldir=DIR. - [Ulf Möller] - - *) Complete rewrite of the error code script(s). It is all now handled - by one script at the top level which handles error code gathering, - header rewriting and C source file generation. It should be much better - than the old method: it now uses a modified version of Ulf's parser to - read the ANSI prototypes in all header files (thus the old K&R definitions - aren't needed for error creation any more) and do a better job of - translating function codes into names. The old 'ASN1 error code imbedded - in a comment' is no longer necessary and it doesn't use .err files which - have now been deleted. Also the error code call doesn't have to appear all - on one line (which resulted in some large lines...). - [Steve Henson] - - *) Change #include filenames from to . - [Bodo Moeller] - - *) Change behaviour of ssl2_read when facing length-0 packets: Don't return - 0 (which usually indicates a closed connection), but continue reading. - [Bodo Moeller] - - *) Fix some race conditions. - [Bodo Moeller] - - *) Add support for CRL distribution points extension. Add Certificate - Policies and CRL distribution points documentation. - [Steve Henson] - - *) Move the autogenerated header file parts to crypto/opensslconf.h. - [Ulf Möller] - - *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of - 8 of keying material. Merlin has also confirmed interop with this fix - between OpenSSL and Baltimore C/SSL 2.0 and J/SSL 2.0. - [Merlin Hughes ] - - *) Fix lots of warnings. - [Richard Levitte ] - - *) In add_cert_dir() in crypto/x509/by_dir.c, break out of the loop if - the directory spec didn't end with a LIST_SEPARATOR_CHAR. - [Richard Levitte ] - - *) Fix problems with sizeof(long) == 8. - [Andy Polyakov ] - - *) Change functions to ANSI C. - [Ulf Möller] - - *) Fix typos in error codes. - [Martin Kraemer , Ulf Möller] - - *) Remove defunct assembler files from Configure. - [Ulf Möller] - - *) SPARC v8 assembler BIGNUM implementation. - [Andy Polyakov ] - - *) Support for Certificate Policies extension: both print and set. - Various additions to support the r2i method this uses. - [Steve Henson] - - *) A lot of constification, and fix a bug in X509_NAME_oneline() that could - return a const string when you are expecting an allocated buffer. - [Ben Laurie] - - *) Add support for ASN1 types UTF8String and VISIBLESTRING, also the CHOICE - types DirectoryString and DisplayText. - [Steve Henson] - - *) Add code to allow r2i extensions to access the configuration database, - add an LHASH database driver and add several ctx helper functions. - [Steve Henson] - - *) Fix an evil bug in bn_expand2() which caused various BN functions to - fail when they extended the size of a BIGNUM. - [Steve Henson] - - *) Various utility functions to handle SXNet extension. Modify mkdef.pl to - support typesafe stack. - [Steve Henson] - - *) Fix typo in SSL_[gs]et_options(). - [Nils Frostberg ] - - *) Delete various functions and files that belonged to the (now obsolete) - old X509V3 handling code. - [Steve Henson] - - *) New Configure option "rsaref". - [Ulf Möller] - - *) Don't auto-generate pem.h. - [Bodo Moeller] - - *) Introduce type-safe ASN.1 SETs. - [Ben Laurie] - - *) Convert various additional casted stacks to type-safe STACK_OF() variants. - [Ben Laurie, Ralf S. Engelschall, Steve Henson] - - *) Introduce type-safe STACKs. This will almost certainly break lots of code - that links with OpenSSL (well at least cause lots of warnings), but fear - not: the conversion is trivial, and it eliminates loads of evil casts. A - few STACKed things have been converted already. Feel free to convert more. - In the fullness of time, I'll do away with the STACK type altogether. - [Ben Laurie] - - *) Add `openssl ca -revoke ' facility which revokes a certificate - specified in by updating the entry in the index.txt file. - This way one no longer has to edit the index.txt file manually for - revoking a certificate. The -revoke option does the gory details now. - [Massimiliano Pala , Ralf S. Engelschall] - - *) Fix `openssl crl -noout -text' combination where `-noout' killed the - `-text' option at all and this way the `-noout -text' combination was - inconsistent in `openssl crl' with the friends in `openssl x509|rsa|dsa'. - [Ralf S. Engelschall] - - *) Make sure a corresponding plain text error message exists for the - X509_V_ERR_CERT_REVOKED/23 error number which can occur when a - verify callback function determined that a certificate was revoked. - [Ralf S. Engelschall] - - *) Bugfix: In test/testenc, don't test "openssl " for - ciphers that were excluded, e.g. by -DNO_IDEA. Also, test - all available cipers including rc5, which was forgotten until now. - In order to let the testing shell script know which algorithms - are available, a new (up to now undocumented) command - "openssl list-cipher-commands" is used. - [Bodo Moeller] - - *) Bugfix: s_client occasionally would sleep in select() when - it should have checked SSL_pending() first. - [Bodo Moeller] - - *) New functions DSA_do_sign and DSA_do_verify to provide access to - the raw DSA values prior to ASN.1 encoding. - [Ulf Möller] - - *) Tweaks to Configure - [Niels Poppe ] - - *) Add support for PKCS#5 v2.0 ASN1 PBES2 structures. No other support, - yet... - [Steve Henson] - - *) New variables $(RANLIB) and $(PERL) in the Makefiles. - [Ulf Möller] - - *) New config option to avoid instructions that are illegal on the 80386. - The default code is faster, but requires at least a 486. - [Ulf Möller] - - *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and - SSL2_SERVER_VERSION (not used at all) macros, which are now the - same as SSL2_VERSION anyway. - [Bodo Moeller] - - *) New "-showcerts" option for s_client. - [Bodo Moeller] - - *) Still more PKCS#12 integration. Add pkcs12 application to openssl - application. Various cleanups and fixes. - [Steve Henson] - - *) More PKCS#12 integration. Add new pkcs12 directory with Makefile.ssl and - modify error routines to work internally. Add error codes and PBE init - to library startup routines. - [Steve Henson] - - *) Further PKCS#12 integration. Added password based encryption, PKCS#8 and - packing functions to asn1 and evp. Changed function names and error - codes along the way. - [Steve Henson] - - *) PKCS12 integration: and so it begins... First of several patches to - slowly integrate PKCS#12 functionality into OpenSSL. Add PKCS#12 - objects to objects.h - [Steve Henson] - - *) Add a new 'indent' option to some X509V3 extension code. Initial ASN1 - and display support for Thawte strong extranet extension. - [Steve Henson] - - *) Add LinuxPPC support. - [Jeff Dubrule ] - - *) Get rid of redundant BN file bn_mulw.c, and rename bn_div64 to - bn_div_words in alpha.s. - [Hannes Reinecke and Ben Laurie] - - *) Make sure the RSA OAEP test is skipped under -DRSAref because - OAEP isn't supported when OpenSSL is built with RSAref. - [Ulf Moeller ] - - *) Move definitions of IS_SET/IS_SEQUENCE inside crypto/asn1/asn1.h - so they no longer are missing under -DNOPROTO. - [Soren S. Jorvang ] - - - Changes between 0.9.1c and 0.9.2b [22 Mar 1999] - - *) Make SSL_get_peer_cert_chain() work in servers. Unfortunately, it still - doesn't work when the session is reused. Coming soon! - [Ben Laurie] - - *) Fix a security hole, that allows sessions to be reused in the wrong - context thus bypassing client cert protection! All software that uses - client certs and session caches in multiple contexts NEEDS PATCHING to - allow session reuse! A fuller solution is in the works. - [Ben Laurie, problem pointed out by Holger Reif, Bodo Moeller (and ???)] - - *) Some more source tree cleanups (removed obsolete files - crypto/bf/asm/bf586.pl, test/test.txt and crypto/sha/asm/f.s; changed - permission on "config" script to be executable) and a fix for the INSTALL - document. - [Ulf Moeller ] - - *) Remove some legacy and erroneous uses of malloc, free instead of - Malloc, Free. - [Lennart Bang , with minor changes by Steve] - - *) Make rsa_oaep_test return non-zero on error. - [Ulf Moeller ] - - *) Add support for native Solaris shared libraries. Configure - solaris-sparc-sc4-pic, make, then run shlib/solaris-sc4.sh. It'd be nice - if someone would make that last step automatic. - [Matthias Loepfe ] - - *) ctx_size was not built with the right compiler during "make links". Fixed. - [Ben Laurie] - - *) Change the meaning of 'ALL' in the cipher list. It now means "everything - except NULL ciphers". This means the default cipher list will no longer - enable NULL ciphers. They need to be specifically enabled e.g. with - the string "DEFAULT:eNULL". - [Steve Henson] - - *) Fix to RSA private encryption routines: if p < q then it would - occasionally produce an invalid result. This will only happen with - externally generated keys because OpenSSL (and SSLeay) ensure p > q. - [Steve Henson] - - *) Be less restrictive and allow also `perl util/perlpath.pl - /path/to/bin/perl' in addition to `perl util/perlpath.pl /path/to/bin', - because this way one can also use an interpreter named `perl5' (which is - usually the name of Perl 5.xxx on platforms where an Perl 4.x is still - installed as `perl'). - [Matthias Loepfe ] - - *) Let util/clean-depend.pl work also with older Perl 5.00x versions. - [Matthias Loepfe ] - - *) Fix Makefile.org so CC,CFLAG etc are passed to 'make links' add - advapi32.lib to Win32 build and change the pem test comparision - to fc.exe (thanks to Ulrich Kroener for the - suggestion). Fix misplaced ASNI prototypes and declarations in evp.h - and crypto/des/ede_cbcm_enc.c. - [Steve Henson] - - *) DES quad checksum was broken on big-endian architectures. Fixed. - [Ben Laurie] - - *) Comment out two functions in bio.h that aren't implemented. Fix up the - Win32 test batch file so it (might) work again. The Win32 test batch file - is horrible: I feel ill.... - [Steve Henson] - - *) Move various #ifdefs around so NO_SYSLOG, NO_DIRENT etc are now selected - in e_os.h. Audit of header files to check ANSI and non ANSI - sections: 10 functions were absent from non ANSI section and not exported - from Windows DLLs. Fixed up libeay.num for new functions. - [Steve Henson] - - *) Make `openssl version' output lines consistent. - [Ralf S. Engelschall] - - *) Fix Win32 symbol export lists for BIO functions: Added - BIO_get_ex_new_index, BIO_get_ex_num, BIO_get_ex_data and BIO_set_ex_data - to ms/libeay{16,32}.def. - [Ralf S. Engelschall] - - *) Second round of fixing the OpenSSL perl/ stuff. It now at least compiled - fine under Unix and passes some trivial tests I've now added. But the - whole stuff is horribly incomplete, so a README.1ST with a disclaimer was - added to make sure no one expects that this stuff really works in the - OpenSSL 0.9.2 release. Additionally I've started to clean the XS sources - up and fixed a few little bugs and inconsistencies in OpenSSL.{pm,xs} and - openssl_bio.xs. - [Ralf S. Engelschall] - - *) Fix the generation of two part addresses in perl. - [Kenji Miyake , integrated by Ben Laurie] - - *) Add config entry for Linux on MIPS. - [John Tobey ] - - *) Make links whenever Configure is run, unless we are on Windoze. - [Ben Laurie] - - *) Permit extensions to be added to CRLs using crl_section in openssl.cnf. - Currently only issuerAltName and AuthorityKeyIdentifier make any sense - in CRLs. - [Steve Henson] - - *) Add a useful kludge to allow package maintainers to specify compiler and - other platforms details on the command line without having to patch the - Configure script everytime: One now can use ``perl Configure - :
    '', i.e. platform ids are allowed to have details appended - to them (seperated by colons). This is treated as there would be a static - pre-configured entry in Configure's %table under key with value -
    and ``perl Configure '' is called. So, when you want to - perform a quick test-compile under FreeBSD 3.1 with pgcc and without - assembler stuff you can use ``perl Configure "FreeBSD-elf:pgcc:-O6:::"'' - now, which overrides the FreeBSD-elf entry on-the-fly. - [Ralf S. Engelschall] - - *) Disable new TLS1 ciphersuites by default: they aren't official yet. - [Ben Laurie] - - *) Allow DSO flags like -fpic, -fPIC, -KPIC etc. to be specified - on the `perl Configure ...' command line. This way one can compile - OpenSSL libraries with Position Independent Code (PIC) which is needed - for linking it into DSOs. - [Ralf S. Engelschall] - - *) Remarkably, export ciphers were totally broken and no-one had noticed! - Fixed. - [Ben Laurie] - - *) Cleaned up the LICENSE document: The official contact for any license - questions now is the OpenSSL core team under openssl-core@openssl.org. - And add a paragraph about the dual-license situation to make sure people - recognize that _BOTH_ the OpenSSL license _AND_ the SSLeay license apply - to the OpenSSL toolkit. - [Ralf S. Engelschall] - - *) General source tree makefile cleanups: Made `making xxx in yyy...' - display consistent in the source tree and replaced `/bin/rm' by `rm'. - Additonally cleaned up the `make links' target: Remove unnecessary - semicolons, subsequent redundant removes, inline point.sh into mklink.sh - to speed processing and no longer clutter the display with confusing - stuff. Instead only the actually done links are displayed. - [Ralf S. Engelschall] - - *) Permit null encryption ciphersuites, used for authentication only. It used - to be necessary to set the preprocessor define SSL_ALLOW_ENULL to do this. - It is now necessary to set SSL_FORBID_ENULL to prevent the use of null - encryption. - [Ben Laurie] - - *) Add a bunch of fixes to the PKCS#7 stuff. It used to sometimes reorder - signed attributes when verifying signatures (this would break them), - the detached data encoding was wrong and public keys obtained using - X509_get_pubkey() weren't freed. - [Steve Henson] - - *) Add text documentation for the BUFFER functions. Also added a work around - to a Win95 console bug. This was triggered by the password read stuff: the - last character typed gets carried over to the next fread(). If you were - generating a new cert request using 'req' for example then the last - character of the passphrase would be CR which would then enter the first - field as blank. - [Steve Henson] - - *) Added the new `Includes OpenSSL Cryptography Software' button as - doc/openssl_button.{gif,html} which is similar in style to the old SSLeay - button and can be used by applications based on OpenSSL to show the - relationship to the OpenSSL project. - [Ralf S. Engelschall] - - *) Remove confusing variables in function signatures in files - ssl/ssl_lib.c and ssl/ssl.h. - [Lennart Bong ] - - *) Don't install bss_file.c under PREFIX/include/ - [Lennart Bong ] - - *) Get the Win32 compile working again. Modify mkdef.pl so it can handle - functions that return function pointers and has support for NT specific - stuff. Fix mk1mf.pl and VC-32.pl to support NT differences also. Various - #ifdef WIN32 and WINNTs sprinkled about the place and some changes from - unsigned to signed types: this was killing the Win32 compile. - [Steve Henson] - - *) Add new certificate file to stack functions, - SSL_add_dir_cert_subjects_to_stack() and - SSL_add_file_cert_subjects_to_stack(). These largely supplant - SSL_load_client_CA_file(), and can be used to add multiple certs easily - to a stack (usually this is then handed to SSL_CTX_set_client_CA_list()). - This means that Apache-SSL and similar packages don't have to mess around - to add as many CAs as they want to the preferred list. - [Ben Laurie] - - *) Experiment with doxygen documentation. Currently only partially applied to - ssl/ssl_lib.c. - See http://www.stack.nl/~dimitri/doxygen/index.html, and run doxygen with - openssl.doxy as the configuration file. - [Ben Laurie] - - *) Get rid of remaining C++-style comments which strict C compilers hate. - [Ralf S. Engelschall, pointed out by Carlos Amengual] - - *) Changed BN_RECURSION in bn_mont.c to BN_RECURSION_MONT so it is not - compiled in by default: it has problems with large keys. - [Steve Henson] - - *) Add a bunch of SSL_xxx() functions for configuring the temporary RSA and - DH private keys and/or callback functions which directly correspond to - their SSL_CTX_xxx() counterparts but work on a per-connection basis. This - is needed for applications which have to configure certificates on a - per-connection basis (e.g. Apache+mod_ssl) instead of a per-context basis - (e.g. s_server). - For the RSA certificate situation is makes no difference, but - for the DSA certificate situation this fixes the "no shared cipher" - problem where the OpenSSL cipher selection procedure failed because the - temporary keys were not overtaken from the context and the API provided - no way to reconfigure them. - The new functions now let applications reconfigure the stuff and they - are in detail: SSL_need_tmp_RSA, SSL_set_tmp_rsa, SSL_set_tmp_dh, - SSL_set_tmp_rsa_callback and SSL_set_tmp_dh_callback. Additionally a new - non-public-API function ssl_cert_instantiate() is used as a helper - function and also to reduce code redundancy inside ssl_rsa.c. - [Ralf S. Engelschall] - - *) Move s_server -dcert and -dkey options out of the undocumented feature - area because they are useful for the DSA situation and should be - recognized by the users. - [Ralf S. Engelschall] - - *) Fix the cipher decision scheme for export ciphers: the export bits are - *not* within SSL_MKEY_MASK or SSL_AUTH_MASK, they are within - SSL_EXP_MASK. So, the original variable has to be used instead of the - already masked variable. - [Richard Levitte ] - - *) Fix 'port' variable from `int' to `unsigned int' in crypto/bio/b_sock.c - [Richard Levitte ] - - *) Change type of another md_len variable in pk7_doit.c:PKCS7_dataFinal() - from `int' to `unsigned int' because it's a length and initialized by - EVP_DigestFinal() which expects an `unsigned int *'. - [Richard Levitte ] - - *) Don't hard-code path to Perl interpreter on shebang line of Configure - script. Instead use the usual Shell->Perl transition trick. - [Ralf S. Engelschall] - - *) Make `openssl x509 -noout -modulus' functional also for DSA certificates - (in addition to RSA certificates) to match the behaviour of `openssl dsa - -noout -modulus' as it's already the case for `openssl rsa -noout - -modulus'. For RSA the -modulus is the real "modulus" while for DSA - currently the public key is printed (a decision which was already done by - `openssl dsa -modulus' in the past) which serves a similar purpose. - Additionally the NO_RSA no longer completely removes the whole -modulus - option; it now only avoids using the RSA stuff. Same applies to NO_DSA - now, too. - [Ralf S. Engelschall] - - *) Add Arne Ansper's reliable BIO - this is an encrypted, block-digested - BIO. See the source (crypto/evp/bio_ok.c) for more info. - [Arne Ansper ] - - *) Dump the old yucky req code that tried (and failed) to allow raw OIDs - to be added. Now both 'req' and 'ca' can use new objects defined in the - config file. - [Steve Henson] - - *) Add cool BIO that does syslog (or event log on NT). - [Arne Ansper , integrated by Ben Laurie] - - *) Add support for new TLS ciphersuites, TLS_RSA_EXPORT56_WITH_RC4_56_MD5, - TLS_RSA_EXPORT56_WITH_RC2_CBC_56_MD5 and - TLS_RSA_EXPORT56_WITH_DES_CBC_SHA, as specified in "56-bit Export Cipher - Suites For TLS", draft-ietf-tls-56-bit-ciphersuites-00.txt. - [Ben Laurie] - - *) Add preliminary config info for new extension code. - [Steve Henson] - - *) Make RSA_NO_PADDING really use no padding. - [Ulf Moeller ] - - *) Generate errors when private/public key check is done. - [Ben Laurie] - - *) Overhaul for 'crl' utility. New function X509_CRL_print. Partial support - for some CRL extensions and new objects added. - [Steve Henson] - - *) Really fix the ASN1 IMPLICIT bug this time... Partial support for private - key usage extension and fuller support for authority key id. - [Steve Henson] - - *) Add OAEP encryption for the OpenSSL crypto library. OAEP is the improved - padding method for RSA, which is recommended for new applications in PKCS - #1 v2.0 (RFC 2437, October 1998). - OAEP (Optimal Asymmetric Encryption Padding) has better theoretical - foundations than the ad-hoc padding used in PKCS #1 v1.5. It is secure - against Bleichbacher's attack on RSA. - [Ulf Moeller , reformatted, corrected and integrated by - Ben Laurie] - - *) Updates to the new SSL compression code - [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] - - *) Fix so that the version number in the master secret, when passed - via RSA, checks that if TLS was proposed, but we roll back to SSLv3 - (because the server will not accept higher), that the version number - is 0x03,0x01, not 0x03,0x00 - [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] - - *) Run extensive memory leak checks on SSL apps. Fixed *lots* of memory - leaks in ssl/ relating to new X509_get_pubkey() behaviour. Also fixes - in apps/ and an unrelated leak in crypto/dsa/dsa_vrf.c - [Steve Henson] - - *) Support for RAW extensions where an arbitrary extension can be - created by including its DER encoding. See apps/openssl.cnf for - an example. - [Steve Henson] - - *) Make sure latest Perl versions don't interpret some generated C array - code as Perl array code in the crypto/err/err_genc.pl script. - [Lars Weber <3weber@informatik.uni-hamburg.de>] - - *) Modify ms/do_ms.bat to not generate assembly language makefiles since - not many people have the assembler. Various Win32 compilation fixes and - update to the INSTALL.W32 file with (hopefully) more accurate Win32 - build instructions. - [Steve Henson] - - *) Modify configure script 'Configure' to automatically create crypto/date.h - file under Win32 and also build pem.h from pem.org. New script - util/mkfiles.pl to create the MINFO file on environments that can't do a - 'make files': perl util/mkfiles.pl >MINFO should work. - [Steve Henson] - - *) Major rework of DES function declarations, in the pursuit of correctness - and purity. As a result, many evil casts evaporated, and some weirdness, - too. You may find this causes warnings in your code. Zapping your evil - casts will probably fix them. Mostly. - [Ben Laurie] - - *) Fix for a typo in asn1.h. Bug fix to object creation script - obj_dat.pl. It considered a zero in an object definition to mean - "end of object": none of the objects in objects.h have any zeros - so it wasn't spotted. - [Steve Henson, reported by Erwann ABALEA ] - - *) Add support for Triple DES Cipher Block Chaining with Output Feedback - Masking (CBCM). In the absence of test vectors, the best I have been able - to do is check that the decrypt undoes the encrypt, so far. Send me test - vectors if you have them. - [Ben Laurie] - - *) Correct calculation of key length for export ciphers (too much space was - allocated for null ciphers). This has not been tested! - [Ben Laurie] - - *) Modifications to the mkdef.pl for Win32 DEF file creation. The usage - message is now correct (it understands "crypto" and "ssl" on its - command line). There is also now an "update" option. This will update - the util/ssleay.num and util/libeay.num files with any new functions. - If you do a: - perl util/mkdef.pl crypto ssl update - it will update them. - [Steve Henson] - - *) Overhauled the Perl interface (perl/*): - - ported BN stuff to OpenSSL's different BN library - - made the perl/ source tree CVS-aware - - renamed the package from SSLeay to OpenSSL (the files still contain - their history because I've copied them in the repository) - - removed obsolete files (the test scripts will be replaced - by better Test::Harness variants in the future) - [Ralf S. Engelschall] - - *) First cut for a very conservative source tree cleanup: - 1. merge various obsolete readme texts into doc/ssleay.txt - where we collect the old documents and readme texts. - 2. remove the first part of files where I'm already sure that we no - longer need them because of three reasons: either they are just temporary - files which were left by Eric or they are preserved original files where - I've verified that the diff is also available in the CVS via "cvs diff - -rSSLeay_0_8_1b" or they were renamed (as it was definitely the case for - the crypto/md/ stuff). - [Ralf S. Engelschall] - - *) More extension code. Incomplete support for subject and issuer alt - name, issuer and authority key id. Change the i2v function parameters - and add an extra 'crl' parameter in the X509V3_CTX structure: guess - what that's for :-) Fix to ASN1 macro which messed up - IMPLICIT tag and add f_enum.c which adds a2i, i2a for ENUMERATED. - [Steve Henson] - - *) Preliminary support for ENUMERATED type. This is largely copied from the - INTEGER code. - [Steve Henson] - - *) Add new function, EVP_MD_CTX_copy() to replace frequent use of memcpy. - [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] - - *) Make sure `make rehash' target really finds the `openssl' program. - [Ralf S. Engelschall, Matthias Loepfe ] - - *) Squeeze another 7% of speed out of MD5 assembler, at least on a P2. I'd - like to hear about it if this slows down other processors. - [Ben Laurie] - - *) Add CygWin32 platform information to Configure script. - [Alan Batie ] - - *) Fixed ms/32all.bat script: `no_asm' -> `no-asm' - [Rainer W. Gerling ] - - *) New program nseq to manipulate netscape certificate sequences - [Steve Henson] - - *) Modify crl2pkcs7 so it supports multiple -certfile arguments. Fix a - few typos. - [Steve Henson] - - *) Fixes to BN code. Previously the default was to define BN_RECURSION - but the BN code had some problems that would cause failures when - doing certificate verification and some other functions. - [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] - - *) Add ASN1 and PEM code to support netscape certificate sequences. - [Steve Henson] - - *) Add ASN1 and PEM code to support netscape certificate sequences. - [Steve Henson] - - *) Add several PKIX and private extended key usage OIDs. - [Steve Henson] - - *) Modify the 'ca' program to handle the new extension code. Modify - openssl.cnf for new extension format, add comments. - [Steve Henson] - - *) More X509 V3 changes. Fix typo in v3_bitstr.c. Add support to 'req' - and add a sample to openssl.cnf so req -x509 now adds appropriate - CA extensions. - [Steve Henson] - - *) Continued X509 V3 changes. Add to other makefiles, integrate with the - error code, add initial support to X509_print() and x509 application. - [Steve Henson] - - *) Takes a deep breath and start addding X509 V3 extension support code. Add - files in crypto/x509v3. Move original stuff to crypto/x509v3/old. All this - stuff is currently isolated and isn't even compiled yet. - [Steve Henson] - - *) Continuing patches for GeneralizedTime. Fix up certificate and CRL - ASN1 to use ASN1_TIME and modify print routines to use ASN1_TIME_print. - Removed the versions check from X509 routines when loading extensions: - this allows certain broken certificates that don't set the version - properly to be processed. - [Steve Henson] - - *) Deal with irritating shit to do with dependencies, in YAAHW (Yet Another - Ad Hoc Way) - Makefile.ssls now all contain local dependencies, which - can still be regenerated with "make depend". - [Ben Laurie] - - *) Spelling mistake in C version of CAST-128. - [Ben Laurie, reported by Jeremy Hylton ] - - *) Changes to the error generation code. The perl script err-code.pl - now reads in the old error codes and retains the old numbers, only - adding new ones if necessary. It also only changes the .err files if new - codes are added. The makefiles have been modified to only insert errors - when needed (to avoid needlessly modifying header files). This is done - by only inserting errors if the .err file is newer than the auto generated - C file. To rebuild all the error codes from scratch (the old behaviour) - either modify crypto/Makefile.ssl to pass the -regen flag to err_code.pl - or delete all the .err files. - [Steve Henson] - - *) CAST-128 was incorrectly implemented for short keys. The C version has - been fixed, but is untested. The assembler versions are also fixed, but - new assembler HAS NOT BEEN GENERATED FOR WIN32 - the Makefile needs fixing - to regenerate it if needed. - [Ben Laurie, reported (with fix for C version) by Jun-ichiro itojun - Hagino ] - - *) File was opened incorrectly in randfile.c. - [Ulf Möller ] - - *) Beginning of support for GeneralizedTime. d2i, i2d, check and print - functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or - GeneralizedTime. ASN1_TIME is the proper type used in certificates et - al: it's just almost always a UTCTime. Note this patch adds new error - codes so do a "make errors" if there are problems. - [Steve Henson] - - *) Correct Linux 1 recognition in config. - [Ulf Möller ] - - *) Remove pointless MD5 hash when using DSA keys in ca. - [Anonymous ] - - *) Generate an error if given an empty string as a cert directory. Also - generate an error if handed NULL (previously returned 0 to indicate an - error, but didn't set one). - [Ben Laurie, reported by Anonymous ] - - *) Add prototypes to SSL methods. Make SSL_write's buffer const, at last. - [Ben Laurie] - - *) Fix the dummy function BN_ref_mod_exp() in rsaref.c to have the correct - parameters. This was causing a warning which killed off the Win32 compile. - [Steve Henson] - - *) Remove C++ style comments from crypto/bn/bn_local.h. - [Neil Costigan ] - - *) The function OBJ_txt2nid was broken. It was supposed to return a nid - based on a text string, looking up short and long names and finally - "dot" format. The "dot" format stuff didn't work. Added new function - OBJ_txt2obj to do the same but return an ASN1_OBJECT and rewrote - OBJ_txt2nid to use it. OBJ_txt2obj can also return objects even if the - OID is not part of the table. - [Steve Henson] - - *) Add prototypes to X509 lookup/verify methods, fixing a bug in - X509_LOOKUP_by_alias(). - [Ben Laurie] - - *) Sort openssl functions by name. - [Ben Laurie] - - *) Get the gendsa program working (hopefully) and add it to app list. Remove - encryption from sample DSA keys (in case anyone is interested the password - was "1234"). - [Steve Henson] - - *) Make _all_ *_free functions accept a NULL pointer. - [Frans Heymans ] - - *) If a DH key is generated in s3_srvr.c, don't blow it by trying to use - NULL pointers. - [Anonymous ] - - *) s_server should send the CAfile as acceptable CAs, not its own cert. - [Bodo Moeller <3moeller@informatik.uni-hamburg.de>] - - *) Don't blow it for numeric -newkey arguments to apps/req. - [Bodo Moeller <3moeller@informatik.uni-hamburg.de>] - - *) Temp key "for export" tests were wrong in s3_srvr.c. - [Anonymous ] - - *) Add prototype for temp key callback functions - SSL_CTX_set_tmp_{rsa,dh}_callback(). - [Ben Laurie] - - *) Make DH_free() tolerate being passed a NULL pointer (like RSA_free() and - DSA_free()). Make X509_PUBKEY_set() check for errors in d2i_PublicKey(). - [Steve Henson] - - *) X509_name_add_entry() freed the wrong thing after an error. - [Arne Ansper ] - - *) rsa_eay.c would attempt to free a NULL context. - [Arne Ansper ] - - *) BIO_s_socket() had a broken should_retry() on Windoze. - [Arne Ansper ] - - *) BIO_f_buffer() didn't pass on BIO_CTRL_FLUSH. - [Arne Ansper ] - - *) Make sure the already existing X509_STORE->depth variable is initialized - in X509_STORE_new(), but document the fact that this variable is still - unused in the certificate verification process. - [Ralf S. Engelschall] - - *) Fix the various library and apps files to free up pkeys obtained from - X509_PUBKEY_get() et al. Also allow x509.c to handle netscape extensions. - [Steve Henson] - - *) Fix reference counting in X509_PUBKEY_get(). This makes - demos/maurice/example2.c work, amongst others, probably. - [Steve Henson and Ben Laurie] - - *) First cut of a cleanup for apps/. First the `ssleay' program is now named - `openssl' and second, the shortcut symlinks for the `openssl ' - are no longer created. This way we have a single and consistent command - line interface `openssl ', similar to `cvs '. - [Ralf S. Engelschall, Paul Sutton and Ben Laurie] - - *) ca.c: move test for DSA keys inside #ifndef NO_DSA. Make pubkey - BIT STRING wrapper always have zero unused bits. - [Steve Henson] - - *) Add CA.pl, perl version of CA.sh, add extended key usage OID. - [Steve Henson] - - *) Make the top-level INSTALL documentation easier to understand. - [Paul Sutton] - - *) Makefiles updated to exit if an error occurs in a sub-directory - make (including if user presses ^C) [Paul Sutton] - - *) Make Montgomery context stuff explicit in RSA data structure. - [Ben Laurie] - - *) Fix build order of pem and err to allow for generated pem.h. - [Ben Laurie] - - *) Fix renumbering bug in X509_NAME_delete_entry(). - [Ben Laurie] - - *) Enhanced the err-ins.pl script so it makes the error library number - global and can add a library name. This is needed for external ASN1 and - other error libraries. - [Steve Henson] - - *) Fixed sk_insert which never worked properly. - [Steve Henson] - - *) Fix ASN1 macros so they can handle indefinite length construted - EXPLICIT tags. Some non standard certificates use these: they can now - be read in. - [Steve Henson] - - *) Merged the various old/obsolete SSLeay documentation files (doc/xxx.doc) - into a single doc/ssleay.txt bundle. This way the information is still - preserved but no longer messes up this directory. Now it's new room for - the new set of documenation files. - [Ralf S. Engelschall] - - *) SETs were incorrectly DER encoded. This was a major pain, because they - shared code with SEQUENCEs, which aren't coded the same. This means that - almost everything to do with SETs or SEQUENCEs has either changed name or - number of arguments. - [Ben Laurie, based on a partial fix by GP Jayan ] - - *) Fix test data to work with the above. - [Ben Laurie] - - *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but - was already fixed by Eric for 0.9.1 it seems. - [Ben Laurie - pointed out by Ulf Möller ] - - *) Autodetect FreeBSD3. - [Ben Laurie] - - *) Fix various bugs in Configure. This affects the following platforms: - nextstep - ncr-scde - unixware-2.0 - unixware-2.0-pentium - sco5-cc. - [Ben Laurie] - - *) Eliminate generated files from CVS. Reorder tests to regenerate files - before they are needed. - [Ben Laurie] - - *) Generate Makefile.ssl from Makefile.org (to keep CVS happy). - [Ben Laurie] - - - Changes between 0.9.1b and 0.9.1c [23-Dec-1998] - - *) Added OPENSSL_VERSION_NUMBER to crypto/crypto.h and - changed SSLeay to OpenSSL in version strings. - [Ralf S. Engelschall] - - *) Some fixups to the top-level documents. - [Paul Sutton] - - *) Fixed the nasty bug where rsaref.h was not found under compile-time - because the symlink to include/ was missing. - [Ralf S. Engelschall] - - *) Incorporated the popular no-RSA/DSA-only patches - which allow to compile a RSA-free SSLeay. - [Andrew Cooke / Interrader Ldt., Ralf S. Engelschall] - - *) Fixed nasty rehash problem under `make -f Makefile.ssl links' - when "ssleay" is still not found. - [Ralf S. Engelschall] - - *) Added more platforms to Configure: Cray T3E, HPUX 11, - [Ralf S. Engelschall, Beckmann ] - - *) Updated the README file. - [Ralf S. Engelschall] - - *) Added various .cvsignore files in the CVS repository subdirs - to make a "cvs update" really silent. - [Ralf S. Engelschall] - - *) Recompiled the error-definition header files and added - missing symbols to the Win32 linker tables. - [Ralf S. Engelschall] - - *) Cleaned up the top-level documents; - o new files: CHANGES and LICENSE - o merged VERSION, HISTORY* and README* files a CHANGES.SSLeay - o merged COPYRIGHT into LICENSE - o removed obsolete TODO file - o renamed MICROSOFT to INSTALL.W32 - [Ralf S. Engelschall] - - *) Removed dummy files from the 0.9.1b source tree: - crypto/asn1/x crypto/bio/cd crypto/bio/fg crypto/bio/grep crypto/bio/vi - crypto/bn/asm/......add.c crypto/bn/asm/a.out crypto/dsa/f crypto/md5/f - crypto/pem/gmon.out crypto/perlasm/f crypto/pkcs7/build crypto/rsa/f - crypto/sha/asm/f crypto/threads/f ms/zzz ssl/f ssl/f.mak test/f - util/f.mak util/pl/f util/pl/f.mak crypto/bf/bf_locl.old apps/f - [Ralf S. Engelschall] - - *) Added various platform portability fixes. - [Mark J. Cox] - - *) The Genesis of the OpenSSL rpject: - We start with the latest (unreleased) SSLeay version 0.9.1b which Eric A. - Young and Tim J. Hudson created while they were working for C2Net until - summer 1998. - [The OpenSSL Project] - - - Changes between 0.9.0b and 0.9.1b [not released] - - *) Updated a few CA certificates under certs/ - [Eric A. Young] - - *) Changed some BIGNUM api stuff. - [Eric A. Young] - - *) Various platform ports: OpenBSD, Ultrix, IRIX 64bit, NetBSD, - DGUX x86, Linux Alpha, etc. - [Eric A. Young] - - *) New COMP library [crypto/comp/] for SSL Record Layer Compression: - RLE (dummy implemented) and ZLIB (really implemented when ZLIB is - available). - [Eric A. Young] - - *) Add -strparse option to asn1pars program which parses nested - binary structures - [Dr Stephen Henson ] - - *) Added "oid_file" to ssleay.cnf for "ca" and "req" programs. - [Eric A. Young] - - *) DSA fix for "ca" program. - [Eric A. Young] - - *) Added "-genkey" option to "dsaparam" program. - [Eric A. Young] - - *) Added RIPE MD160 (rmd160) message digest. - [Eric A. Young] - - *) Added -a (all) option to "ssleay version" command. - [Eric A. Young] - - *) Added PLATFORM define which is the id given to Configure. - [Eric A. Young] - - *) Added MemCheck_XXXX functions to crypto/mem.c for memory checking. - [Eric A. Young] - - *) Extended the ASN.1 parser routines. - [Eric A. Young] - - *) Extended BIO routines to support REUSEADDR, seek, tell, etc. - [Eric A. Young] - - *) Added a BN_CTX to the BN library. - [Eric A. Young] - - *) Fixed the weak key values in DES library - [Eric A. Young] - - *) Changed API in EVP library for cipher aliases. - [Eric A. Young] - - *) Added support for RC2/64bit cipher. - [Eric A. Young] - - *) Converted the lhash library to the crypto/mem.c functions. - [Eric A. Young] - - *) Added more recognized ASN.1 object ids. - [Eric A. Young] - - *) Added more RSA padding checks for SSL/TLS. - [Eric A. Young] - - *) Added BIO proxy/filter functionality. - [Eric A. Young] - - *) Added extra_certs to SSL_CTX which can be used - send extra CA certificates to the client in the CA cert chain sending - process. It can be configured with SSL_CTX_add_extra_chain_cert(). - [Eric A. Young] - - *) Now Fortezza is denied in the authentication phase because - this is key exchange mechanism is not supported by SSLeay at all. - [Eric A. Young] - - *) Additional PKCS1 checks. - [Eric A. Young] - - *) Support the string "TLSv1" for all TLS v1 ciphers. - [Eric A. Young] - - *) Added function SSL_get_ex_data_X509_STORE_CTX_idx() which gives the - ex_data index of the SSL context in the X509_STORE_CTX ex_data. - [Eric A. Young] - - *) Fixed a few memory leaks. - [Eric A. Young] - - *) Fixed various code and comment typos. - [Eric A. Young] - - *) A minor bug in ssl/s3_clnt.c where there would always be 4 0 - bytes sent in the client random. - [Edward Bishop ] - diff --git a/3rdparty/openssl-1.0.0d/CHANGES.SSLeay b/3rdparty/openssl-1.0.0d/CHANGES.SSLeay deleted file mode 100755 index ca5cd72976..0000000000 --- a/3rdparty/openssl-1.0.0d/CHANGES.SSLeay +++ /dev/null @@ -1,968 +0,0 @@ -This file contains the changes for the SSLeay library up to version -0.9.0b. For later changes, see the file "CHANGES". - - SSLeay CHANGES - ______________ - -Changes between 0.8.x and 0.9.0b - -10-Apr-1998 - -I said the next version would go out at easter, and so it shall. -I expect a 0.9.1 will follow with portability fixes in the next few weeks. - -This is a quick, meet the deadline. Look to ssl-users for comments on what -is new etc. - -eric (about to go bushwalking for the 4 day easter break :-) - -16-Mar-98 - - Patch for Cray T90 from Wayne Schroeder - - Lots and lots of changes - -29-Jan-98 - - ASN1_BIT_STRING_set_bit()/ASN1_BIT_STRING_get_bit() from - Goetz Babin-Ebell . - - SSL_version() now returns SSL2_VERSION, SSL3_VERSION or - TLS1_VERSION. - -7-Jan-98 - - Finally reworked the cipher string to ciphers again, so it - works correctly - - All the app_data stuff is now ex_data with funcion calls to access. - The index is supplied by a function and 'methods' can be setup - for the types that are called on XXX_new/XXX_free. This lets - applications get notified on creation and destruction. Some of - the RSA methods could be implemented this way and I may do so. - - Oh yes, SSL under perl5 is working at the basic level. - -15-Dec-97 - - Warning - the gethostbyname cache is not fully thread safe, - but it should work well enough. - - Major internal reworking of the app_data stuff. More functions - but if you were accessing ->app_data directly, things will - stop working. - - The perlv5 stuff is working. Currently on message digests, - ciphers and the bignum library. - -9-Dec-97 - - Modified re-negotiation so that server initated re-neg - will cause a SSL_read() to return -1 should retry. - The danger otherwise was that the server and the - client could end up both trying to read when using non-blocking - sockets. - -4-Dec-97 - - Lots of small changes - - Fix for binaray mode in Windows for the FILE BIO, thanks to - Bob Denny - -17-Nov-97 - - Quite a few internal cleanups, (removal of errno, and using macros - defined in e_os.h). - - A bug in ca.c, pointed out by yasuyuki-ito@d-cruise.co.jp, where - the automactic naming out output files was being stuffed up. - -29-Oct-97 - - The Cast5 cipher has been added. MD5 and SHA-1 are now in assember - for x86. - -21-Oct-97 - - Fixed a bug in the BIO_gethostbyname() cache. - -15-Oct-97 - - cbc mode for blowfish/des/3des is now in assember. Blowfish asm - has also been improved. At this point in time, on the pentium, - md5 is %80 faster, the unoptimesed sha-1 is %79 faster, - des-cbc is %28 faster, des-ede3-cbc is %9 faster and blowfish-cbc - is %62 faster. - -12-Oct-97 - - MEM_BUF_grow() has been fixed so that it always sets the buf->length - to the value we are 'growing' to. Think of MEM_BUF_grow() as the - way to set the length value correctly. - -10-Oct-97 - - I now hash for certificate lookup on the raw DER encoded RDN (md5). - This breaks things again :-(. This is efficent since I cache - the DER encoding of the RDN. - - The text DN now puts in the numeric OID instead of UNKNOWN. - - req can now process arbitary OIDs in the config file. - - I've been implementing md5 in x86 asm, much faster :-). - - Started sha1 in x86 asm, needs more work. - - Quite a few speedups in the BN stuff. RSA public operation - has been made faster by caching the BN_MONT_CTX structure. - The calulating of the Ai where A*Ai === 1 mod m was rather - expensive. Basically a 40-50% speedup on public operations. - The RSA speedup is now 15% on pentiums and %20 on pentium - pro. - -30-Sep-97 - - After doing some profiling, I added x86 adm for bn_add_words(), - which just adds 2 arrays of longs together. A %10 speedup - for 512 and 1024 bit RSA on the pentium pro. - -29-Sep-97 - - Converted the x86 bignum assembler to us the perl scripts - for generation. - -23-Sep-97 - - If SSL_set_session() is passed a NULL session, it now clears the - current session-id. - -22-Sep-97 - - Added a '-ss_cert file' to apps/ca.c. This will sign selfsigned - certificates. - - Bug in crypto/evp/encode.c where by decoding of 65 base64 - encoded lines, one line at a time (via a memory BIO) would report - EOF after the first line was decoded. - - Fix in X509_find_by_issuer_and_serial() from - Dr Stephen Henson - -19-Sep-97 - - NO_FP_API and NO_STDIO added. - - Put in sh config command. It auto runs Configure with the correct - parameters. - -18-Sep-97 - - Fix x509.c so if a DSA cert has different parameters to its parent, - they are left in place. Not tested yet. - -16-Sep-97 - - ssl_create_cipher_list() had some bugs, fixes from - Patrick Eisenacher - - Fixed a bug in the Base64 BIO, where it would return 1 instead - of -1 when end of input was encountered but should retry. - Basically a Base64/Memory BIO interaction problem. - - Added a HMAC set of functions in preporarion for TLS work. - -15-Sep-97 - - Top level makefile tweak - Cameron Simpson - - Prime generation spead up %25 (512 bit prime, pentium pro linux) - by using montgomery multiplication in the prime number test. - -11-Sep-97 - - Ugly bug in ssl3_write_bytes(). Basically if application land - does a SSL_write(ssl,buf,len) where len > 16k, the SSLv3 write code - did not check the size and tried to copy the entire buffer. - This would tend to cause memory overwrites since SSLv3 has - a maximum packet size of 16k. If your program uses - buffers <= 16k, you would probably never see this problem. - - Fixed a few errors that were cause by malloc() not returning - 0 initialised memory.. - - SSL_OP_NETSCAPE_CA_DN_BUG was being switched on when using - SSL_CTX_set_options(ssl_ctx,SSL_OP_ALL); which was a bad thing - since this flags stops SSLeay being able to handle client - cert requests correctly. - -08-Sep-97 - - SSL_SESS_CACHE_NO_INTERNAL_LOOKUP option added. When switched - on, the SSL server routines will not use a SSL_SESSION that is - held in it's cache. This in intended to be used with the session-id - callbacks so that while the session-ids are still stored in the - cache, the decision to use them and how to look them up can be - done by the callbacks. The are the 'new', 'get' and 'remove' - callbacks. This can be used to determine the session-id - to use depending on information like which port/host the connection - is coming from. Since the are also SSL_SESSION_set_app_data() and - SSL_SESSION_get_app_data() functions, the application can hold - information against the session-id as well. - -03-Sep-97 - - Added lookup of CRLs to the by_dir method, - X509_load_crl_file() also added. Basically it means you can - lookup CRLs via the same system used to lookup certificates. - - Changed things so that the X509_NAME structure can contain - ASN.1 BIT_STRINGS which is required for the unique - identifier OID. - - Fixed some problems with the auto flushing of the session-id - cache. It was not occuring on the server side. - -02-Sep-97 - - Added SSL_CTX_sess_cache_size(SSL_CTX *ctx,unsigned long size) - which is the maximum number of entries allowed in the - session-id cache. This is enforced with a simple FIFO list. - The default size is 20*1024 entries which is rather large :-). - The Timeout code is still always operating. - -01-Sep-97 - - Added an argument to all the 'generate private key/prime` - callbacks. It is the last parameter so this should not - break existing code but it is needed for C++. - - Added the BIO_FLAGS_BASE64_NO_NL flag for the BIO_f_base64() - BIO. This lets the BIO read and write base64 encoded data - without inserting or looking for '\n' characters. The '-A' - flag turns this on when using apps/enc.c. - - RSA_NO_PADDING added to help BSAFE functionality. This is a - very dangerous thing to use, since RSA private key - operations without random padding bytes (as PKCS#1 adds) can - be attacked such that the private key can be revealed. - - ASN.1 bug and rc2-40-cbc and rc4-40 added by - Dr Stephen Henson - -31-Aug-97 (stuff added while I was away) - - Linux pthreads by Tim Hudson (tjh@cryptsoft.com). - - RSA_flags() added allowing bypass of pub/priv match check - in ssl/ssl_rsa.c - Tim Hudson. - - A few minor bugs. - -SSLeay 0.8.1 released. - -19-Jul-97 - - Server side initated dynamic renegotiation is broken. I will fix - it when I get back from holidays. - -15-Jul-97 - - Quite a few small changes. - - INVALID_SOCKET usage cleanups from Alex Kiernan - -09-Jul-97 - - Added 2 new values to the SSL info callback. - SSL_CB_START which is passed when the SSL protocol is started - and SSL_CB_DONE when it has finished sucsessfully. - -08-Jul-97 - - Fixed a few bugs problems in apps/req.c and crypto/asn1/x_pkey.c - that related to DSA public/private keys. - - Added all the relevent PEM and normal IO functions to support - reading and writing RSAPublic keys. - - Changed makefiles to use ${AR} instead of 'ar r' - -07-Jul-97 - - Error in ERR_remove_state() that would leave a dangling reference - to a free()ed location - thanks to Alex Kiernan - - s_client now prints the X509_NAMEs passed from the server - when requesting a client cert. - - Added a ssl->type, which is one of SSL_ST_CONNECT or - SSL_ST_ACCEPT. I had to add it so I could tell if I was - a connect or an accept after the handshake had finished. - - SSL_get_client_CA_list(SSL *s) now returns the CA names - passed by the server if called by a client side SSL. - -05-Jul-97 - - Bug in X509_NAME_get_text_by_OBJ(), looking starting at index - 0, not -1 :-( Fix from Tim Hudson (tjh@cryptsoft.com). - -04-Jul-97 - - Fixed some things in X509_NAME_add_entry(), thanks to - Matthew Donald . - - I had a look at the cipher section and though that it was a - bit confused, so I've changed it. - - I was not setting up the RC4-64-MD5 cipher correctly. It is - a MS special that appears in exported MS Money. - - Error in all my DH ciphers. Section 7.6.7.3 of the SSLv3 - spec. I was missing the two byte length header for the - ClientDiffieHellmanPublic value. This is a packet sent from - the client to the server. The SSL_OP_SSLEAY_080_CLIENT_DH_BUG - option will enable SSLeay server side SSLv3 accept either - the correct or my 080 packet format. - - Fixed a few typos in crypto/pem.org. - -02-Jul-97 - - Alias mapping for EVP_get_(digest|cipher)byname is now - performed before a lookup for actual cipher. This means - that an alias can be used to 're-direct' a cipher or a - digest. - - ASN1_read_bio() had a bug that only showed up when using a - memory BIO. When EOF is reached in the memory BIO, it is - reported as a -1 with BIO_should_retry() set to true. - -01-Jul-97 - - Fixed an error in X509_verify_cert() caused by my - miss-understanding how 'do { contine } while(0);' works. - Thanks to Emil Sit for educating me :-) - -30-Jun-97 - - Base64 decoding error. If the last data line did not end with - a '=', sometimes extra data would be returned. - - Another 'cut and paste' bug in x509.c related to setting up the - STDout BIO. - -27-Jun-97 - - apps/ciphers.c was not printing due to an editing error. - - Alex Kiernan send in a nice fix for - a library build error in util/mk1mf.pl - -26-Jun-97 - - Still did not have the auto 'experimental' code removal - script correct. - - A few header tweaks for Watcom 11.0 under Win32 from - Rolf Lindemann - - 0 length OCTET_STRING bug in asn1_parse - - A minor fix with an non-existent function in the MS .def files. - - A few changes to the PKCS7 stuff. - -25-Jun-97 - SSLeay 0.8.0 finally it gets released. - -24-Jun-97 - Added a SSL_OP_EPHEMERAL_RSA option which causes all SSLv3 RSA keys to - use a temporary RSA key. This is experimental and needs some more work. - Fixed a few Win16 build problems. - -23-Jun-97 - SSLv3 bug. I was not doing the 'lookup' of the CERT structure - correctly. I was taking the SSL->ctx->default_cert when I should - have been using SSL->cert. The bug was in ssl/s3_srvr.c - -20-Jun-97 - X509_ATTRIBUTES were being encoded wrongly by apps/reg.c and the - rest of the library. Even though I had the code required to do - it correctly, apps/req.c was doing the wrong thing. I have fixed - and tested everything. - - Missing a few #ifdef FIONBIO sections in crypto/bio/bss_acpt.c. - -19-Jun-97 - Fixed a bug in the SSLv2 server side first packet handling. When - using the non-blocking test BIO, the ssl->s2->first_packet flag - was being reset when a would-block failure occurred when reading - the first 5 bytes of the first packet. This caused the checking - logic to run at the wrong time and cause an error. - - Fixed a problem with specifying cipher. If RC4-MD5 were used, - only the SSLv3 version would be picked up. Now this will pick - up both SSLv2 and SSLv3 versions. This required changing the - SSL_CIPHER->mask values so that they only mask the ciphers, - digests, authentication, export type and key-exchange algorithms. - - I found that when a SSLv23 session is established, a reused - session, of type SSLv3 was attempting to write the SSLv2 - ciphers, which were invalid. The SSL_METHOD->put_cipher_by_char - method has been modified so it will only write out cipher which - that method knows about. - - - Changes between 0.8.0 and 0.8.1 - - *) Mostly bug fixes. - There is an Ephemeral DH cipher problem which is fixed. - - SSLeay 0.8.0 - -This version of SSLeay has quite a lot of things different from the -previous version. - -Basically check all callback parameters, I will be producing documentation -about how to use things in th future. Currently I'm just getting 080 out -the door. Please not that there are several ways to do everything, and -most of the applications in the apps directory are hybrids, some using old -methods and some using new methods. - -Have a look in demos/bio for some very simple programs and -apps/s_client.c and apps/s_server.c for some more advanced versions. -Notes are definitly needed but they are a week or so away. - -Anyway, some quick nots from Tim Hudson (tjh@cryptsoft.com) ---- -Quick porting notes for moving from SSLeay-0.6.x to SSLeay-0.8.x to -get those people that want to move to using the new code base off to -a quick start. - -Note that Eric has tidied up a lot of the areas of the API that were -less than desirable and renamed quite a few things (as he had to break -the API in lots of places anyrate). There are a whole pile of additional -functions for making dealing with (and creating) certificates a lot -cleaner. - -01-Jul-97 -Tim Hudson -tjh@cryptsoft.com - ----8<--- - -To maintain code that uses both SSLeay-0.6.x and SSLeay-0.8.x you could -use something like the following (assuming you #include "crypto.h" which -is something that you really should be doing). - -#if SSLEAY_VERSION_NUMBER >= 0x0800 -#define SSLEAY8 -#endif - -buffer.h -> splits into buffer.h and bio.h so you need to include bio.h - too if you are working with BIO internal stuff (as distinct - from simply using the interface in an opaque manner) - -#include "bio.h" - required along with "buffer.h" if you write - your own BIO routines as the buffer and bio - stuff that was intermixed has been separated - out - -envelope.h -> evp.h (which should have been done ages ago) - -Initialisation ... don't forget these or you end up with code that -is missing the bits required to do useful things (like ciphers): - -SSLeay_add_ssl_algorithms() -(probably also want SSL_load_error_strings() too but you should have - already had that call in place) - -SSL_CTX_new() - requires an extra method parameter - SSL_CTX_new(SSLv23_method()) - SSL_CTX_new(SSLv2_method()) - SSL_CTX_new(SSLv3_method()) - - OR to only have the server or the client code - SSL_CTX_new(SSLv23_server_method()) - SSL_CTX_new(SSLv2_server_method()) - SSL_CTX_new(SSLv3_server_method()) - or - SSL_CTX_new(SSLv23_client_method()) - SSL_CTX_new(SSLv2_client_method()) - SSL_CTX_new(SSLv3_client_method()) - -SSL_set_default_verify_paths() ... renamed to the more appropriate -SSL_CTX_set_default_verify_paths() - -If you want to use client certificates then you have to add in a bit -of extra stuff in that a SSLv3 server sends a list of those CAs that -it will accept certificates from ... so you have to provide a list to -SSLeay otherwise certain browsers will not send client certs. - -SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(s_cert_file)); - - -X509_NAME_oneline(X) -> X509_NAME_oneline(X,NULL,0) - or provide a buffer and size to copy the - result into - -X509_add_cert -> X509_STORE_add_cert (and you might want to read the - notes on X509_NAME structure changes too) - - -VERIFICATION CODE -================= - -The codes have all be renamed from VERIFY_ERR_* to X509_V_ERR_* to -more accurately reflect things. - -The verification callback args are now packaged differently so that -extra fields for verification can be added easily in future without -having to break things by adding extra parameters each release :-) - -X509_cert_verify_error_string -> X509_verify_cert_error_string - - -BIO INTERNALS -============= - -Eric has fixed things so that extra flags can be introduced in -the BIO layer in future without having to play with all the BIO -modules by adding in some macros. - -The ugly stuff using - b->flags ~= (BIO_FLAGS_RW|BIO_FLAGS_SHOULD_RETRY) -becomes - BIO_clear_retry_flags(b) - - b->flags |= (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY) -becomes - BIO_set_retry_read(b) - -Also ... BIO_get_retry_flags(b), BIO_set_flags(b) - - - -OTHER THINGS -============ - -X509_NAME has been altered so that it isn't just a STACK ... the STACK -is now in the "entries" field ... and there are a pile of nice functions -for getting at the details in a much cleaner manner. - -SSL_CTX has been altered ... "cert" is no longer a direct member of this -structure ... things are now down under "cert_store" (see x509_vfy.h) and -things are no longer in a CERTIFICATE_CTX but instead in a X509_STORE. -If your code "knows" about this level of detail then it will need some -surgery. - -If you depending on the incorrect spelling of a number of the error codes -then you will have to change your code as these have been fixed. - -ENV_CIPHER "type" got renamed to "nid" and as that is what it actually -has been all along so this makes things clearer. -ify_cert_error_string(ctx->error)); - -SSL_R_NO_CIPHER_WE_TRUST -> SSL_R_NO_CIPHER_LIST - and SSL_R_REUSE_CIPHER_LIST_NOT_ZERO - - - - Changes between 0.7.x and 0.8.0 - - *) There have been lots of changes, mostly the addition of SSLv3. - There have been many additions from people and amongst - others, C2Net has assisted greatly. - - Changes between 0.7.x and 0.7.x - - *) Internal development version only - -SSLeay 0.6.6 13-Jan-1997 - -The main additions are - -- assember for x86 DES improvments. - From 191,000 per second on a pentium 100, I now get 281,000. The inner - loop and the IP/FP modifications are from - Svend Olaf Mikkelsen . Many thanks for his - contribution. -- The 'DES macros' introduced in 0.6.5 now have 3 types. - DES_PTR1, DES_PTR2 and 'normal'. As per before, des_opts reports which - is best and there is a summery of mine in crypto/des/options.txt -- A few bug fixes. -- Added blowfish. It is not used by SSL but all the other stuff that - deals with ciphers can use it in either ecb, cbc, cfb64 or ofb64 modes. - There are 3 options for optimising Blowfish. BF_PTR, BF_PTR2 and 'normal'. - BF_PTR2 is pentium/x86 specific. The correct option is setup in - the 'Configure' script. -- There is now a 'get client certificate' callback which can be - 'non-blocking'. If more details are required, let me know. It will - documented more in SSLv3 when I finish it. -- Bug fixes from 0.6.5 including the infamous 'ca' bug. The 'make test' - now tests the ca program. -- Lots of little things modified and tweaked. - - SSLeay 0.6.5 - -After quite some time (3 months), the new release. I have been very busy -for the last few months and so this is mostly bug fixes and improvments. - -The main additions are - -- assember for x86 DES. For all those gcc based systems, this is a big - improvement. From 117,000 DES operation a second on a pentium 100, - I now get 191,000. I have also reworked the C version so it - now gives 148,000 DESs per second. -- As mentioned above, the inner DES macros now have some more variant that - sometimes help, sometimes hinder performance. There are now 3 options - DES_PTR (ptr vs array lookup), DES_UNROLL (full vs partial loop unrolling) - and DES_RISC (a more register intensive version of the inner macro). - The crypto/des/des_opts.c program, when compiled and run, will give - an indication of the correct options to use. -- The BIO stuff has been improved. Read doc/bio.doc. There are now - modules for encryption and base64 encoding and a BIO_printf() function. -- The CA program will accept simple one line X509v3 extensions in the - ssleay.cnf file. Have a look at the example. Currently this just - puts the text into the certificate as an OCTET_STRING so currently - the more advanced X509v3 data types are not handled but this is enough - for the netscape extensions. -- There is the start of a nicer higher level interface to the X509 - strucutre. -- Quite a lot of bug fixes. -- CRYPTO_malloc_init() (or CRYPTO_set_mem_functions()) can be used - to define the malloc(), free() and realloc() routines to use - (look in crypto/crypto.h). This is mostly needed for Windows NT/95 when - using DLLs and mixing CRT libraries. - -In general, read the 'VERSION' file for changes and be aware that some of -the new stuff may not have been tested quite enough yet, so don't just plonk -in SSLeay 0.6.5 when 0.6.4 used to work and expect nothing to break. - -SSLeay 0.6.4 30/08/96 eay - -I've just finished some test builds on Windows NT, Windows 3.1, Solaris 2.3, -Solaris 2.5, Linux, IRIX, HPUX 10 and everthing seems to work :-). - -The main changes in this release - -- Thread safe. have a read of doc/threads.doc and play in the mt directory. - For anyone using 0.6.3 with threads, I found 2 major errors so consider - moving to 0.6.4. I have a test program that builds under NT and - solaris. -- The get session-id callback has changed. Have a read of doc/callback.doc. -- The X509_cert_verify callback (the SSL_verify callback) now - has another argument. Have a read of doc/callback.doc -- 'ca -preserve', sign without re-ordering the DN. Not tested much. -- VMS support. -- Compile time memory leak detection can now be built into SSLeay. - Read doc/memory.doc -- CONF routines now understand '\', '\n', '\r' etc. What this means is that - the SPKAC object mentioned in doc/ns-ca.doc can be on multiple lines. -- 'ssleay ciphers' added, lists the default cipher list for SSLeay. -- RC2 key setup is now compatable with Netscape. -- Modifed server side of SSL implementation, big performance difference when - using session-id reuse. - -0.6.3 - -Bug fixes and the addition of some nice stuff to the 'ca' program. -Have a read of doc/ns-ca.doc for how hit has been modified so -it can be driven from a CGI script. The CGI script is not provided, -but that is just being left as an excersize for the reader :-). - -0.6.2 - -This is most bug fixes and functionality improvements. - -Additions are -- More thread debugging patches, the thread stuff is still being - tested, but for those keep to play with stuff, have a look in - crypto/cryptlib.c. The application needs to define 1 (or optionaly - a second) callback that is used to implement locking. Compiling - with LOCK_DEBUG spits out lots of locking crud :-). - This is what I'm currently working on. -- SSL_CTX_set_default_passwd_cb() can be used to define the callback - function used in the SSL*_file() functions used to load keys. I was - always of the opinion that people should call - PEM_read_RSAPrivateKey() and pass the callback they want to use, but - it appears they just want to use the SSL_*_file() function() :-(. -- 'enc' now has a -kfile so a key can be read from a file. This is - mostly used so that the passwd does not appear when using 'ps', - which appears imposible to stop under solaris. -- X509v3 certificates now work correctly. I even have more examples - in my tests :-). There is now a X509_EXTENSION type that is used in - X509v3 certificates and CRLv2. -- Fixed that signature type error :-( -- Fixed quite a few potential memory leaks and problems when reusing - X509, CRL and REQ structures. -- EVP_set_pw_prompt() now sets the library wide default password - prompt. -- The 'pkcs7' command will now, given the -print_certs flag, output in - pem format, all certificates and CRL contained within. This is more - of a pre-emtive thing for the new verisign distribution method. I - should also note, that this also gives and example in code, of how - to do this :-), or for that matter, what is involved in going the - other way (list of certs and crl -> pkcs7). -- Added RSA's DESX to the DES library. It is also available via the - EVP_desx_cbc() method and via 'enc desx'. - -SSLeay 0.6.1 - -The main functional changes since 0.6.0 are as follows -- Bad news, the Microsoft 060 DLL's are not compatable, but the good news is - that from now on, I'll keep the .def numbers the same so they will be. -- RSA private key operations are about 2 times faster that 0.6.0 -- The SSL_CTX now has more fields so default values can be put against - it. When an SSL structure is created, these default values are used - but can be overwritten. There are defaults for cipher, certificate, - private key, verify mode and callback. This means SSL session - creation can now be - ssl=SSL_new() - SSL_set_fd(ssl,sock); - SSL_accept(ssl) - .... - All the other uglyness with having to keep a global copy of the - private key and certificate/verify mode in the server is now gone. -- ssl/ssltest.c - one process talking SSL to its self for testing. -- Storage of Session-id's can be controled via a session_cache_mode - flag. There is also now an automatic default flushing of - old session-id's. -- The X509_cert_verify() function now has another parameter, this - should not effect most people but it now means that the reason for - the failure to verify is now available via SSL_get_verify_result(ssl). - You don't have to use a global variable. -- SSL_get_app_data() and SSL_set_app_data() can be used to keep some - application data against the SSL structure. It is upto the application - to free the data. I don't use it, but it is available. -- SSL_CTX_set_cert_verify_callback() can be used to specify a - verify callback function that completly replaces my certificate - verification code. Xcert should be able to use this :-). - The callback is of the form int app_verify_callback(arg,ssl,cert). - This needs to be documented more. -- I have started playing with shared library builds, have a look in - the shlib directory. It is very simple. If you need a numbered - list of functions, have a look at misc/crypto.num and misc/ssl.num. -- There is some stuff to do locking to make the library thread safe. - I have only started this stuff and have not finished. If anyone is - keen to do so, please send me the patches when finished. - -So I have finally made most of the additions to the SSL interface that -I thought were needed. - -There will probably be a pause before I make any non-bug/documentation -related changes to SSLeay since I'm feeling like a bit of a break. - -eric - 12 Jul 1996 -I saw recently a comment by some-one that we now seem to be entering -the age of perpetual Beta software. -Pioneered by packages like linux but refined to an art form by -netscape. - -I too wish to join this trend with the anouncement of SSLeay 0.6.0 :-). - -There are quite a large number of sections that are 'works in -progress' in this package. I will also list the major changes and -what files you should read. - -BIO - this is the new IO structure being used everywhere in SSLeay. I -started out developing this because of microsoft, I wanted a mechanism -to callback to the application for all IO, so Windows 3.1 DLL -perversion could be hidden from me and the 15 different ways to write -to a file under NT would also not be dictated by me at library build -time. What the 'package' is is an API for a data structure containing -functions. IO interfaces can be written to conform to the -specification. This in not intended to hide the underlying data type -from the application, but to hide it from SSLeay :-). -I have only really finished testing the FILE * and socket/fd modules. -There are also 'filter' BIO's. Currently I have only implemented -message digests, and it is in use in the dgst application. This -functionality will allow base64/encrypto/buffering modules to be -'push' into a BIO without it affecting the semantics. I'm also -working on an SSL BIO which will hide the SSL_accept()/SLL_connet() -from an event loop which uses the interface. -It is also possible to 'attach' callbacks to a BIO so they get called -before and after each operation, alowing extensive debug output -to be generated (try running dgst with -d). - -Unfortunaly in the conversion from 0.5.x to 0.6.0, quite a few -functions that used to take FILE *, now take BIO *. -The wrappers are easy to write - -function_fp(fp,x) -FILE *fp; - { - BIO *b; - int ret; - - if ((b=BIO_new(BIO_s_file())) == NULL) error..... - BIO_set_fp(b,fp,BIO_NOCLOSE); - ret=function_bio(b,x); - BIO_free(b); - return(ret); - } -Remember, there are no functions that take FILE * in SSLeay when -compiled for Windows 3.1 DLL's. - --- -I have added a general EVP_PKEY type that can hold a public/private -key. This is now what is used by the EVP_ functions and is passed -around internally. I still have not done the PKCS#8 stuff, but -X509_PKEY is defined and waiting :-) - --- -For a full function name listings, have a look at ms/crypt32.def and -ms/ssl32.def. These are auto-generated but are complete. -Things like ASN1_INTEGER_get() have been added and are in here if you -look. I have renamed a few things, again, have a look through the -function list and you will probably find what you are after. I intend -to at least put a one line descrition for each one..... - --- -Microsoft - thats what this release is about, read the MICROSOFT file. - --- -Multi-threading support. I have started hunting through the code and -flaging where things need to be done. In a state of work but high on -the list. - --- -For random numbers, edit e_os.h and set DEVRANDOM (it's near the top) -be be you random data device, otherwise 'RFILE' in e_os.h -will be used, in your home directory. It will be updated -periodically. The environment variable RANDFILE will override this -choice and read/write to that file instead. DEVRANDOM is used in -conjunction to the RFILE/RANDFILE. If you wish to 'seed' the random -number generator, pick on one of these files. - --- - -The list of things to read and do - -dgst -d -s_client -state (this uses a callback placed in the SSL state loop and - will be used else-where to help debug/monitor what - is happening.) - -doc/why.doc -doc/bio.doc <- hmmm, needs lots of work. -doc/bss_file.doc <- one that is working :-) -doc/session.doc <- it has changed -doc/speed.doc - also play with ssleay version -a. I have now added a SSLeay() - function that returns a version number, eg 0600 for this release - which is primarily to be used to check DLL version against the - application. -util/* Quite a few will not interest people, but some may, like - mk1mf.pl, mkdef.pl, -util/do_ms.sh - -try -cc -Iinclude -Icrypto -c crypto/crypto.c -cc -Iinclude -Issl -c ssl/ssl.c -You have just built the SSLeay libraries as 2 object files :-) - -Have a general rummage around in the bin stall directory and look at -what is in there, like CA.sh and c_rehash - -There are lots more things but it is 12:30am on a Friday night and I'm -heading home :-). - -eric 22-Jun-1996 -This version has quite a few major bug fixes and improvements. It DOES NOT -do SSLv3 yet. - -The main things changed -- A Few days ago I added the s_mult application to ssleay which is - a demo of an SSL server running in an event loop type thing. - It supports non-blocking IO, I have finally gotten it right, SSL_accept() - can operate in non-blocking IO mode, look at the code to see how :-). - Have a read of doc/s_mult as well. This program leaks memory and - file descriptors everywhere but I have not cleaned it up yet. - This is a demo of how to do non-blocking IO. -- The SSL session management has been 'worked over' and there is now - quite an expansive set of functions to manipulate them. Have a read of - doc/session.doc for some-things I quickly whipped up about how it now works. - This assume you know the SSLv2 protocol :-) -- I can now read/write the netscape certificate format, use the - -inform/-outform 'net' options to the x509 command. I have not put support - for this type in the other demo programs, but it would be easy to add. -- asn1parse and 'enc' have been modified so that when reading base64 - encoded files (pem format), they do not require '-----BEGIN' header lines. - The 'enc' program had a buffering bug fixed, it can be used as a general - base64 -> binary -> base64 filter by doing 'enc -a -e' and 'enc -a -d' - respecivly. Leaving out the '-a' flag in this case makes the 'enc' command - into a form of 'cat'. -- The 'x509' and 'req' programs have been fixed and modified a little so - that they generate self-signed certificates correctly. The test - script actually generates a 'CA' certificate and then 'signs' a - 'user' certificate. Have a look at this shell script (test/sstest) - to see how things work, it tests most possible combinations of what can - be done. -- The 'SSL_set_pref_cipher()' function has been 'fixed' and the prefered name - of SSL_set_cipher_list() is now the correct API (stops confusion :-). - If this function is used in the client, only the specified ciphers can - be used, with preference given to the order the ciphers were listed. - For the server, if this is used, only the specified ciphers will be used - to accept connections. If this 'option' is not used, a default set of - ciphers will be used. The SSL_CTX_set_cipher_list(SSL_CTX *ctx) sets this - list for all ciphers started against the SSL_CTX. So the order is - SSL cipher_list, if not present, SSL_CTX cipher list, if not - present, then the library default. - What this means is that normally ciphers like - NULL-MD5 will never be used. The only way this cipher can be used - for both ends to specify to use it. - To enable or disable ciphers in the library at build time, modify the - first field for the cipher in the ssl_ciphers array in ssl/ssl_lib.c. - This file also contains the 'pref_cipher' list which is the default - cipher preference order. -- I'm not currently sure if the 'rsa -inform net' and the 'rsa -outform net' - options work. They should, and they enable loading and writing the - netscape rsa private key format. I will be re-working this section of - SSLeay for the next version. What is currently in place is a quick and - dirty hack. -- I've re-written parts of the bignum library. This gives speedups - for all platforms. I now provide assembler for use under Windows NT. - I have not tested the Windows 3.1 assembler but it is quite simple code. - This gives RSAprivate_key operation encryption times of 0.047s (512bit key) - and 0.230s (1024bit key) on a pentium 100 which I consider reasonable. - Basically the times available under linux/solaris x86 can be achieve under - Windows NT. I still don't know how these times compare to RSA's BSAFE - library but I have been emailing with people and with their help, I should - be able to get my library's quite a bit faster still (more algorithm changes). - The object file crypto/bn/asm/x86-32.obj should be used when linking - under NT. -- 'make makefile.one' in the top directory will generate a single makefile - called 'makefile.one' This makefile contains no perl references and - will build the SSLeay library into the 'tmp' and 'out' directories. - util/mk1mf.pl >makefile.one is how this makefile is - generated. The mk1mf.pl command take several option to generate the - makefile for use with cc, gcc, Visual C++ and Borland C++. This is - still under development. I have only build .lib's for NT and MSDOS - I will be working on this more. I still need to play with the - correct compiler setups for these compilers and add some more stuff but - basically if you just want to compile the library - on a 'non-unix' platform, this is a very very good file to start with :-). - Have a look in the 'microsoft' directory for my current makefiles. - I have not yet modified things to link with sockets under Windows NT. - You guys should be able to do this since this is actually outside of the - SSLeay scope :-). I will be doing it for myself soon. - util/mk1mf.pl takes quite a few options including no-rc, rsaref and no-sock - to build without RC2/RC4, to require RSAref for linking, and to - build with no socket code. - -- Oh yes, the cipher that was reported to be compatible with RSA's RC2 cipher - that was posted to sci.crypt has been added to the library and SSL. - I take the view that if RC2 is going to be included in a standard, - I'll include the cipher to make my package complete. - There are NO_RC2, NO_RC4 and NO_IDEA macros to remove these ciphers - at compile time. I have not tested this recently but it should all work - and if you are in the USA and don't want RSA threatening to sue you, - you could probably remove the RC4/RC2 code inside these sections. - I may in the future include a perl script that does this code - removal automatically for those in the USA :-). -- I have removed all references to sed in the makefiles. So basically, - the development environment requires perl and sh. The build environment - does not (use the makefile.one makefile). - The Configure script still requires perl, this will probably stay that way - since I have perl for Windows NT :-). - -eric (03-May-1996) - -PS Have a look in the VERSION file for more details on the changes and - bug fixes. -I have fixed a few bugs, added alpha and x86 assembler and generally cleaned -things up. This version will be quite stable, mostly because I'm on -holidays until 10-March-1996. For any problems in the interum, send email -to Tim Hudson . - -SSLeay 0.5.0 - -12-12-95 -This is going out before it should really be released. - -I leave for 11 weeks holidays on the 22-12-95 and so I either sit on -this for 11 weeks or get things out. It is still going to change a -lot in the next week so if you do grab this version, please test and -give me feed back ASAP, inculuding questions on how to do things with -the library. This will prompt me to write documentation so I don't -have to answer the same question again :-). - -This 'pre' release version is for people who are interested in the -library. The applications will have to be changed to use -the new version of the SSL interface. I intend to finish more -documentation before I leave but until then, look at the programs in -the apps directory. As far as code goes, it is much much nicer than -the old version. - -The current library works, has no memory leaks (as far as I can tell) -and is far more bug free that 0.4.5d. There are no global variable of -consequence (I believe) and I will produce some documentation that -tell where to look for those people that do want to do multi-threaded -stuff. - -There should be more documentation. Have a look in the -doc directory. I'll be adding more before I leave, it is a start -by mostly documents the crypto library. Tim Hudson will update -the web page ASAP. The spelling and grammar are crap but -it is better than nothing :-) - -Reasons to start playing with version 0.5.0 -- All the programs in the apps directory build into one ssleay binary. -- There is a new version of the 'req' program that generates certificate - requests, there is even documentation for this one :-) -- There is a demo certification authorithy program. Currently it will - look at the simple database and update it. It will generate CRL from - the data base. You need to edit the database by hand to revoke a - certificate, it is my aim to use perl5/Tk but I don't have time to do - this right now. It will generate the certificates but the management - scripts still need to be written. This is not a hard task. -- Things have been cleaned up alot. -- Have a look at the enc and dgst programs in the apps directory. -- It supports v3 of x509 certiticates. - - -Major things missing. -- I have been working on (and thinging about) the distributed x509 - hierachy problem. I have not had time to put my solution in place. - It will have to wait until I come back. -- I have not put in CRL checking in the certificate verification but - it would not be hard to do. I was waiting until I could generate my - own CRL (which has only been in the last week) and I don't have time - to put it in correctly. -- Montgomery multiplication need to be implemented. I know the - algorithm, just ran out of time. -- PKCS#7. I can load and write the DER version. I need to re-work - things to support BER (if that means nothing, read the ASN1 spec :-). -- Testing of the higher level digital envelope routines. I have not - played with the *_seal() and *_open() type functions. They are - written but need testing. The *_sign() and *_verify() functions are - rock solid. -- PEM. Doing this and PKCS#7 have been dependant on the distributed - x509 heirachy problem. I started implementing my ideas, got - distracted writing a CA program and then ran out of time. I provide - the functionality of RSAref at least. -- Re work the asm. code for the x86. I've changed by low level bignum - interface again, so I really need to tweak the x86 stuff. gcc is - good enough for the other boxes. - diff --git a/3rdparty/openssl-1.0.0d/Configure b/3rdparty/openssl-1.0.0d/Configure deleted file mode 100755 index 429ab2e5eb..0000000000 --- a/3rdparty/openssl-1.0.0d/Configure +++ /dev/null @@ -1,2057 +0,0 @@ -: -eval 'exec perl -S $0 ${1+"$@"}' - if $running_under_some_shell; -## -## Configure -- OpenSSL source tree configuration script -## - -require 5.000; -use strict; - -# see INSTALL for instructions. - -my $usage="Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; - -# Options: -# -# --openssldir install OpenSSL in OPENSSLDIR (Default: DIR/ssl if the -# --prefix option is given; /usr/local/ssl otherwise) -# --prefix prefix for the OpenSSL include, lib and bin directories -# (Default: the OPENSSLDIR directory) -# -# --install_prefix Additional prefix for package builders (empty by -# default). This needn't be set in advance, you can -# just as well use "make INSTALL_PREFIX=/whatever install". -# -# --with-krb5-dir Declare where Kerberos 5 lives. The libraries are expected -# to live in the subdirectory lib/ and the header files in -# include/. A value is required. -# --with-krb5-lib Declare where the Kerberos 5 libraries live. A value is -# required. -# (Default: KRB5_DIR/lib) -# --with-krb5-include Declare where the Kerberos 5 header files live. A -# value is required. -# (Default: KRB5_DIR/include) -# --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently -# supported values are "MIT" and "Heimdal". A value is required. -# -# --test-sanity Make a number of sanity checks on the data in this file. -# This is a debugging tool for OpenSSL developers. -# -# --cross-compile-prefix Add specified prefix to binutils components. -# -# no-hw-xxx do not compile support for specific crypto hardware. -# Generic OpenSSL-style methods relating to this support -# are always compiled but return NULL if the hardware -# support isn't compiled. -# no-hw do not compile support for any crypto hardware. -# [no-]threads [don't] try to create a library that is suitable for -# multithreaded applications (default is "threads" if we -# know how to do it) -# [no-]shared [don't] try to create shared libraries when supported. -# no-asm do not use assembler -# no-dso do not compile in any native shared-library methods. This -# will ensure that all methods just return NULL. -# no-krb5 do not compile in any KRB5 library or code. -# [no-]zlib [don't] compile support for zlib compression. -# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared -# library and will be loaded in run-time by the OpenSSL library. -# 386 generate 80386 code -# no-sse2 disables IA-32 SSE2 code, above option implies no-sse2 -# no- build without specified algorithm (rsa, idea, rc5, ...) -# - + compiler options are passed through -# -# DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items -# provided to stack calls. Generates unique stack functions for -# each possible stack type. -# DES_PTR use pointer lookup vs arrays in the DES in crypto/des/des_locl.h -# DES_RISC1 use different DES_ENCRYPT macro that helps reduce register -# dependancies but needs to more registers, good for RISC CPU's -# DES_RISC2 A different RISC variant. -# DES_UNROLL unroll the inner DES loop, sometimes helps, somtimes hinders. -# DES_INT use 'int' instead of 'long' for DES_LONG in crypto/des/des.h -# This is used on the DEC Alpha where long is 8 bytes -# and int is 4 -# BN_LLONG use the type 'long long' in crypto/bn/bn.h -# MD2_CHAR use 'char' instead of 'int' for MD2_INT in crypto/md2/md2.h -# MD2_LONG use 'long' instead of 'int' for MD2_INT in crypto/md2/md2.h -# IDEA_SHORT use 'short' instead of 'int' for IDEA_INT in crypto/idea/idea.h -# IDEA_LONG use 'long' instead of 'int' for IDEA_INT in crypto/idea/idea.h -# RC2_SHORT use 'short' instead of 'int' for RC2_INT in crypto/rc2/rc2.h -# RC2_LONG use 'long' instead of 'int' for RC2_INT in crypto/rc2/rc2.h -# RC4_CHAR use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h -# RC4_LONG use 'long' instead of 'int' for RC4_INT in crypto/rc4/rc4.h -# RC4_INDEX define RC4_INDEX in crypto/rc4/rc4_locl.h. This turns on -# array lookups instead of pointer use. -# RC4_CHUNK enables code that handles data aligned at long (natural CPU -# word) boundary. -# RC4_CHUNK_LL enables code that handles data aligned at long long boundary -# (intended for 64-bit CPUs running 32-bit OS). -# BF_PTR use 'pointer arithmatic' for Blowfish (unsafe on Alpha). -# BF_PTR2 intel specific version (generic version is more efficient). -# -# Following are set automatically by this script -# -# MD5_ASM use some extra md5 assember, -# SHA1_ASM use some extra sha1 assember, must define L_ENDIAN for x86 -# RMD160_ASM use some extra ripemd160 assember, -# SHA256_ASM sha256_block is implemented in assembler -# SHA512_ASM sha512_block is implemented in assembler -# AES_ASM ASE_[en|de]crypt is implemented in assembler - -# Minimum warning options... any contributions to OpenSSL should at least get -# past these. - -my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; - -my $strict_warnings = 0; - -my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; - -# MD2_CHAR slags pentium pros -my $x86_gcc_opts="RC4_INDEX MD2_INT"; - -# MODIFY THESE PARAMETERS IF YOU ARE GOING TO USE THE 'util/speed.sh SCRIPT -# Don't worry about these normally - -my $tcc="cc"; -my $tflags="-fast -Xa"; -my $tbn_mul=""; -my $tlib="-lnsl -lsocket"; -#$bits1="SIXTEEN_BIT "; -#$bits2="THIRTY_TWO_BIT "; -my $bits1="THIRTY_TWO_BIT "; -my $bits2="SIXTY_FOUR_BIT "; - -my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes-586.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o"; - -my $x86_elf_asm="$x86_asm:elf"; - -my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o"; -my $ia64_asm="ia64cpuid.o:bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::void"; -my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o:aes_core.o aes_cbc.o aes-sparcv9.o:::sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o:::::::void"; -my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::void"; -my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::::::::void"; -my $mips3_asm=":bn-mips3.o::::::::::::void"; -my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o::aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::void"; -my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::void"; -my $ppc32_asm="ppccpuid.o:bn-ppc.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::"; -my $ppc64_asm="ppccpuid.o:bn-ppc.o ppc-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::"; -my $no_asm=":::::::::::::void"; - -# As for $BSDthreads. Idea is to maintain "collective" set of flags, -# which would cover all BSD flavors. -pthread applies to them all, -# but is treated differently. OpenBSD expands is as -D_POSIX_THREAD -# -lc_r, which is sufficient. FreeBSD 4.x expands it as -lc_r, -# which has to be accompanied by explicit -D_THREAD_SAFE and -# sometimes -D_REENTRANT. FreeBSD 5.x expands it as -lc_r, which -# seems to be sufficient? -my $BSDthreads="-pthread -D_THREAD_SAFE -D_REENTRANT"; - -#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib - -my %table=( -# File 'TABLE' (created by 'make TABLE') contains the data from this list, -# formatted for better readability. - - -#"b", "${tcc}:${tflags}::${tlib}:${bits1}:${tbn_mul}::", -#"bl-4c-2c", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR MD2_CHAR:${tbn_mul}::", -#"bl-4c-ri", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR RC4_INDEX:${tbn_mul}::", -#"b2-is-ri-dp", "${tcc}:${tflags}::${tlib}:${bits2}IDEA_SHORT RC4_INDEX DES_PTR:${tbn_mul}::", - -# Our development configs -"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::", -"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::", -"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG_UNUSED -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::bn86-elf.o co86-elf.o", -"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", -"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", -"debug-ben-debug", "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::", -"debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", -"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", -"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", -"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", -"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", -"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-x86_64", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"dist", "cc:-O::(unknown)::::::", - -# Basic configs that should work on any (32 and less bit) box -"gcc", "gcc:-O3::(unknown):::BN_LLONG:::", -"cc", "cc:-O::(unknown)::::::", - -####VOS Configurations -"vos-gcc","gcc:-O3 -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:", -"debug-vos-gcc","gcc:-O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:", - -#### Solaris x86 with GNU C setups -# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it -# here because whenever GNU C instantiates an assembler template it -# surrounds it with #APP #NO_APP comment pair which (at least Solaris -# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" -# error message. -"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# -shared -static-libgcc might appear controversial, but modules taken -# from static libgcc do not have relocations and linking them into our -# shared objects doesn't have any negative side-effects. On the contrary, -# doing so makes it possible to use gcc shared build with Sun C. Given -# that gcc generates faster code [thanks to inline assembler], I would -# actually recommend to consider using gcc shared build even with vendor -# compiler:-) -# -"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", - -#### Solaris x86 with Sun C setups -"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", - -#### SPARC Solaris with GNU C setups -"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc -"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", -#### -"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -#### SPARC Solaris with Sun C setups -# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. -# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 -# SC5.0 note: Compiler common patch 107357-01 or later is required! -"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs::/64", -#### -"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -#### SunOS configs, assuming sparc for the gcc one. -#"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:${no_asm}::", -"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:${no_asm}::", - -#### IRIX 5.x configs -# -mips2 flag is added by ./config when appropriate. -"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${no_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -#### IRIX 6.x configs -# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke -# './Configure irix-cc -o32' manually. -"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", -"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", -# N64 ABI builds. -"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", - -#### Unified HP-UX ANSI C configs. -# Special notes: -# - Originally we were optimizing at +O4 level. It should be noted -# that the only difference between +O3 and +O4 is global inter- -# procedural analysis. As it has to be performed during the link -# stage the compiler leaves behind certain pseudo-code in lib*.a -# which might be release or even patch level specific. Generating -# the machine code for and analyzing the *whole* program appears -# to be *extremely* memory demanding while the performance gain is -# actually questionable. The situation is intensified by the default -# HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB -# which is way too low for +O4. In other words, doesn't +O3 make -# more sense? -# - Keep in mind that the HP compiler by default generates code -# suitable for execution on the host you're currently compiling at. -# If the toolkit is ment to be used on various PA-RISC processors -# consider './config +DAportable'. -# - +DD64 is chosen in favour of +DA2.0W because it's meant to be -# compatible with *future* releases. -# - If you run ./Configure hpux-parisc-[g]cc manually don't forget to -# pass -D_REENTRANT on HP-UX 10 and later. -# - -DMD32_XARRAY triggers workaround for compiler bug we ran into in -# 32-bit message digests. (For the moment of this writing) HP C -# doesn't seem to "digest" too many local variables (they make "him" -# chew forever:-). For more details look-up MD32_XARRAY comment in -# crypto/sha/sha_lcl.h. -# -# -# Since there is mention of this in shlib/hpux10-cc.sh -"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1::pa-risc2.o::::::::::::void:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64", - -# More attempts at unified 10.X and 11.X targets for HP C compiler. -# -# Chris Ruemmler -# Kevin Steves -"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux-parisc1_0-cc","cc:+DAportable +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2.o::::::::::::void:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::void:dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64", - -# HP/UX IA-64 targets -"hpux-ia64-cc","cc:-Ae +DD32 +O2 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD32 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/hpux32", -# Frank Geurts has patiently assisted with -# with debugging of the following config. -"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/hpux64", -# GCC builds... -"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/hpux32", -"hpux64-ia64-gcc","gcc:-mlp64 -O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-mlp64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/hpux64", - -# Legacy HPUX 9.X configs... -"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O2 -z::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -#### HP MPE/iX http://jazz.external.hp.com/src/openssl/ -"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):MPE:-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", - -# DEC Alpha OSF/1/Tru64 targets. -# -# "What's in a name? That which we call a rose -# By any other word would smell as sweet." -# -# - William Shakespeare, "Romeo & Juliet", Act II, scene II. -# -# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version -# -"osf1-alpha-gcc", "gcc:-O3::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", -"osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", -"tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so", - -#### -#### Variety of LINUX:-) -#### -# *-generic* is endian-neutral target, but ./config is free to -# throw in -D[BL]_ENDIAN, whichever appropriate... -"linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# It's believed that majority of ARM toolchains predefine appropriate -march. -# If you compiler does not, do complement config command line with one! -"linux-armv4", "gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -#### IA-32 targets... -"linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out", -#### -"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"linux-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -#### SPARC Linux setups -# Ray Miller has patiently -# assisted with debugging of following two configs. -"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# it's a real mess with -mcpu=ultrasparc option under Linux, but -# -Wa,-Av8plus should do the trick no matter what. -"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# GCC 3.1 is a requirement -"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -#### Alpha Linux with GNU C and Compaq C setups -# Special notes: -# - linux-alpha+bwx-gcc is ment to be used from ./config only. If you -# ought to run './Configure linux-alpha+bwx-gcc' manually, do -# complement the command line with -mcpu=ev56, -mcpu=ev6 or whatever -# which is appropriate. -# - If you use ccc keep in mind that -fast implies -arch host and the -# compiler is free to issue instructions which gonna make elder CPU -# choke. If you wish to build "blended" toolkit, add -arch generic -# *after* -fast and invoke './Configure linux-alpha-ccc' manually. -# -# -# -"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", -"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", - -#### *BSD [do see comment about ${BSDthreads} above!] -"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall -g::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-sparcv8", "gcc:-DB_ENDIAN -DTERMIOS -O3 -mv8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -"BSD-generic64","gcc:-DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it -# simply *happens* to work around a compiler bug in gcc 3.3.3, -# triggered by RIPEMD160 code. -"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${sparcv9_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -"nextstep", "cc:-O -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", -"nextstep3.3", "cc:-O3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", - -# NCR MP-RAS UNIX ver 02.03.01 -"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl -lc89:${x86_gcc_des} ${x86_gcc_opts}:::", - -# QNX -"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:", -"QNX6", "gcc:-DTERMIOS::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"QNX6-i386", "gcc:-DL_ENDIAN -DTERMIOS -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -# BeOS -"beos-x86-r5", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lnet:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC -DPIC:-shared:.so", -"beos-x86-bone", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lbind -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC:-shared:.so", - -#### SCO/Caldera targets. -# -# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. -# Now we only have blended unixware-* as it's the only one used by ./config. -# If you want to optimize for particular microarchitecture, bypass ./config -# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. -# Note that not all targets include assembler support. Mostly because of -# lack of motivation to support out-of-date platforms with out-of-date -# compiler drivers and assemblers. Tim Rice has -# patiently assisted to debug most of it. -# -# UnixWare 2.0x fails destest with -O. -"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", -"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", -"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# SCO 5 - Ben Laurie says the -O breaks the SCO cc. -"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - -#### IBM's AIX. -"aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", -"aix-gcc", "gcc:-O -DB_ENDIAN::-pthread:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X32", -"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", -# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE -# at build time. $OBJECT_MODE is respected at ./config stage! -"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", - -# -# Cray T90 and similar (SDSC) -# It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT -# defined. The T90 ints and longs are 8 bytes long, and apparently the -# B_ENDIAN code assumes 4 byte ints. Fortunately, the non-B_ENDIAN and -# non L_ENDIAN code aligns the bytes in each word correctly. -# -# The BIT_FIELD_LIMITS define is to avoid two fatal compiler errors: -#'Taking the address of a bit field is not allowed. ' -#'An expression with bit field exists as the operand of "sizeof" ' -# (written by Wayne Schroeder ) -# -# j90 is considered the base machine type for unicos machines, -# so this configuration is now called "cray-j90" ... -"cray-j90", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG DES_INT:::", - -# -# Cray T3E (Research Center Juelich, beckman@acl.lanl.gov) -# -# The BIT_FIELD_LIMITS define was written for the C90 (it seems). I added -# another use. Basically, the problem is that the T3E uses some bit fields -# for some st_addr stuff, and then sizeof and address-of fails -# I could not use the ams/alpha.o option because the Cray assembler, 'cam' -# did not like it. -"cray-t3e", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:::", - -# DGUX, 88100. -"dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):::RC4_INDEX DES_UNROLL:::", -"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::", -"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", - -# Sinix/ReliantUNIX RM400 -# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */ -"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${no_asm}:dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"SINIX","cc:-O::(unknown):SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:RC4_INDEX RC4_CHAR:::", -"SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::", - -# SIEMENS BS2000/OSD: an EBCDIC-based mainframe -"BS2000-OSD","c89:-O -XLLML -XLLMK -XL -DB_ENDIAN -DTERMIOS -DCHARSET_EBCDIC::(unknown)::-lsocket -lnsl:THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", - -# OS/390 Unix an EBCDIC-based Unix system on IBM mainframe -# You need to compile using the c89.sh wrapper in the tools directory, because the -# IBM compiler does not like the -L switch after any object modules. -# -"OS390-Unix","c89.sh:-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE::(unknown):::THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", - -# Visual C targets -# -# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 -"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32", -"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32", -"debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32", -"debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32", -# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement -# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' -"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -# Unified CE target -"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", - -# Borland C++ 4.5 -"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32", - -# MinGW -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", -# As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll -# compiled with one compiler with application compiled with another -# compiler. It's possible to engage Applink support in mingw64 build, -# but it's not done, because till mingw64 supports structured exception -# handling, one can't seriously consider its binaries for using with -# non-mingw64 run-time environment. And as mingw64 is always consistent -# with itself, Applink is never engaged and can as well be omitted. -"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE::-D_MT:MINGW64:-lws2_32 -lgdi32 -lcrypt32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a", - -# UWIN -"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", - -# Cygwin -"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", -"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", -"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", - -# NetWare from David Ward (dsward@novell.com) -# requires either MetroWerks NLM development tools, or gcc / nlmconv -# NetWare defaults socket bio to WinSock sockets. However, -# the builds can be configured to use BSD sockets instead. -# netware-clib => legacy CLib c-runtime support -"netware-clib", "mwccnlm::::::${x86_gcc_opts}::", -"netware-clib-bsdsock", "mwccnlm::::::${x86_gcc_opts}::", -"netware-clib-gcc", "i586-netware-gcc:-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYSNAME_NETWARE -O2 -Wall:::::${x86_gcc_opts}::", -"netware-clib-bsdsock-gcc", "i586-netware-gcc:-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYSNAME_NETWARE -O2 -Wall:::::${x86_gcc_opts}::", -# netware-libc => LibC/NKS support -"netware-libc", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::", -"netware-libc-bsdsock", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::", -"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::", -"netware-libc-bsdsock-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::", - -# DJGPP -"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:", - -# Ultrix from Bernhard Simon -"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::", -"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::BN_LLONG::::", -# K&R C is no longer supported; you need gcc on old Ultrix installations -##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::", - -##### MacOS X (a.k.a. Rhapsody or Darwin) setup -"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::", -"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN -Wa,-force_cpusubtype_ALL::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", - -##### A/UX -"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", - -##### Sony NEWS-OS 4.x -"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", - -##### GNU Hurd -"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC", - -##### OS/2 EMX -"OS2-EMX", "gcc::::::::", - -##### VxWorks for various targets -"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", -"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::", -"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::", -"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", -"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::${no_asm}::::::ranlibmips:", - -##### Compaq Non-Stop Kernel (Tandem) -"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::", - -# uClinux -"uClinux-dist","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):BN_LLONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::", -"uClinux-dist64","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):SIXTY_FOUR_BIT_LONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::", - -); - -my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A - debug-VC-WIN64I debug-VC-WIN64A - VC-NT VC-CE VC-WIN32 debug-VC-WIN32 - BC-32 - netware-clib netware-clib-bsdsock - netware-libc netware-libc-bsdsock); - -my $idx = 0; -my $idx_cc = $idx++; -my $idx_cflags = $idx++; -my $idx_unistd = $idx++; -my $idx_thread_cflag = $idx++; -my $idx_sys_id = $idx++; -my $idx_lflags = $idx++; -my $idx_bn_ops = $idx++; -my $idx_cpuid_obj = $idx++; -my $idx_bn_obj = $idx++; -my $idx_des_obj = $idx++; -my $idx_aes_obj = $idx++; -my $idx_bf_obj = $idx++; -my $idx_md5_obj = $idx++; -my $idx_sha1_obj = $idx++; -my $idx_cast_obj = $idx++; -my $idx_rc4_obj = $idx++; -my $idx_rmd160_obj = $idx++; -my $idx_rc5_obj = $idx++; -my $idx_wp_obj = $idx++; -my $idx_cmll_obj = $idx++; -my $idx_perlasm_scheme = $idx++; -my $idx_dso_scheme = $idx++; -my $idx_shared_target = $idx++; -my $idx_shared_cflag = $idx++; -my $idx_shared_ldflag = $idx++; -my $idx_shared_extension = $idx++; -my $idx_ranlib = $idx++; -my $idx_arflags = $idx++; -my $idx_multilib = $idx++; - -my $prefix=""; -my $libdir=""; -my $openssldir=""; -my $exe_ext=""; -my $install_prefix= "$ENV{'INSTALL_PREFIX'}"; -my $cross_compile_prefix=""; -my $no_threads=0; -my $threads=0; -my $no_shared=0; # but "no-shared" is default -my $zlib=1; # but "no-zlib" is default -my $no_krb5=0; # but "no-krb5" is implied unless "--with-krb5-..." is used -my $no_rfc3779=1; # but "no-rfc3779" is default -my $no_asm=0; -my $no_dso=0; -my $no_gmp=0; -my @skip=(); -my $Makefile="Makefile"; -my $des_locl="crypto/des/des_locl.h"; -my $des ="crypto/des/des.h"; -my $bn ="crypto/bn/bn.h"; -my $md2 ="crypto/md2/md2.h"; -my $rc4 ="crypto/rc4/rc4.h"; -my $rc4_locl="crypto/rc4/rc4_locl.h"; -my $idea ="crypto/idea/idea.h"; -my $rc2 ="crypto/rc2/rc2.h"; -my $bf ="crypto/bf/bf_locl.h"; -my $bn_asm ="bn_asm.o"; -my $des_enc="des_enc.o fcrypt_b.o"; -my $aes_enc="aes_core.o aes_cbc.o"; -my $bf_enc ="bf_enc.o"; -my $cast_enc="c_enc.o"; -my $rc4_enc="rc4_enc.o rc4_skey.o"; -my $rc5_enc="rc5_enc.o"; -my $md5_obj=""; -my $sha1_obj=""; -my $rmd160_obj=""; -my $cmll_enc="camellia.o cmll_misc.o cmll_cbc.o"; -my $processor=""; -my $default_ranlib; -my $perl; - - -# All of the following is disabled by default (RC5 was enabled before 0.9.8): - -my %disabled = ( # "what" => "comment" [or special keyword "experimental"] - "gmp" => "default", - "jpake" => "experimental", - "md2" => "default", - "rc5" => "default", - "rfc3779" => "default", - "shared" => "default", - "store" => "experimental", - "zlib" => "default", - "zlib-dynamic" => "default" - ); -my @experimental = (); - -# This is what $depflags will look like with the above defaults -# (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE"; - -# Explicit "no-..." options will be collected in %disabled along with the defaults. -# To remove something from %disabled, use "enable-foo" (unless it's experimental). -# For symmetry, "disable-foo" is a synonym for "no-foo". - -# For features called "experimental" here, a more explicit "experimental-foo" is needed to enable. -# We will collect such requests in @experimental. -# To avoid accidental use of experimental features, applications will have to use -DOPENSSL_EXPERIMENTAL_FOO. - - -my $no_sse2=0; - -&usage if ($#ARGV < 0); - -my $flags; -my $depflags; -my $openssl_experimental_defines; -my $openssl_algorithm_defines; -my $openssl_thread_defines; -my $openssl_sys_defines=""; -my $openssl_other_defines; -my $libs; -my $libkrb5=""; -my $target; -my $options; -my $symlink; -my $make_depend=0; -my %withargs=(); - -my @argvcopy=@ARGV; -my $argvstring=""; -my $argv_unprocessed=1; - -while($argv_unprocessed) - { - $flags=""; - $depflags=""; - $openssl_experimental_defines=""; - $openssl_algorithm_defines=""; - $openssl_thread_defines=""; - $openssl_sys_defines=""; - $openssl_other_defines=""; - $libs=""; - $target=""; - $options=""; - $symlink=1; - - $argv_unprocessed=0; - $argvstring=join(' ',@argvcopy); - -PROCESS_ARGS: - foreach (@argvcopy) - { - s /^-no-/no-/; # some people just can't read the instructions - - # rewrite some options in "enable-..." form - s /^-?-?shared$/enable-shared/; - s /^threads$/enable-threads/; - s /^zlib$/enable-zlib/; - s /^zlib-dynamic$/enable-zlib-dynamic/; - - if (/^no-(.+)$/ || /^disable-(.+)$/) - { - if (!($disabled{$1} eq "experimental")) - { - if ($1 eq "ssl") - { - $disabled{"ssl2"} = "option(ssl)"; - $disabled{"ssl3"} = "option(ssl)"; - } - elsif ($1 eq "tls") - { - $disabled{"tls1"} = "option(tls)" - } - else - { - $disabled{$1} = "option"; - } - } - } - elsif (/^enable-(.+)$/ || /^experimental-(.+)$/) - { - my $algo = $1; - if ($disabled{$algo} eq "experimental") - { - die "You are requesting an experimental feature; please say 'experimental-$algo' if you are sure\n" - unless (/^experimental-/); - push @experimental, $algo; - } - delete $disabled{$algo}; - - $threads = 1 if ($algo eq "threads"); - } - elsif (/^--test-sanity$/) - { - exit(&test_sanity()); - } - elsif (/^--strict-warnings/) - { - $strict_warnings = 1; - } - elsif (/^reconfigure/ || /^reconf/) - { - if (open(IN,"<$Makefile")) - { - while () - { - chomp; - if (/^CONFIGURE_ARGS=(.*)/) - { - $argvstring=$1; - @argvcopy=split(' ',$argvstring); - die "Incorrect data to reconfigure, please do a normal configuration\n" - if (grep(/^reconf/,@argvcopy)); - print "Reconfiguring with: $argvstring\n"; - $argv_unprocessed=1; - close(IN); - last PROCESS_ARGS; - } - } - close(IN); - } - die "Insufficient data to reconfigure, please do a normal configuration\n"; - } - elsif (/^386$/) - { $processor=386; } - elsif (/^rsaref$/) - { - # No RSAref support any more since it's not needed. - # The check for the option is there so scripts aren't - # broken - } - elsif (/^[-+]/) - { - if (/^-[lL](.*)$/ or /^-Wl,/) - { - $libs.=$_." "; - } - elsif (/^-[^-]/ or /^\+/) - { - $flags.=$_." "; - } - elsif (/^--prefix=(.*)$/) - { - $prefix=$1; - } - elsif (/^--libdir=(.*)$/) - { - $libdir=$1; - } - elsif (/^--openssldir=(.*)$/) - { - $openssldir=$1; - } - elsif (/^--install.prefix=(.*)$/) - { - $install_prefix=$1; - } - elsif (/^--with-krb5-(dir|lib|include|flavor)=(.*)$/) - { - $withargs{"krb5-".$1}=$2; - } - elsif (/^--with-zlib-lib=(.*)$/) - { - $withargs{"zlib-lib"}=$1; - } - elsif (/^--with-zlib-include=(.*)$/) - { - $withargs{"zlib-include"}="-I$1"; - } - elsif (/^--cross-compile-prefix=(.*)$/) - { - $cross_compile_prefix=$1; - } - else - { - print STDERR $usage; - exit(1); - } - } - elsif ($_ =~ /^([^:]+):(.+)$/) - { - eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string - $target=$1; - } - else - { - die "target already defined - $target (offending arg: $_)\n" if ($target ne ""); - $target=$_; - } - - unless ($_ eq $target || /^no-/ || /^disable-/) - { - # "no-..." follows later after implied disactivations - # have been derived. (Don't take this too seroiusly, - # we really only write OPTIONS to the Makefile out of - # nostalgia.) - - if ($options eq "") - { $options = $_; } - else - { $options .= " ".$_; } - } - } - } - - - -if ($processor eq "386") - { - $disabled{"sse2"} = "forced"; - } - -if (!defined($withargs{"krb5-flavor"}) || $withargs{"krb5-flavor"} eq "") - { - $disabled{"krb5"} = "krb5-flavor not specified"; - } - -if (!defined($disabled{"zlib-dynamic"})) - { - # "zlib-dynamic" was specifically enabled, so enable "zlib" - delete $disabled{"zlib"}; - } - -if (defined($disabled{"rijndael"})) - { - $disabled{"aes"} = "forced"; - } -if (defined($disabled{"des"})) - { - $disabled{"mdc2"} = "forced"; - } -if (defined($disabled{"ec"})) - { - $disabled{"ecdsa"} = "forced"; - $disabled{"ecdh"} = "forced"; - } - -# SSL 2.0 requires MD5 and RSA -if (defined($disabled{"md5"}) || defined($disabled{"rsa"})) - { - $disabled{"ssl2"} = "forced"; - } - -# SSL 3.0 and TLS requires MD5 and SHA and either RSA or DSA+DH -if (defined($disabled{"md5"}) || defined($disabled{"sha"}) - || (defined($disabled{"rsa"}) - && (defined($disabled{"dsa"}) || defined($disabled{"dh"})))) - { - $disabled{"ssl3"} = "forced"; - $disabled{"tls1"} = "forced"; - } - -if (defined($disabled{"tls1"})) - { - $disabled{"tlsext"} = "forced"; - } - -if (defined($disabled{"ec"}) || defined($disabled{"dsa"}) - || defined($disabled{"dh"})) - { - $disabled{"gost"} = "forced"; - } - -if ($target eq "TABLE") { - foreach $target (sort keys %table) { - print_table_entry($target); - } - exit 0; -} - -if ($target eq "LIST") { - foreach (sort keys %table) { - print; - print "\n"; - } - exit 0; -} - -if ($target =~ m/^CygWin32(-.*)$/) { - $target = "Cygwin".$1; -} - -print "Configuring for $target\n"; - -&usage if (!defined($table{$target})); - - -foreach (sort (keys %disabled)) - { - $options .= " no-$_"; - - printf " no-%-12s %-10s", $_, "[$disabled{$_}]"; - - if (/^dso$/) - { $no_dso = 1; } - elsif (/^threads$/) - { $no_threads = 1; } - elsif (/^shared$/) - { $no_shared = 1; } - elsif (/^zlib$/) - { $zlib = 0; } - elsif (/^static-engine$/) - { } - elsif (/^zlib-dynamic$/) - { } - elsif (/^symlinks$/) - { $symlink = 0; } - elsif (/^sse2$/) - { $no_sse2 = 1; } - else - { - my ($ALGO, $algo); - ($ALGO = $algo = $_) =~ tr/[a-z]/[A-Z]/; - - if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/) - { - $openssl_other_defines .= "#define OPENSSL_NO_$ALGO\n"; - print " OPENSSL_NO_$ALGO"; - - if (/^err$/) { $flags .= "-DOPENSSL_NO_ERR "; } - elsif (/^asm$/) { $no_asm = 1; } - } - else - { - $openssl_algorithm_defines .= "#define OPENSSL_NO_$ALGO\n"; - print " OPENSSL_NO_$ALGO"; - - if (/^krb5$/) - { $no_krb5 = 1; } - else - { - push @skip, $algo; - print " (skip dir)"; - - $depflags .= " -DOPENSSL_NO_$ALGO"; - } - } - } - - print "\n"; - } - -my $exp_cflags = ""; -foreach (sort @experimental) - { - my $ALGO; - ($ALGO = $_) =~ tr/[a-z]/[A-Z]/; - - # opensslconf.h will set OPENSSL_NO_... unless OPENSSL_EXPERIMENTAL_... is defined - $openssl_experimental_defines .= "#define OPENSSL_NO_$ALGO\n"; - $exp_cflags .= " -DOPENSSL_EXPERIMENTAL_$ALGO"; - } - -my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds; - -$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/); -$exe_ext=".nlm" if ($target =~ /netware/); -$exe_ext=".pm" if ($target =~ /vos/); -$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); -$prefix=$openssldir if $prefix eq ""; - -$default_ranlib= &which("ranlib") or $default_ranlib="true"; -$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") - or $perl="perl"; -my $make = $ENV{'MAKE'} || "make"; - -$cross_compile_prefix=$ENV{'CROSS_COMPILE'} if $cross_compile_prefix eq ""; - -chop $openssldir if $openssldir =~ /\/$/; -chop $prefix if $prefix =~ /.\/$/; - -$openssldir=$prefix . "/ssl" if $openssldir eq ""; -$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/; - - -print "IsMK1MF=$IsMK1MF\n"; - -my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); -my $cc = $fields[$idx_cc]; -# Allow environment CC to override compiler... -if($ENV{CC}) { - $cc = $ENV{CC}; -} -my $cflags = $fields[$idx_cflags]; -my $unistd = $fields[$idx_unistd]; -my $thread_cflag = $fields[$idx_thread_cflag]; -my $sys_id = $fields[$idx_sys_id]; -my $lflags = $fields[$idx_lflags]; -my $bn_ops = $fields[$idx_bn_ops]; -my $cpuid_obj = $fields[$idx_cpuid_obj]; -my $bn_obj = $fields[$idx_bn_obj]; -my $des_obj = $fields[$idx_des_obj]; -my $aes_obj = $fields[$idx_aes_obj]; -my $bf_obj = $fields[$idx_bf_obj]; -my $md5_obj = $fields[$idx_md5_obj]; -my $sha1_obj = $fields[$idx_sha1_obj]; -my $cast_obj = $fields[$idx_cast_obj]; -my $rc4_obj = $fields[$idx_rc4_obj]; -my $rmd160_obj = $fields[$idx_rmd160_obj]; -my $rc5_obj = $fields[$idx_rc5_obj]; -my $wp_obj = $fields[$idx_wp_obj]; -my $cmll_obj = $fields[$idx_cmll_obj]; -my $perlasm_scheme = $fields[$idx_perlasm_scheme]; -my $dso_scheme = $fields[$idx_dso_scheme]; -my $shared_target = $fields[$idx_shared_target]; -my $shared_cflag = $fields[$idx_shared_cflag]; -my $shared_ldflag = $fields[$idx_shared_ldflag]; -my $shared_extension = $fields[$idx_shared_extension]; -my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib]; -my $ar = $ENV{'AR'} || "ar"; -my $arflags = $fields[$idx_arflags]; -my $multilib = $fields[$idx_multilib]; - -# if $prefix/lib$multilib is not an existing directory, then -# assume that it's not searched by linker automatically, in -# which case adding $multilib suffix causes more grief than -# we're ready to tolerate, so don't... -$multilib="" if !-d "$prefix/lib$multilib"; - -$libdir="lib$multilib" if $libdir eq ""; - -$cflags = "$cflags$exp_cflags"; - -# '%' in $lflags is used to split flags to "pre-" and post-flags -my ($prelflags,$postlflags)=split('%',$lflags); -if (defined($postlflags)) { $lflags=$postlflags; } -else { $lflags=$prelflags; undef $prelflags; } - -if ($target =~ /^mingw/ && `$cc --target-help 2>&1` !~ m/\-mno\-cygwin/m) - { - $cflags =~ s/\-mno\-cygwin\s*//; - $shared_ldflag =~ s/\-mno\-cygwin\s*//; - } - -my $no_shared_warn=0; -my $no_user_cflags=0; - -if ($flags ne "") { $cflags="$flags$cflags"; } -else { $no_user_cflags=1; } - -# Kerberos settings. The flavor must be provided from outside, either through -# the script "config" or manually. -if (!$no_krb5) - { - my ($lresolv, $lpath, $lext); - if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/) - { - die "Sorry, Heimdal is currently not supported\n"; - } - ##### HACK to force use of Heimdal. - ##### WARNING: Since we don't really have adequate support for Heimdal, - ##### using this will break the build. You'll have to make - ##### changes to the source, and if you do, please send - ##### patches to openssl-dev@openssl.org - if ($withargs{"krb5-flavor"} =~ /^force-[Hh]eimdal$/) - { - warn "Heimdal isn't really supported. Your build WILL break\n"; - warn "If you fix the problems, please send a patch to openssl-dev\@openssl.org\n"; - $withargs{"krb5-dir"} = "/usr/heimdal" - if $withargs{"krb5-dir"} eq ""; - $withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}. - "/lib -lgssapi -lkrb5 -lcom_err" - if $withargs{"krb5-lib"} eq "" && !$IsMK1MF; - $cflags="-DKRB5_HEIMDAL $cflags"; - } - if ($withargs{"krb5-flavor"} =~ /^[Mm][Ii][Tt]/) - { - $withargs{"krb5-dir"} = "/usr/kerberos" - if $withargs{"krb5-dir"} eq ""; - $withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}. - "/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto" - if $withargs{"krb5-lib"} eq "" && !$IsMK1MF; - $cflags="-DKRB5_MIT $cflags"; - $withargs{"krb5-flavor"} =~ s/^[Mm][Ii][Tt][._-]*//; - if ($withargs{"krb5-flavor"} =~ /^1[._-]*[01]/) - { - $cflags="-DKRB5_MIT_OLD11 $cflags"; - } - } - LRESOLV: - foreach $lpath ("/lib", "/usr/lib") - { - foreach $lext ("a", "so") - { - $lresolv = "$lpath/libresolv.$lext"; - last LRESOLV if (-r "$lresolv"); - $lresolv = ""; - } - } - $withargs{"krb5-lib"} .= " -lresolv" - if ("$lresolv" ne ""); - $withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include" - if $withargs{"krb5-include"} eq "" && - $withargs{"krb5-dir"} ne ""; - } - -# The DSO code currently always implements all functions so that no -# applications will have to worry about that from a compilation point -# of view. However, the "method"s may return zero unless that platform -# has support compiled in for them. Currently each method is enabled -# by a define "DSO_" ... we translate the "dso_scheme" config -# string entry into using the following logic; -my $dso_cflags; -if (!$no_dso && $dso_scheme ne "") - { - $dso_scheme =~ tr/[a-z]/[A-Z]/; - if ($dso_scheme eq "DLFCN") - { - $dso_cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H"; - } - elsif ($dso_scheme eq "DLFCN_NO_H") - { - $dso_cflags = "-DDSO_DLFCN"; - } - else - { - $dso_cflags = "-DDSO_$dso_scheme"; - } - $cflags = "$dso_cflags $cflags"; - } - -my $thread_cflags; -my $thread_defines; -if ($thread_cflag ne "(unknown)" && !$no_threads) - { - # If we know how to do it, support threads by default. - $threads = 1; - } -if ($thread_cflag eq "(unknown)" && $threads) - { - # If the user asked for "threads", [s]he is also expected to - # provide any system-dependent compiler options that are - # necessary. - if ($no_user_cflags) - { - print "You asked for multi-threading support, but didn't\n"; - print "provide any system-specific compiler options\n"; - exit(1); - } - $thread_cflags="-DOPENSSL_THREADS $cflags" ; - $thread_defines .= "#define OPENSSL_THREADS\n"; - } -else - { - $thread_cflags="-DOPENSSL_THREADS $thread_cflag $cflags"; - $thread_defines .= "#define OPENSSL_THREADS\n"; -# my $def; -# foreach $def (split ' ',$thread_cflag) -# { -# if ($def =~ s/^-D// && $def !~ /^_/) -# { -# $thread_defines .= "#define $def\n"; -# } -# } - } - -$lflags="$libs$lflags" if ($libs ne ""); - -if ($no_asm) - { - $cpuid_obj=$bn_obj= - $des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=$cmll_obj= - $sha1_obj=$md5_obj=$rmd160_obj=$wp_obj=""; - } - -if (!$no_shared) - { - $cast_obj=""; # CAST assembler is not PIC - } - -if ($threads) - { - $cflags=$thread_cflags; - $openssl_thread_defines .= $thread_defines; - } - -if ($zlib) - { - $cflags = "-DZLIB $cflags"; - if (defined($disabled{"zlib-dynamic"})) - { - if (defined($withargs{"zlib-lib"})) - { - $lflags = "$lflags -L" . $withargs{"zlib-lib"} . " -lz"; - } - else - { - $lflags = "$lflags -lz"; - } - } - else - { - $cflags = "-DZLIB_SHARED $cflags"; - } - } - -# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org -my $shared_mark = ""; -if ($shared_target eq "") - { - $no_shared_warn = 1 if !$no_shared; - $no_shared = 1; - } -if (!$no_shared) - { - if ($shared_cflag ne "") - { - $cflags = "$shared_cflag -DOPENSSL_PIC $cflags"; - } - } - -if (!$IsMK1MF) - { - # add {no-}static-engine to options to allow mkdef.pl to work without extra arguments - if ($no_shared) - { - $openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n"; - $options.=" static-engine"; - } - else - { - $openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n"; - $options.=" no-static-engine"; - } - } - -$cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/); - -# -# Platform fix-ups -# -if ($target =~ /\-icc$/) # Intel C compiler - { - my $iccver=0; - if (open(FD,"$cc -V 2>&1 |")) - { - while() { $iccver=$1 if (/Version ([0-9]+)\./); } - close(FD); - } - if ($iccver>=8) - { - # Eliminate unnecessary dependency from libirc.a. This is - # essential for shared library support, as otherwise - # apps/openssl can end up in endless loop upon startup... - $cflags.=" -Dmemcpy=__builtin_memcpy -Dmemset=__builtin_memset"; - } - if ($iccver>=9) - { - $cflags.=" -i-static"; - $cflags=~s/\-no_cpprt/-no-cpprt/; - } - if ($iccver>=10) - { - $cflags=~s/\-i\-static/-static-intel/; - } - } - -# Unlike other OSes (like Solaris, Linux, Tru64, IRIX) BSD run-time -# linkers (tested OpenBSD, NetBSD and FreeBSD) "demand" RPATH set on -# .so objects. Apparently application RPATH is not global and does -# not apply to .so linked with other .so. Problem manifests itself -# when libssl.so fails to load libcrypto.so. One can argue that we -# should engrave this into Makefile.shared rules or into BSD-* config -# lines above. Meanwhile let's try to be cautious and pass -rpath to -# linker only when --prefix is not /usr. -if ($target =~ /^BSD\-/) - { - $shared_ldflag.=" -Wl,-rpath,\$(LIBRPATH)" if ($prefix !~ m|^/usr[/]*$|); - } - -if ($sys_id ne "") - { - #$cflags="-DOPENSSL_SYSNAME_$sys_id $cflags"; - $openssl_sys_defines="#define OPENSSL_SYSNAME_$sys_id\n"; - } - -if ($ranlib eq "") - { - $ranlib = $default_ranlib; - } - -#my ($bn1)=split(/\s+/,$bn_obj); -#$bn1 = "" unless defined $bn1; -#$bn1=$bn_asm unless ($bn1 =~ /\.o$/); -#$bn_obj="$bn1"; - -$cpuid_obj="" if ($processor eq "386"); - -$bn_obj = $bn_asm unless $bn_obj ne ""; -# bn-586 is the only one implementing bn_*_part_words -$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn-586/); -$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /86/); - -$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /-mont/); - -$cpuid_obj="mem_clr.o" unless ($cpuid_obj =~ /\.o$/); -$des_obj=$des_enc unless ($des_obj =~ /\.o$/); -$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); -$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); -$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); -$rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); -if ($sha1_obj =~ /\.o$/) - { -# $sha1_obj=$sha1_enc; - $cflags.=" -DSHA1_ASM" if ($sha1_obj =~ /sx86/ || $sha1_obj =~ /sha1/); - $cflags.=" -DSHA256_ASM" if ($sha1_obj =~ /sha256/); - $cflags.=" -DSHA512_ASM" if ($sha1_obj =~ /sha512/); - if ($sha1_obj =~ /sse2/) - { if ($no_sse2) - { $sha1_obj =~ s/\S*sse2\S+//; } - elsif ($cflags !~ /OPENSSL_IA32_SSE2/) - { $cflags.=" -DOPENSSL_IA32_SSE2"; } - } - } -if ($md5_obj =~ /\.o$/) - { -# $md5_obj=$md5_enc; - $cflags.=" -DMD5_ASM"; - } -if ($rmd160_obj =~ /\.o$/) - { -# $rmd160_obj=$rmd160_enc; - $cflags.=" -DRMD160_ASM"; - } -if ($aes_obj =~ /\.o$/) - { - $cflags.=" -DAES_ASM"; - } -else { - $aes_obj=$aes_enc; - } -$wp_obj="" if ($wp_obj =~ /mmx/ && $processor eq "386"); -if ($wp_obj =~ /\.o$/) - { - $cflags.=" -DWHIRLPOOL_ASM"; - } -else { - $wp_obj="wp_block.o"; - } -$cmll_obj=$cmll_enc unless ($cmll_obj =~ /.o$/); - -# "Stringify" the C flags string. This permits it to be made part of a string -# and works as well on command lines. -$cflags =~ s/([\\\"])/\\\1/g; - -my $version = "unknown"; -my $version_num = "unknown"; -my $major = "unknown"; -my $minor = "unknown"; -my $shlib_version_number = "unknown"; -my $shlib_version_history = "unknown"; -my $shlib_major = "unknown"; -my $shlib_minor = "unknown"; - -open(IN,') - { - $version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /; - $version_num=$1 if /OPENSSL.VERSION.NUMBER.*0x(\S+)/; - $shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/; - $shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/; - } -close(IN); -if ($shlib_version_history ne "") { $shlib_version_history .= ":"; } - -if ($version =~ /(^[0-9]*)\.([0-9\.]*)/) - { - $major=$1; - $minor=$2; - } - -if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) - { - $shlib_major=$1; - $shlib_minor=$2; - } - -if ($strict_warnings) - { - my $wopt; - die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/); - foreach $wopt (split /\s+/, $gcc_devteam_warn) - { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) - } - } - -open(IN,'$Makefile.new") || die "unable to create $Makefile.new:$!\n"; -print OUT "### Generated automatically from Makefile.org by Configure.\n\n"; -my $sdirs=0; -while () - { - chomp; - $sdirs = 1 if /^SDIRS=/; - if ($sdirs) { - my $dir; - foreach $dir (@skip) { - s/(\s)$dir /$1/; - s/\s$dir$//; - } - } - $sdirs = 0 unless /\\$/; - s/engines // if (/^DIRS=/ && $disabled{"engine"}); - s/ccgost// if (/^ENGDIRS=/ && $disabled{"gost"}); - s/^VERSION=.*/VERSION=$version/; - s/^MAJOR=.*/MAJOR=$major/; - s/^MINOR=.*/MINOR=$minor/; - s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; - s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/; - s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/; - s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/; - s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/; - s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/; - s/^MULTILIB=.*$/MULTILIB=$multilib/; - s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; - s/^LIBDIR=.*$/LIBDIR=$libdir/; - s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; - s/^PLATFORM=.*$/PLATFORM=$target/; - s/^OPTIONS=.*$/OPTIONS=$options/; - s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/; - if ($cross_compile_prefix) - { - s/^CC=.*$/CROSS_COMPILE= $cross_compile_prefix\nCC= \$\(CROSS_COMPILE\)$cc/; - s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/; - s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/; - s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/; - s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc"; - } - else { - s/^CC=.*$/CC= $cc/; - s/^AR=\s*ar/AR= $ar/; - s/^RANLIB=.*/RANLIB= $ranlib/; - s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; - } - s/^CFLAG=.*$/CFLAG= $cflags/; - s/^DEPFLAG=.*$/DEPFLAG=$depflags/; - s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/; - s/^EX_LIBS=.*$/EX_LIBS= $lflags/; - s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/; - s/^CPUID_OBJ=.*$/CPUID_OBJ= $cpuid_obj/; - s/^BN_ASM=.*$/BN_ASM= $bn_obj/; - s/^DES_ENC=.*$/DES_ENC= $des_obj/; - s/^AES_ENC=.*$/AES_ENC= $aes_obj/; - s/^BF_ENC=.*$/BF_ENC= $bf_obj/; - s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/; - s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/; - s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/; - s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/; - s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; - s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; - s/^WP_ASM_OBJ=.*$/WP_ASM_OBJ= $wp_obj/; - s/^CMLL_ENC=.*$/CMLL_ENC= $cmll_obj/; - s/^PERLASM_SCHEME=.*$/PERLASM_SCHEME= $perlasm_scheme/; - s/^PROCESSOR=.*/PROCESSOR= $processor/; - s/^ARFLAGS=.*/ARFLAGS= $arflags/; - s/^PERL=.*/PERL= $perl/; - s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/; - s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; - s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/; - s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/; - s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; - s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/; - s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared); - if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/) - { - my $sotmp = $1; - s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/; - } - elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.dylib$/) - { - s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.dylib/; - } - elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/) - { - my $sotmp = $1; - s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/; - } - elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/) - { - s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.\$(SHLIB_MAJOR).dylib .dylib/; - } - s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/; - print OUT $_."\n"; - } -close(IN); -close(OUT); -rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile; -rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n"; - -print "CC =$cc\n"; -print "CFLAG =$cflags\n"; -print "EX_LIBS =$lflags\n"; -print "CPUID_OBJ =$cpuid_obj\n"; -print "BN_ASM =$bn_obj\n"; -print "DES_ENC =$des_obj\n"; -print "AES_ENC =$aes_obj\n"; -print "BF_ENC =$bf_obj\n"; -print "CAST_ENC =$cast_obj\n"; -print "RC4_ENC =$rc4_obj\n"; -print "RC5_ENC =$rc5_obj\n"; -print "MD5_OBJ_ASM =$md5_obj\n"; -print "SHA1_OBJ_ASM =$sha1_obj\n"; -print "RMD160_OBJ_ASM=$rmd160_obj\n"; -print "CMLL_ENC= =$cmll_obj\n"; -print "PROCESSOR =$processor\n"; -print "RANLIB =$ranlib\n"; -print "ARFLAGS =$arflags\n"; -print "PERL =$perl\n"; -print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n" - if $withargs{"krb5-include"} ne ""; - -my $des_ptr=0; -my $des_risc1=0; -my $des_risc2=0; -my $des_unroll=0; -my $bn_ll=0; -my $def_int=2; -my $rc4_int=$def_int; -my $md2_int=$def_int; -my $idea_int=$def_int; -my $rc2_int=$def_int; -my $rc4_idx=0; -my $rc4_chunk=0; -my $bf_ptr=0; -my @type=("char","short","int","long"); -my ($b64l,$b64,$b32,$b16,$b8)=(0,0,1,0,0); -my $export_var_as_fn=0; - -my $des_int; - -foreach (sort split(/\s+/,$bn_ops)) - { - $des_ptr=1 if /DES_PTR/; - $des_risc1=1 if /DES_RISC1/; - $des_risc2=1 if /DES_RISC2/; - $des_unroll=1 if /DES_UNROLL/; - $des_int=1 if /DES_INT/; - $bn_ll=1 if /BN_LLONG/; - $rc4_int=0 if /RC4_CHAR/; - $rc4_int=3 if /RC4_LONG/; - $rc4_idx=1 if /RC4_INDEX/; - $rc4_chunk=1 if /RC4_CHUNK/; - $rc4_chunk=2 if /RC4_CHUNK_LL/; - $md2_int=0 if /MD2_CHAR/; - $md2_int=3 if /MD2_LONG/; - $idea_int=1 if /IDEA_SHORT/; - $idea_int=3 if /IDEA_LONG/; - $rc2_int=1 if /RC2_SHORT/; - $rc2_int=3 if /RC2_LONG/; - $bf_ptr=1 if $_ eq "BF_PTR"; - $bf_ptr=2 if $_ eq "BF_PTR2"; - ($b64l,$b64,$b32,$b16,$b8)=(0,1,0,0,0) if /SIXTY_FOUR_BIT/; - ($b64l,$b64,$b32,$b16,$b8)=(1,0,0,0,0) if /SIXTY_FOUR_BIT_LONG/; - ($b64l,$b64,$b32,$b16,$b8)=(0,0,1,0,0) if /THIRTY_TWO_BIT/; - ($b64l,$b64,$b32,$b16,$b8)=(0,0,0,1,0) if /SIXTEEN_BIT/; - ($b64l,$b64,$b32,$b16,$b8)=(0,0,0,0,1) if /EIGHT_BIT/; - $export_var_as_fn=1 if /EXPORT_VAR_AS_FN/; - } - -open(IN,'crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n"; -print OUT "/* opensslconf.h */\n"; -print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n"; - -print OUT "/* OpenSSL was configured with the following options: */\n"; -my $openssl_algorithm_defines_trans = $openssl_algorithm_defines; -$openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg; -$openssl_algorithm_defines_trans =~ s/^\s*#\s*define\s+OPENSSL_(.*)/# if defined(OPENSSL_$1) \&\& !defined($1)\n# define $1\n# endif/mg; -$openssl_algorithm_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; -$openssl_algorithm_defines = " /* no ciphers excluded */\n" if $openssl_algorithm_defines eq ""; -$openssl_thread_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; -$openssl_sys_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; -$openssl_other_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; -print OUT $openssl_sys_defines; -print OUT "#ifndef OPENSSL_DOING_MAKEDEPEND\n\n"; -print OUT $openssl_experimental_defines; -print OUT "\n"; -print OUT $openssl_algorithm_defines; -print OUT "\n#endif /* OPENSSL_DOING_MAKEDEPEND */\n\n"; -print OUT $openssl_thread_defines; -print OUT $openssl_other_defines,"\n"; - -print OUT "/* The OPENSSL_NO_* macros are also defined as NO_* if the application\n"; -print OUT " asks for it. This is a transient feature that is provided for those\n"; -print OUT " who haven't had the time to do the appropriate changes in their\n"; -print OUT " applications. */\n"; -print OUT "#ifdef OPENSSL_ALGORITHM_DEFINES\n"; -print OUT $openssl_algorithm_defines_trans; -print OUT "#endif\n\n"; - -print OUT "#define OPENSSL_CPUID_OBJ\n\n" if ($cpuid_obj ne "mem_clr.o"); - -while () - { - if (/^#define\s+OPENSSLDIR/) - { - my $foo = $openssldir; - $foo =~ s/\\/\\\\/g; - print OUT "#define OPENSSLDIR \"$foo\"\n"; - } - elsif (/^#define\s+ENGINESDIR/) - { - my $foo = "$prefix/$libdir/engines"; - $foo =~ s/\\/\\\\/g; - print OUT "#define ENGINESDIR \"$foo\"\n"; - } - elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/) - { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n" - if $export_var_as_fn; - printf OUT "#%s OPENSSL_EXPORT_VAR_AS_FUNCTION\n", - ($export_var_as_fn)?"define":"undef"; } - elsif (/^#define\s+OPENSSL_UNISTD/) - { - $unistd = "" if $unistd eq ""; - print OUT "#define OPENSSL_UNISTD $unistd\n"; - } - elsif (/^#((define)|(undef))\s+SIXTY_FOUR_BIT_LONG/) - { printf OUT "#%s SIXTY_FOUR_BIT_LONG\n",($b64l)?"define":"undef"; } - elsif (/^#((define)|(undef))\s+SIXTY_FOUR_BIT/) - { printf OUT "#%s SIXTY_FOUR_BIT\n",($b64)?"define":"undef"; } - elsif (/^#((define)|(undef))\s+THIRTY_TWO_BIT/) - { printf OUT "#%s THIRTY_TWO_BIT\n",($b32)?"define":"undef"; } - elsif (/^#((define)|(undef))\s+SIXTEEN_BIT/) - { printf OUT "#%s SIXTEEN_BIT\n",($b16)?"define":"undef"; } - elsif (/^#((define)|(undef))\s+EIGHT_BIT/) - { printf OUT "#%s EIGHT_BIT\n",($b8)?"define":"undef"; } - elsif (/^#((define)|(undef))\s+BN_LLONG\s*$/) - { printf OUT "#%s BN_LLONG\n",($bn_ll)?"define":"undef"; } - elsif (/^\#define\s+DES_LONG\s+.*/) - { printf OUT "#define DES_LONG unsigned %s\n", - ($des_int)?'int':'long'; } - elsif (/^\#(define|undef)\s+DES_PTR/) - { printf OUT "#%s DES_PTR\n",($des_ptr)?'define':'undef'; } - elsif (/^\#(define|undef)\s+DES_RISC1/) - { printf OUT "#%s DES_RISC1\n",($des_risc1)?'define':'undef'; } - elsif (/^\#(define|undef)\s+DES_RISC2/) - { printf OUT "#%s DES_RISC2\n",($des_risc2)?'define':'undef'; } - elsif (/^\#(define|undef)\s+DES_UNROLL/) - { printf OUT "#%s DES_UNROLL\n",($des_unroll)?'define':'undef'; } - elsif (/^#define\s+RC4_INT\s/) - { printf OUT "#define RC4_INT unsigned %s\n",$type[$rc4_int]; } - elsif (/^#undef\s+RC4_CHUNK/) - { - printf OUT "#undef RC4_CHUNK\n" if $rc4_chunk==0; - printf OUT "#define RC4_CHUNK unsigned long\n" if $rc4_chunk==1; - printf OUT "#define RC4_CHUNK unsigned long long\n" if $rc4_chunk==2; - } - elsif (/^#((define)|(undef))\s+RC4_INDEX/) - { printf OUT "#%s RC4_INDEX\n",($rc4_idx)?"define":"undef"; } - elsif (/^#(define|undef)\s+I386_ONLY/) - { printf OUT "#%s I386_ONLY\n", ($processor eq "386")? - "define":"undef"; } - elsif (/^#define\s+MD2_INT\s/) - { printf OUT "#define MD2_INT unsigned %s\n",$type[$md2_int]; } - elsif (/^#define\s+IDEA_INT\s/) - {printf OUT "#define IDEA_INT unsigned %s\n",$type[$idea_int];} - elsif (/^#define\s+RC2_INT\s/) - {printf OUT "#define RC2_INT unsigned %s\n",$type[$rc2_int];} - elsif (/^#(define|undef)\s+BF_PTR/) - { - printf OUT "#undef BF_PTR\n" if $bf_ptr == 0; - printf OUT "#define BF_PTR\n" if $bf_ptr == 1; - printf OUT "#define BF_PTR2\n" if $bf_ptr == 2; - } - else - { print OUT $_; } - } -close(IN); -close(OUT); -rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; -rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; - - -# Fix the date - -print "SIXTY_FOUR_BIT_LONG mode\n" if $b64l; -print "SIXTY_FOUR_BIT mode\n" if $b64; -print "THIRTY_TWO_BIT mode\n" if $b32; -print "SIXTEEN_BIT mode\n" if $b16; -print "EIGHT_BIT mode\n" if $b8; -print "DES_PTR used\n" if $des_ptr; -print "DES_RISC1 used\n" if $des_risc1; -print "DES_RISC2 used\n" if $des_risc2; -print "DES_UNROLL used\n" if $des_unroll; -print "DES_INT used\n" if $des_int; -print "BN_LLONG mode\n" if $bn_ll; -print "RC4 uses u$type[$rc4_int]\n" if $rc4_int != $def_int; -print "RC4_INDEX mode\n" if $rc4_idx; -print "RC4_CHUNK is undefined\n" if $rc4_chunk==0; -print "RC4_CHUNK is unsigned long\n" if $rc4_chunk==1; -print "RC4_CHUNK is unsigned long long\n" if $rc4_chunk==2; -print "MD2 uses u$type[$md2_int]\n" if $md2_int != $def_int; -print "IDEA uses u$type[$idea_int]\n" if $idea_int != $def_int; -print "RC2 uses u$type[$rc2_int]\n" if $rc2_int != $def_int; -print "BF_PTR used\n" if $bf_ptr == 1; -print "BF_PTR2 used\n" if $bf_ptr == 2; - -if($IsMK1MF) { - open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; - printf OUT <ms/version32.rc") || die "Can't open ms/version32.rc"; - print OUT < - -LANGUAGE 0x09,0x01 - -1 VERSIONINFO - FILEVERSION $v1,$v2,$v3,$v4 - PRODUCTVERSION $v1,$v2,$v3,$v4 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x01L -#else - FILEFLAGS 0x00L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - // Required: - VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0" - VALUE "FileDescription", "OpenSSL Shared Library\\0" - VALUE "FileVersion", "$version\\0" -#if defined(CRYPTO) - VALUE "InternalName", "libeay32\\0" - VALUE "OriginalFilename", "libeay32.dll\\0" -#elif defined(SSL) - VALUE "InternalName", "ssleay32\\0" - VALUE "OriginalFilename", "ssleay32.dll\\0" -#endif - VALUE "ProductName", "The OpenSSL Toolkit\\0" - VALUE "ProductVersion", "$version\\0" - // Optional: - //VALUE "Comments", "\\0" - VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" - //VALUE "LegalTrademarks", "\\0" - //VALUE "PrivateBuild", "\\0" - //VALUE "SpecialBuild", "\\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 0x4b0 - END -END -EOF - close(OUT); - } - -print < 78) - { - print STDERR "\n"; - $k=length($i); - } - print STDERR $i . " "; - } - foreach $i (sort keys %table) - { - next if $i !~ /^debug/; - $k += length($i) + 1; - if ($k > 78) - { - print STDERR "\n"; - $k=length($i); - } - print STDERR $i . " "; - } - print STDERR "\n\nNOTE: If in doubt, on Unix-ish systems use './config'.\n"; - exit(1); - } - -sub which - { - my($name)=@_; - my $path; - foreach $path (split /:/, $ENV{PATH}) - { - if (-f "$path/$name$exe_ext" and -x _) - { - return "$path/$name$exe_ext" unless ($name eq "perl" and - system("$path/$name$exe_ext -e " . '\'exit($]<5.0);\'')); - } - } - } - -sub dofile - { - my $f; my $p; my %m; my @a; my $k; my $ff; - ($f,$p,%m)=@_; - - open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n"; - @a=; - close(IN); - foreach $k (keys %m) - { - grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); - } - open(OUT,">$f.new") || die "unable to open $f.new:$!\n"; - print OUT @a; - close(OUT); - rename($f,"$f.bak") || die "unable to rename $f\n" if -e $f; - rename("$f.new",$f) || die "unable to rename $f.new\n"; - } - -sub print_table_entry - { - my $target = shift; - - (my $cc,my $cflags,my $unistd,my $thread_cflag,my $sys_id,my $lflags, - my $bn_ops,my $cpuid_obj,my $bn_obj,my $des_obj,my $aes_obj, my $bf_obj, - my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj, - my $rc5_obj,my $wp_obj,my $cmll_obj,my $perlasm_scheme,my $dso_scheme,my $shared_target,my $shared_cflag, - my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags,my $multilib)= - split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); - - print < fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.0d was released on Feb 8th, 2011. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous CVS access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. - -For information on parts of libcrypto that are not yet documented, you -might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's -predecessor, at . Much -of this still applies to OpenSSL. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. -Use MD5 to check that a tarball from a mirror site is identical: - - md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5 - -You can check authenticity using pgp or gpg. You need the OpenSSL team -member public key used to sign it (download it from a key server, see a -list of keys at ). Then -just do: - - pgp TARBALL.asc - -[LEGAL] ======================================================================= - -* Do I need patent licenses to use OpenSSL? - -The patents section of the README file lists patents that may apply to -you if you want to use OpenSSL. For information on intellectual -property rights, please consult a lawyer. The OpenSSL team does not -offer legal advice. - -You can configure OpenSSL so as not to use IDEA, MDC2 and RC5 by using - ./config no-idea no-mdc2 no-rc5 - - -* Can I use OpenSSL with GPL software? - -On many systems including the major Linux and BSD distributions, yes (the -GPL does not place restrictions on using libraries that are part of the -normal operating system distribution). - -On other systems, the situation is less clear. Some GPL software copyright -holders claim that you infringe on their rights if you use OpenSSL with -their software on operating systems that don't normally include OpenSSL. - -If you develop open source software that uses OpenSSL, you may find it -useful to choose an other license than the GPL, or state explicitly that -"This program is released under the GPL with the additional exemption that -compiling, linking, and/or using OpenSSL is allowed." If you are using -GPL software developed by others, you may want to ask the copyright holder -for permission to use their software with OpenSSL. - - -[USER] ======================================================================== - -* Why do I get a "PRNG not seeded" error message? - -Cryptographic software needs a source of unpredictable data to work -correctly. Many open source operating systems provide a "randomness -device" (/dev/urandom or /dev/random) that serves this purpose. -All OpenSSL versions try to use /dev/urandom by default; starting with -version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not -available. - -On other systems, applications have to call the RAND_add() or -RAND_seed() function with appropriate data before generating keys or -performing public key encryption. (These functions initialize the -pseudo-random number generator, PRNG.) Some broken applications do -not do this. As of version 0.9.5, the OpenSSL functions that need -randomness report an error if the random number generator has not been -seeded with at least 128 bits of randomness. If this error occurs and -is not discussed in the documentation of the application you are -using, please contact the author of that application; it is likely -that it never worked correctly. OpenSSL 0.9.5 and later make the -error visible by refusing to perform potentially insecure encryption. - -If you are using Solaris 8, you can add /dev/urandom and /dev/random -devices by installing patch 112438 (Sparc) or 112439 (x86), which are -available via the Patchfinder at -(Solaris 9 includes these devices by default). For /dev/random support -for earlier Solaris versions, see Sun's statement at - -(the SUNWski package is available in patch 105710). - -On systems without /dev/urandom and /dev/random, it is a good idea to -use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for -details. Starting with version 0.9.7, OpenSSL will automatically look -for an EGD socket at /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool and -/etc/entropy. - -Most components of the openssl command line utility automatically try -to seed the random number generator from a file. The name of the -default seeding file is determined as follows: If environment variable -RANDFILE is set, then it names the seeding file. Otherwise if -environment variable HOME is set, then the seeding file is $HOME/.rnd. -If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will -use file .rnd in the current directory while OpenSSL 0.9.6a uses no -default seeding file at all. OpenSSL 0.9.6b and later will behave -similarly to 0.9.6a, but will use a default of "C:\" for HOME on -Windows systems if the environment variable has not been set. - -If the default seeding file does not exist or is too short, the "PRNG -not seeded" error message may occur. - -The openssl command line utility will write back a new state to the -default seeding file (and create this file if necessary) unless -there was no sufficient seeding. - -Pointing $RANDFILE to an Entropy Gathering Daemon socket does not work. -Use the "-rand" option of the OpenSSL command line tools instead. -The $RANDFILE environment variable and $HOME/.rnd are only used by the -OpenSSL command line tools. Applications using the OpenSSL library -provide their own configuration options to specify the entropy source, -please check out the documentation coming the with application. - - -* Why do I get an "unable to write 'random state'" error message? - - -Sometimes the openssl command line utility does not abort with -a "PRNG not seeded" error message, but complains that it is -"unable to write 'random state'". This message refers to the -default seeding file (see previous answer). A possible reason -is that no default filename is known because neither RANDFILE -nor HOME is set. (Versions up to 0.9.6 used file ".rnd" in the -current directory in this case, but this has changed with 0.9.6a.) - - -* How do I create certificates or certificate requests? - -Check out the CA.pl(1) manual page. This provides a simple wrapper round -the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check -out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). - - -* Why can't I create certificate requests? - -You typically get the error: - - unable to find 'distinguished_name' in config - problems making Certificate Request - -This is because it can't find the configuration file. Check out the -DIAGNOSTICS section of req(1) for more information. - - -* Why does fail with a certificate verify error? - -This problem is usually indicated by log messages saying something like -"unable to get local issuer certificate" or "self signed certificate". -When a certificate is verified its root CA must be "trusted" by OpenSSL -this typically means that the CA certificate must be placed in a directory -or file and the relevant program configured to read it. The OpenSSL program -'verify' behaves in a similar way and issues similar error messages: check -the verify(1) program manual page for more information. - - -* Why can I only use weak ciphers when I connect to a server using OpenSSL? - -This is almost certainly because you are using an old "export grade" browser -which only supports weak encryption. Upgrade your browser to support 128 bit -ciphers. - - -* How can I create DSA certificates? - -Check the CA.pl(1) manual page for a DSA certificate example. - - -* Why can't I make an SSL connection to a server using a DSA certificate? - -Typically you'll see a message saying there are no shared ciphers when -the same setup works fine with an RSA certificate. There are two possible -causes. The client may not support connections to DSA servers most web -browsers (including Netscape and MSIE) only support connections to servers -supporting RSA cipher suites. The other cause is that a set of DH parameters -has not been supplied to the server. DH parameters can be created with the -dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example: -check the source to s_server in apps/s_server.c for an example. - - -* How can I remove the passphrase on a private key? - -Firstly you should be really *really* sure you want to do this. Leaving -a private key unencrypted is a major security risk. If you decide that -you do have to do this check the EXAMPLES sections of the rsa(1) and -dsa(1) manual pages. - - -* Why can't I use OpenSSL certificates with SSL client authentication? - -What will typically happen is that when a server requests authentication -it will either not include your certificate or tell you that you have -no client certificates (Netscape) or present you with an empty list box -(MSIE). The reason for this is that when a server requests a client -certificate it includes a list of CAs names which it will accept. Browsers -will only let you select certificates from the list on the grounds that -there is little point presenting a certificate which the server will -reject. - -The solution is to add the relevant CA certificate to your servers "trusted -CA list". How you do this depends on the server software in uses. You can -print out the servers list of acceptable CAs using the OpenSSL s_client tool: - -openssl s_client -connect www.some.host:443 -prexit - -If your server only requests certificates on certain URLs then you may need -to manually issue an HTTP GET command to get the list when s_client connects: - -GET /some/page/needing/a/certificate.html - -If your CA does not appear in the list then this confirms the problem. - - -* Why does my browser give a warning about a mismatched hostname? - -Browsers expect the server's hostname to match the value in the commonName -(CN) field of the certificate. If it does not then you get a warning. - - -* How do I install a CA certificate into a browser? - -The usual way is to send the DER encoded certificate to the browser as -MIME type application/x-x509-ca-cert, for example by clicking on an appropriate -link. On MSIE certain extensions such as .der or .cacert may also work, or you -can import the certificate using the certificate import wizard. - -You can convert a certificate to DER form using the command: - -openssl x509 -in ca.pem -outform DER -out ca.der - -Occasionally someone suggests using a command such as: - -openssl pkcs12 -export -out cacert.p12 -in cacert.pem -inkey cakey.pem - -DO NOT DO THIS! This command will give away your CAs private key and -reduces its security to zero: allowing anyone to forge certificates in -whatever name they choose. - -* Why is OpenSSL x509 DN output not conformant to RFC2253? - -The ways to print out the oneline format of the DN (Distinguished Name) have -been extended in version 0.9.7 of OpenSSL. Using the new X509_NAME_print_ex() -interface, the "-nameopt" option could be introduded. See the manual -page of the "openssl x509" commandline tool for details. The old behaviour -has however been left as default for the sake of compatibility. - -* What is a "128 bit certificate"? Can I create one with OpenSSL? - -The term "128 bit certificate" is a highly misleading marketing term. It does -*not* refer to the size of the public key in the certificate! A certificate -containing a 128 bit RSA key would have negligible security. - -There were various other names such as "magic certificates", "SGC -certificates", "step up certificates" etc. - -You can't generally create such a certificate using OpenSSL but there is no -need to any more. Nowadays web browsers using unrestricted strong encryption -are generally available. - -When there were tight restrictions on the export of strong encryption -software from the US only weak encryption algorithms could be freely exported -(initially 40 bit and then 56 bit). It was widely recognised that this was -inadequate. A relaxation of the rules allowed the use of strong encryption but -only to an authorised server. - -Two slighly different techniques were developed to support this, one used by -Netscape was called "step up", the other used by MSIE was called "Server Gated -Cryptography" (SGC). When a browser initially connected to a server it would -check to see if the certificate contained certain extensions and was issued by -an authorised authority. If these test succeeded it would reconnect using -strong encryption. - -Only certain (initially one) certificate authorities could issue the -certificates and they generally cost more than ordinary certificates. - -Although OpenSSL can create certificates containing the appropriate extensions -the certificate would not come from a permitted authority and so would not -be recognized. - -The export laws were later changed to allow almost unrestricted use of strong -encryption so these certificates are now obsolete. - - -* Why does OpenSSL set the authority key identifier (AKID) extension incorrectly? - -It doesn't: this extension is often the cause of confusion. - -Consider a certificate chain A->B->C so that A signs B and B signs C. Suppose -certificate C contains AKID. - -The purpose of this extension is to identify the authority certificate B. This -can be done either by including the subject key identifier of B or its issuer -name and serial number. - -In this latter case because it is identifying certifcate B it must contain the -issuer name and serial number of B. - -It is often wrongly assumed that it should contain the subject name of B. If it -did this would be redundant information because it would duplicate the issuer -name of C. - - -* How can I set up a bundle of commercial root CA certificates? - -The OpenSSL software is shipped without any root CA certificate as the -OpenSSL project does not have any policy on including or excluding -any specific CA and does not intend to set up such a policy. Deciding -about which CAs to support is up to application developers or -administrators. - -Other projects do have other policies so you can for example extract the CA -bundle used by Mozilla and/or modssl as described in this article: - - - - -[BUILD] ======================================================================= - -* Why does the linker complain about undefined symbols? - -Maybe the compilation was interrupted, and make doesn't notice that -something is missing. Run "make clean; make". - -If you used ./Configure instead of ./config, make sure that you -selected the right target. File formats may differ slightly between -OS versions (for example sparcv8/sparcv9, or a.out/elf). - -In case you get errors about the following symbols, use the config -option "no-asm", as described in INSTALL: - - BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt, - CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt, - RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words, - bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4, - bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3, - des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3, - des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order - -If none of these helps, you may want to try using the current snapshot. -If the problem persists, please submit a bug report. - - -* Why does the OpenSSL test fail with "bc: command not found"? - -You didn't install "bc", the Unix calculator. If you want to run the -tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor. - - -* Why does the OpenSSL test fail with "bc: 1 no implemented"? - -On some SCO installations or versions, bc has a bug that gets triggered -when you run the test suite (using "make test"). The message returned is -"bc: 1 not implemented". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL test fail with "bc: stack empty"? - -On some DG/ux versions, bc seems to have a too small stack for calculations -that the OpenSSL bntest throws at it. This gets triggered when you run the -test suite (using "make test"). The message returned is "bc: stack empty". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? - -On some Alpha installations running Tru64 Unix and Compaq C, the compilation -of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual -memory to continue compilation.' As far as the tests have shown, this may be -a compiler bug. What happens is that it eats up a lot of resident memory -to build something, probably a table. The problem is clearly in the -optimization code, because if one eliminates optimization completely (-O0), -the compilation goes through (and the compiler consumes about 2MB of resident -memory instead of 240MB or whatever one's limit is currently). - -There are three options to solve this problem: - -1. set your current data segment size soft limit higher. Experience shows -that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do -this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of -kbytes to set the limit to. - -2. If you have a hard limit that is lower than what you need and you can't -get it changed, you can compile all of OpenSSL with -O0 as optimization -level. This is however not a very nice thing to do for those who expect to -get the best result from OpenSSL. A bit more complicated solution is the -following: - ------ snip:start ----- - make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \ - sed -e 's/ -O[0-9] / -O0 /'`" - rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'` - make ------ snip:end ----- - -This will only compile sha_dgst.c with -O0, the rest with the optimization -level chosen by the configuration process. When the above is done, do the -test and installation and you're set. - -3. Reconfigure the toolkit with no-sha0 option to leave out SHA0. It -should not be used and is not used in SSL/TLS nor any other recognized -protocol in either case. - - -* Why does the OpenSSL compilation fail with "ar: command not found"? - -Getting this message is quite usual on Solaris 2, because Sun has hidden -away 'ar' and other development commands in directories that aren't in -$PATH by default. One of those directories is '/usr/ccs/bin'. The -quickest way to fix this is to do the following (it assumes you use sh -or any sh-compatible shell): - ------ snip:start ----- - PATH=${PATH}:/usr/ccs/bin; export PATH ------ snip:end ----- - -and then redo the compilation. What you should really do is make sure -'/usr/ccs/bin' is permanently in your $PATH, for example through your -'.profile' (again, assuming you use a sh-compatible shell). - - -* Why does the OpenSSL compilation fail on Win32 with VC++? - -Sometimes, you may get reports from VC++ command line (cl) that it -can't find standard include files like stdio.h and other weirdnesses. -One possible cause is that the environment isn't correctly set up. -To solve that problem for VC++ versions up to 6, one should run -VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++ -installation directory (somewhere under 'Program Files'). For VC++ -version 7 (and up?), which is also called VS.NET, the file is called -VSVARS32.BAT instead. -This needs to be done prior to running NMAKE, and the changes are only -valid for the current DOS session. - - -* What is special about OpenSSL on Redhat? - -Red Hat Linux (release 7.0 and later) include a preinstalled limited -version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2 -is disabled in this version. The same may apply to other Linux distributions. -Users may therefore wish to install more or all of the features left out. - -To do this you MUST ensure that you do not overwrite the openssl that is in -/usr/bin on your Red Hat machine. Several packages depend on this file, -including sendmail and ssh. /usr/local/bin is a good alternative choice. The -libraries that come with Red Hat 7.0 onwards have different names and so are -not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and -/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and -/lib/libcrypto.so.2 respectively). - -Please note that we have been advised by Red Hat attempting to recompile the -openssl rpm with all the cryptography enabled will not work. All other -packages depend on the original Red Hat supplied openssl package. It is also -worth noting that due to the way Red Hat supplies its packages, updates to -openssl on each distribution never change the package version, only the -build number. For example, on Red Hat 7.1, the latest openssl package has -version number 0.9.6 and build number 9 even though it contains all the -relevant updates in packages up to and including 0.9.6b. - -A possible way around this is to persuade Red Hat to produce a non-US -version of Red Hat Linux. - -FYI: Patent numbers and expiry dates of US patents: -MDC-2: 4,908,861 13/03/2007 -IDEA: 5,214,703 25/05/2010 -RC5: 5,724,428 03/03/2015 - - -* Why does the OpenSSL compilation fail on MacOS X? - -If the failure happens when trying to build the "openssl" binary, with -a large number of undefined symbols, it's very probable that you have -OpenSSL 0.9.6b delivered with the operating system (you can find out by -running '/usr/bin/openssl version') and that you were trying to build -OpenSSL 0.9.7 or newer. The problem is that the loader ('ld') in -MacOS X has a misfeature that's quite difficult to go around. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - - -* Why does the OpenSSL test suite fail on MacOS X? - -If the failure happens when running 'make test' and the RC4 test fails, -it's very probable that you have OpenSSL 0.9.6b delivered with the -operating system (you can find out by running '/usr/bin/openssl version') -and that you were trying to build OpenSSL 0.9.6d. The problem is that -the loader ('ld') in MacOS X has a misfeature that's quite difficult to -go around and has linked the programs "openssl" and the test programs -with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the -libraries you just built. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? - -Failure in BN_sqr test is most likely caused by a failure to configure the -toolkit for current platform or lack of support for the platform in question. -Run './config -t' and './apps/openssl version -p'. Do these platform -identifiers match? If they don't, then you most likely failed to run -./config and you're hereby advised to do so before filing a bug report. -If ./config itself fails to run, then it's most likely problem with your -local environment and you should turn to your system administrator (or -similar). If identifiers match (and/or no alternative identifier is -suggested by ./config script), then the platform is unsupported. There might -or might not be a workaround. Most notably on SPARC64 platforms with GNU -C compiler you should be able to produce a working build by running -'./config -m32'. I understand that -m32 might not be what you want/need, -but the build should be operational. For further details turn to -. - -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? - -As of 0.9.7 assembler routines were overhauled for position independence -of the machine code, which is essential for shared library support. For -some reason OpenBSD is equipped with an out-of-date GNU assembler which -finds the new code offensive. To work around the problem, configure with -no-asm (and sacrifice a great deal of performance) or patch your assembler -according to . -For your convenience a pre-compiled replacement binary is provided at -. -Reportedly elder *BSD a.out platforms also suffer from this problem and -remedy should be same. Provided binary is statically linked and should be -working across wider range of *BSD branches, not just OpenBSD. - -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? - -If the test program in question fails withs SIGILL, Illegal Instruction -exception, then you more than likely to run SSE2-capable CPU, such as -Intel P4, under control of kernel which does not support SSE2 -instruction extentions. See accompanying INSTALL file and -OPENSSL_ia32cap(3) documentation page for further information. - -* Why does compiler fail to compile sha512.c? - -OpenSSL SHA-512 implementation depends on compiler support for 64-bit -integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a -couple] lack support for this and therefore are incapable of compiling -the module in question. The recommendation is to disable SHA-512 by -adding no-sha512 to ./config [or ./Configure] command line. Another -possible alternative might be to switch to GCC. - -* Test suite still fails, what to do? - -Another common reason for failure to complete some particular test is -simply bad code generated by a buggy component in toolchain or deficiency -in run-time environment. There are few cases documented in PROBLEMS file, -consult it for possible workaround before you beat the drum. Even if you -don't find solution or even mention there, do reserve for possibility of -a compiler bug. Compiler bugs might appear in rather bizarre ways, they -never make sense, and tend to emerge when you least expect them. In order -to identify one, drop optimization level, e.g. by editing CFLAG line in -top-level Makefile, recompile and re-run the test. - -* I think I've found a bug, what should I do? - -If you are a new user then it is quite likely you haven't found a bug and -something is happening you aren't familiar with. Check this FAQ, the associated -documentation and the mailing lists for similar queries. If you are still -unsure whether it is a bug or not submit a query to the openssl-users mailing -list. - - -* I'm SURE I've found a bug, how do I report it? - -Bug reports with no security implications should be sent to the request -tracker. This can be done by mailing the report to (or its -alias ), please note that messages sent to the -request tracker also appear in the public openssl-dev mailing list. - -The report should be in plain text. Any patches should be sent as -plain text attachments because some mailers corrupt patches sent inline. -If your issue affects multiple versions of OpenSSL check any patches apply -cleanly and, if possible include patches to each affected version. - -The report should be given a meaningful subject line briefly summarising the -issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful. - -By sending reports to the request tracker the bug can then be given a priority -and assigned to the appropriate maintainer. The history of discussions can be -accessed and if the issue has been addressed or a reason why not. If patches -are only sent to openssl-dev they can be mislaid if a team member has to -wade through months of old messages to review the discussion. - -See also - - -* I've found a security issue, how do I report it? - -If you think your bug has security implications then please send it to -openssl-security@openssl.org if you don't get a prompt reply at least -acknowledging receipt then resend or mail it directly to one of the -more active team members (e.g. Steve). - -[PROG] ======================================================================== - -* Is OpenSSL thread-safe? - -Yes (with limitations: an SSL connection may not concurrently be used -by multiple threads). On Windows and many Unix systems, OpenSSL -automatically uses the multi-threaded versions of the standard -libraries. If your platform is not one of these, consult the INSTALL -file. - -Multi-threaded applications must provide two callback functions to -OpenSSL by calling CRYPTO_set_locking_callback() and -CRYPTO_set_id_callback(), for all versions of OpenSSL up to and -including 0.9.8[abc...]. As of version 1.0.0, CRYPTO_set_id_callback() -and associated APIs are deprecated by CRYPTO_THREADID_set_callback() -and friends. This is described in the threads(3) manpage. - -* I've compiled a program under Windows and it crashes: why? - -This is usually because you've missed the comment in INSTALL.W32. -Your application must link against the same version of the Win32 -C-Runtime against which your openssl libraries were linked. The -default version for OpenSSL is /MD - "Multithreaded DLL". - -If you are using Microsoft Visual C++'s IDE (Visual Studio), in -many cases, your new project most likely defaulted to "Debug -Singlethreaded" - /ML. This is NOT interchangeable with /MD and your -program will crash, typically on the first BIO related read or write -operation. - -For each of the six possible link stage configurations within Win32, -your application must link against the same by which OpenSSL was -built. If you are using MS Visual C++ (Studio) this can be changed -by: - - 1. Select Settings... from the Project Menu. - 2. Select the C/C++ Tab. - 3. Select "Code Generation from the "Category" drop down list box - 4. Select the Appropriate library (see table below) from the "Use - run-time library" drop down list box. Perform this step for both - your debug and release versions of your application (look at the - top left of the settings panel to change between the two) - - Single Threaded /ML - MS VC++ often defaults to - this for the release - version of a new project. - Debug Single Threaded /MLd - MS VC++ often defaults to - this for the debug version - of a new project. - Multithreaded /MT - Debug Multithreaded /MTd - Multithreaded DLL /MD - OpenSSL defaults to this. - Debug Multithreaded DLL /MDd - -Note that debug and release libraries are NOT interchangeable. If you -built OpenSSL with /MD your application must use /MD and cannot use /MDd. - -As per 0.9.8 the above limitation is eliminated for .DLLs. OpenSSL -.DLLs compiled with some specific run-time option [we insist on the -default /MD] can be deployed with application compiled with different -option or even different compiler. But there is a catch! Instead of -re-compiling OpenSSL toolkit, as you would have to with prior versions, -you have to compile small C snippet with compiler and/or options of -your choice. The snippet gets installed as -/include/openssl/applink.c and should be either added to -your application project or simply #include-d in one [and only one] -of your application source files. Failure to link this shim module -into your application manifests itself as fatal "no OPENSSL_Applink" -run-time error. An explicit reminder is due that in this situation -[mixing compiler options] it is as important to add CRYPTO_malloc_init -prior first call to OpenSSL. - -* How do I read or write a DER encoded buffer using the ASN1 functions? - -You have two options. You can either use a memory BIO in conjunction -with the i2d_*_bio() or d2i_*_bio() functions or you can use the -i2d_*(), d2i_*() functions directly. Since these are often the -cause of grief here are some code fragments using PKCS7 as an example: - - unsigned char *buf, *p; - int len; - - len = i2d_PKCS7(p7, NULL); - buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */ - p = buf; - i2d_PKCS7(p7, &p); - -At this point buf contains the len bytes of the DER encoding of -p7. - -The opposite assumes we already have len bytes in buf: - - unsigned char *p; - p = buf; - p7 = d2i_PKCS7(NULL, &p, len); - -At this point p7 contains a valid PKCS7 structure of NULL if an error -occurred. If an error occurred ERR_print_errors(bio) should give more -information. - -The reason for the temporary variable 'p' is that the ASN1 functions -increment the passed pointer so it is ready to read or write the next -structure. This is often a cause of problems: without the temporary -variable the buffer pointer is changed to point just after the data -that has been read or written. This may well be uninitialized data -and attempts to free the buffer will have unpredictable results -because it no longer points to the same address. - - -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? - -The short answer is yes, because DER is a special case of BER and OpenSSL -ASN1 decoders can process BER. - -The longer answer is that ASN1 structures can be encoded in a number of -different ways. One set of ways is the Basic Encoding Rules (BER) with various -permissible encodings. A restriction of BER is the Distinguished Encoding -Rules (DER): these uniquely specify how a given structure is encoded. - -Therefore, because DER is a special case of BER, DER is an acceptable encoding -for BER. - - -* I've tried using and I get errors why? - -This usually happens when you try compiling something using the PKCS#12 -macros with a C++ compiler. There is hardly ever any need to use the -PKCS#12 macros in a program, it is much easier to parse and create -PKCS#12 files using the PKCS12_parse() and PKCS12_create() functions -documented in doc/openssl.txt and with examples in demos/pkcs12. The -'pkcs12' application has to use the macros because it prints out -debugging information. - - -* I've called and it fails, why? - -Before submitting a report or asking in one of the mailing lists, you -should try to determine the cause. In particular, you should call -ERR_print_errors() or ERR_print_errors_fp() after the failed call -and see if the message helps. Note that the problem may occur earlier -than you think -- you should check for errors after every call where -it is possible, otherwise the actual problem may be hidden because -some OpenSSL functions clear the error state. - - -* I just get a load of numbers for the error output, what do they mean? - -The actual format is described in the ERR_print_errors() manual page. -You should call the function ERR_load_crypto_strings() before hand and -the message will be output in text form. If you can't do this (for example -it is a pre-compiled binary) you can use the errstr utility on the error -code itself (the hex digits after the second colon). - - -* Why do I get errors about unknown algorithms? - -The cause is forgetting to load OpenSSL's table of algorithms with -OpenSSL_add_all_algorithms(). See the manual page for more information. This -can cause several problems such as being unable to read in an encrypted -PEM file, unable to decrypt a PKCS#12 file or signature failure when -verifying certificates. - -* Why can't the OpenSSH configure script detect OpenSSL? - -Several reasons for problems with the automatic detection exist. -OpenSSH requires at least version 0.9.5a of the OpenSSL libraries. -Sometimes the distribution has installed an older version in the system -locations that is detected instead of a new one installed. The OpenSSL -library might have been compiled for another CPU or another mode (32/64 bits). -Permissions might be wrong. - -The general answer is to check the config.log file generated when running -the OpenSSH configure script. It should contain the detailed information -on why the OpenSSL library was not detected or considered incompatible. - - -* Can I use OpenSSL's SSL library with non-blocking I/O? - -Yes; make sure to read the SSL_get_error(3) manual page! - -A pitfall to avoid: Don't assume that SSL_read() will just read from -the underlying transport or that SSL_write() will just write to it -- -it is also possible that SSL_write() cannot do any useful work until -there is data to read, or that SSL_read() cannot do anything until it -is possible to send data. One reason for this is that the peer may -request a new TLS/SSL handshake at any time during the protocol, -requiring a bi-directional message exchange; both SSL_read() and -SSL_write() will try to continue any pending handshake. - - -* Why doesn't my server application receive a client certificate? - -Due to the TLS protocol definition, a client will only send a certificate, -if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the -SSL_CTX_set_verify() function to enable the use of client certificates. - - -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? - -For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier -versions, uniqueIdentifier was incorrectly used for X.509 certificates. -The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier. -Change your code to use the new name when compiling against OpenSSL 0.9.7. - - -* I think I've detected a memory leak, is this a bug? - -In most cases the cause of an apparent memory leak is an OpenSSL internal table -that is allocated when an application starts up. Since such tables do not grow -in size over time they are harmless. - -These internal tables can be freed up when an application closes using various -functions. Currently these include following: - -Thread-local cleanup functions: - - ERR_remove_state() - -Application-global cleanup functions that are aware of usage (and therefore -thread-safe): - - ENGINE_cleanup() and CONF_modules_unload() - -"Brutal" (thread-unsafe) Application-global cleanup functions: - - ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data(). - - -* Why does Valgrind complain about the use of uninitialized data? - -When OpenSSL's PRNG routines are called to generate random numbers the supplied -buffer contents are mixed into the entropy pool: so it technically does not -matter whether the buffer is initialized at this point or not. Valgrind (and -other test tools) will complain about this. When using Valgrind, make sure the -OpenSSL library has been compiled with the PURIFY macro defined (-DPURIFY) -to get rid of these warnings. - - -* Why doesn't a memory BIO work when a file does? - -This can occur in several cases for example reading an S/MIME email message. -The reason is that a memory BIO can do one of two things when all the data -has been read from it. - -The default behaviour is to indicate that no more data is available and that -the call should be retried, this is to allow the application to fill up the BIO -again if necessary. - -Alternatively it can indicate that no more data is available and that EOF has -been reached. - -If a memory BIO is to behave in the same way as a file this second behaviour -is needed. This must be done by calling: - - BIO_set_mem_eof_return(bio, 0); - -See the manual pages for more details. - - -* Where are the declarations and implementations of d2i_X509() etc? - -These are defined and implemented by macros of the form: - - - DECLARE_ASN1_FUNCTIONS(X509) and IMPLEMENT_ASN1_FUNCTIONS(X509) - -The implementation passes an ASN1 "template" defining the structure into an -ASN1 interpreter using generalised functions such as ASN1_item_d2i(). - - -=============================================================================== diff --git a/3rdparty/openssl-1.0.0d/INSTALL b/3rdparty/openssl-1.0.0d/INSTALL deleted file mode 100755 index 1325079f2a..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL +++ /dev/null @@ -1,360 +0,0 @@ - - INSTALLATION ON THE UNIX PLATFORM - --------------------------------- - - [Installation on DOS (with djgpp), Windows, OpenVMS, MacOS (before MacOS X) - and NetWare is described in INSTALL.DJGPP, INSTALL.W32, INSTALL.VMS, - INSTALL.MacOS and INSTALL.NW. - - This document describes installation on operating systems in the Unix - family.] - - To install OpenSSL, you will need: - - * make - * Perl 5 - * an ANSI C compiler - * a development environment in form of development libraries and C - header files - * a supported Unix operating system - - Quick Start - ----------- - - If you want to just get on with it, do: - - $ ./config - $ make - $ make test - $ make install - - [If any of these steps fails, see section Installation in Detail below.] - - This will build and install OpenSSL in the default location, which is (for - historical reasons) /usr/local/ssl. If you want to install it anywhere else, - run config like this: - - $ ./config --prefix=/usr/local --openssldir=/usr/local/openssl - - - Configuration Options - --------------------- - - There are several options to ./config (or ./Configure) to customize - the build: - - --prefix=DIR Install in DIR/bin, DIR/lib, DIR/include/openssl. - Configuration files used by OpenSSL will be in DIR/ssl - or the directory specified by --openssldir. - - --openssldir=DIR Directory for OpenSSL files. If no prefix is specified, - the library files and binaries are also installed there. - - no-threads Don't try to build with support for multi-threaded - applications. - - threads Build with support for multi-threaded applications. - This will usually require additional system-dependent options! - See "Note on multi-threading" below. - - no-zlib Don't try to build with support for zlib compression and - decompression. - - zlib Build with support for zlib compression/decompression. - - zlib-dynamic Like "zlib", but has OpenSSL load the zlib library dynamically - when needed. This is only supported on systems where loading - of shared libraries is supported. This is the default choice. - - no-shared Don't try to create shared libraries. - - shared In addition to the usual static libraries, create shared - libraries on platforms where it's supported. See "Note on - shared libraries" below. - - no-asm Do not use assembler code. - - 386 Use the 80386 instruction set only (the default x86 code is - more efficient, but requires at least a 486). Note: Use - compiler flags for any other CPU specific configuration, - e.g. "-m32" to build x86 code on an x64 system. - - no-sse2 Exclude SSE2 code pathes. Normally SSE2 extention is - detected at run-time, but the decision whether or not the - machine code will be executed is taken solely on CPU - capability vector. This means that if you happen to run OS - kernel which does not support SSE2 extension on Intel P4 - processor, then your application might be exposed to - "illegal instruction" exception. There might be a way - to enable support in kernel, e.g. FreeBSD kernel can be - compiled with CPU_ENABLE_SSE, and there is a way to - disengage SSE2 code pathes upon application start-up, - but if you aim for wider "audience" running such kernel, - consider no-sse2. Both 386 and no-asm options above imply - no-sse2. - - no- Build without the specified cipher (bf, cast, des, dh, dsa, - hmac, md2, md5, mdc2, rc2, rc4, rc5, rsa, sha). - The crypto/ directory can be removed after running - "make depend". - - -Dxxx, -lxxx, -Lxxx, -fxxx, -mXXX, -Kxxx These system specific options will - be passed through to the compiler to allow you to - define preprocessor symbols, specify additional libraries, - library directories or other compiler options. - - -DHAVE_CRYPTODEV Enable the BSD cryptodev engine even if we are not using - BSD. Useful if you are running ocf-linux or something - similar. Once enabled you can also enable the use of - cryptodev digests, which is usually slower unless you have - large amounts data. Use -DUSE_CRYPTODEV_DIGESTS to force - it. - - Installation in Detail - ---------------------- - - 1a. Configure OpenSSL for your operation system automatically: - - $ ./config [options] - - This guesses at your operating system (and compiler, if necessary) and - configures OpenSSL based on this guess. Run ./config -t to see - if it guessed correctly. If you want to use a different compiler, you - are cross-compiling for another platform, or the ./config guess was - wrong for other reasons, go to step 1b. Otherwise go to step 2. - - On some systems, you can include debugging information as follows: - - $ ./config -d [options] - - 1b. Configure OpenSSL for your operating system manually - - OpenSSL knows about a range of different operating system, hardware and - compiler combinations. To see the ones it knows about, run - - $ ./Configure - - Pick a suitable name from the list that matches your system. For most - operating systems there is a choice between using "cc" or "gcc". When - you have identified your system (and if necessary compiler) use this name - as the argument to ./Configure. For example, a "linux-elf" user would - run: - - $ ./Configure linux-elf [options] - - If your system is not available, you will have to edit the Configure - program and add the correct configuration for your system. The - generic configurations "cc" or "gcc" should usually work on 32 bit - systems. - - Configure creates the file Makefile.ssl from Makefile.org and - defines various macros in crypto/opensslconf.h (generated from - crypto/opensslconf.h.in). - - 2. Build OpenSSL by running: - - $ make - - This will build the OpenSSL libraries (libcrypto.a and libssl.a) and the - OpenSSL binary ("openssl"). The libraries will be built in the top-level - directory, and the binary will be in the "apps" directory. - - If "make" fails, look at the output. There may be reasons for - the failure that aren't problems in OpenSSL itself (like missing - standard headers). If it is a problem with OpenSSL itself, please - report the problem to (note that your - message will be recorded in the request tracker publicly readable - via http://www.openssl.org/support/rt.html and will be forwarded to a - public mailing list). Include the output of "make report" in your message. - Please check out the request tracker. Maybe the bug was already - reported or has already been fixed. - - [If you encounter assembler error messages, try the "no-asm" - configuration option as an immediate fix.] - - Compiling parts of OpenSSL with gcc and others with the system - compiler will result in unresolved symbols on some systems. - - 3. After a successful build, the libraries should be tested. Run: - - $ make test - - If a test fails, look at the output. There may be reasons for - the failure that isn't a problem in OpenSSL itself (like a missing - or malfunctioning bc). If it is a problem with OpenSSL itself, - try removing any compiler optimization flags from the CFLAG line - in Makefile.ssl and run "make clean; make". Please send a bug - report to , including the output of - "make report" in order to be added to the request tracker at - http://www.openssl.org/support/rt.html. - - 4. If everything tests ok, install OpenSSL with - - $ make install - - This will create the installation directory (if it does not exist) and - then the following subdirectories: - - certs Initially empty, this is the default location - for certificate files. - man/man1 Manual pages for the 'openssl' command line tool - man/man3 Manual pages for the libraries (very incomplete) - misc Various scripts. - private Initially empty, this is the default location - for private key files. - - If you didn't choose a different installation prefix, the - following additional subdirectories will be created: - - bin Contains the openssl binary and a few other - utility programs. - include/openssl Contains the header files needed if you want to - compile programs with libcrypto or libssl. - lib Contains the OpenSSL library files themselves. - - Use "make install_sw" to install the software without documentation, - and "install_docs_html" to install HTML renditions of the manual - pages. - - Package builders who want to configure the library for standard - locations, but have the package installed somewhere else so that - it can easily be packaged, can use - - $ make INSTALL_PREFIX=/tmp/package-root install - - (or specify "--install_prefix=/tmp/package-root" as a configure - option). The specified prefix will be prepended to all - installation target filenames. - - - NOTE: The header files used to reside directly in the include - directory, but have now been moved to include/openssl so that - OpenSSL can co-exist with other libraries which use some of the - same filenames. This means that applications that use OpenSSL - should now use C preprocessor directives of the form - - #include - - instead of "#include ", which was used with library versions - up to OpenSSL 0.9.2b. - - If you install a new version of OpenSSL over an old library version, - you should delete the old header files in the include directory. - - Compatibility issues: - - * COMPILING existing applications - - To compile an application that uses old filenames -- e.g. - "#include " --, it will usually be enough to find - the CFLAGS definition in the application's Makefile and - add a C option such as - - -I/usr/local/ssl/include/openssl - - to it. - - But don't delete the existing -I option that points to - the ..../include directory! Otherwise, OpenSSL header files - could not #include each other. - - * WRITING applications - - To write an application that is able to handle both the new - and the old directory layout, so that it can still be compiled - with library versions up to OpenSSL 0.9.2b without bothering - the user, you can proceed as follows: - - - Always use the new filename of OpenSSL header files, - e.g. #include . - - - Create a directory "incl" that contains only a symbolic - link named "openssl", which points to the "include" directory - of OpenSSL. - For example, your application's Makefile might contain the - following rule, if OPENSSLDIR is a pathname (absolute or - relative) of the directory where OpenSSL resides: - - incl/openssl: - -mkdir incl - cd $(OPENSSLDIR) # Check whether the directory really exists - -ln -s `cd $(OPENSSLDIR); pwd`/include incl/openssl - - You will have to add "incl/openssl" to the dependencies - of those C files that include some OpenSSL header file. - - - Add "-Iincl" to your CFLAGS. - - With these additions, the OpenSSL header files will be available - under both name variants if an old library version is used: - Your application can reach them under names like , - while the header files still are able to #include each other - with names of the form . - - - Note on multi-threading - ----------------------- - - For some systems, the OpenSSL Configure script knows what compiler options - are needed to generate a library that is suitable for multi-threaded - applications. On these systems, support for multi-threading is enabled - by default; use the "no-threads" option to disable (this should never be - necessary). - - On other systems, to enable support for multi-threading, you will have - to specify at least two options: "threads", and a system-dependent option. - (The latter is "-D_REENTRANT" on various systems.) The default in this - case, obviously, is not to include support for multi-threading (but - you can still use "no-threads" to suppress an annoying warning message - from the Configure script.) - - - Note on shared libraries - ------------------------ - - Shared libraries have certain caveats. Binary backward compatibility - can't be guaranteed before OpenSSL version 1.0. The only reason to - use them would be to conserve memory on systems where several programs - are using OpenSSL. - - For some systems, the OpenSSL Configure script knows what is needed to - build shared libraries for libcrypto and libssl. On these systems, - the shared libraries are currently not created by default, but giving - the option "shared" will get them created. This method supports Makefile - targets for shared library creation, like linux-shared. Those targets - can currently be used on their own just as well, but this is expected - to change in future versions of OpenSSL. - - Note on random number generation - -------------------------------- - - Availability of cryptographically secure random numbers is required for - secret key generation. OpenSSL provides several options to seed the - internal PRNG. If not properly seeded, the internal PRNG will refuse - to deliver random bytes and a "PRNG not seeded error" will occur. - On systems without /dev/urandom (or similar) device, it may be necessary - to install additional support software to obtain random seed. - Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(), - and the FAQ for more information. - - Note on support for multiple builds - ----------------------------------- - - OpenSSL is usually built in its source tree. Unfortunately, this doesn't - support building for multiple platforms from the same source tree very well. - It is however possible to build in a separate tree through the use of lots - of symbolic links, which should be prepared like this: - - mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`" - cd objtree/"`uname -s`-`uname -r`-`uname -m`" - (cd $OPENSSL_SOURCE; find . -type f) | while read F; do - mkdir -p `dirname $F` - rm -f $F; ln -s $OPENSSL_SOURCE/$F $F - echo $F '->' $OPENSSL_SOURCE/$F - done - make -f Makefile.org clean - - OPENSSL_SOURCE is an environment variable that contains the absolute (this - is important!) path to the OpenSSL source tree. - - Also, operations like 'make update' should still be made in the source tree. diff --git a/3rdparty/openssl-1.0.0d/INSTALL.DJGPP b/3rdparty/openssl-1.0.0d/INSTALL.DJGPP deleted file mode 100755 index 1047ec90a5..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL.DJGPP +++ /dev/null @@ -1,47 +0,0 @@ - - - INSTALLATION ON THE DOS PLATFORM WITH DJGPP - ------------------------------------------- - - OpenSSL has been ported to DJGPP, a Unix look-alike 32-bit run-time - environment for 16-bit DOS, but only with long filename support. - If you wish to compile on native DOS with 8+3 filenames, you will - have to tweak the installation yourself, including renaming files - with illegal or duplicate names. - - You should have a full DJGPP environment installed, including the - latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package - requires that PERL and BC also be installed. - - All of these can be obtained from the usual DJGPP mirror sites or - directly at "http://www.delorie.com/pub/djgpp". For help on which - files to download, see the DJGPP "ZIP PICKER" page at - "http://www.delorie.com/djgpp/zip-picker.html". You also need to have - the WATT-32 networking package installed before you try to compile - OpenSSL. This can be obtained from "http://www.bgnett.no/~giva/". - The Makefile assumes that the WATT-32 code is in the directory - specified by the environment variable WATT_ROOT. If you have watt-32 - in directory "watt32" under your main DJGPP directory, specify - WATT_ROOT="/dev/env/DJDIR/watt32". - - To compile OpenSSL, start your BASH shell, then configure for DJGPP by - running "./Configure" with appropriate arguments: - - ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP - - And finally fire up "make". You may run out of DPMI selectors when - running in a DOS box under Windows. If so, just close the BASH - shell, go back to Windows, and restart BASH. Then run "make" again. - - RUN-TIME CAVEAT LECTOR - -------------- - - Quoting FAQ: - - "Cryptographic software needs a source of unpredictable data to work - correctly. Many open source operating systems provide a "randomness - device" (/dev/urandom or /dev/random) that serves this purpose." - - As of version 0.9.7f DJGPP port checks upon /dev/urandom$ for a 3rd - party "randomness" DOS driver. One such driver, NOISE.SYS, can be - obtained from "http://www.rahul.net/dkaufman/index.html". diff --git a/3rdparty/openssl-1.0.0d/INSTALL.MacOS b/3rdparty/openssl-1.0.0d/INSTALL.MacOS deleted file mode 100755 index 01c60d81f9..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL.MacOS +++ /dev/null @@ -1,72 +0,0 @@ -OpenSSL - Port To The Macintosh OS 9 or Earlier -=============================================== - -Thanks to Roy Wood initial support for Mac OS (pre -X) is now provided. "Initial" means that unlike other platforms where you -get an SDK and a "swiss army" openssl application, on Macintosh you only -get one sample application which fetches a page over HTTPS(*) and dumps it -in a window. We don't even build the test applications so that we can't -guarantee that all algorithms are operational. - -Required software: - -- StuffIt Expander 5.5 or later, alternatively MacGzip and SUNtar; -- Scriptable Finder; -- CodeWarrior Pro 5; - -Installation procedure: - -- fetch the source at ftp://ftp.openssl.org/ (well, you probably already - did, huh?) -- unpack the .tar.gz file: - - if you have StuffIt Expander then just drag it over it; - - otherwise uncompress it with MacGzip and then unpack with SUNtar; -- locate MacOS folder in OpenSSL source tree and open it; -- unbinhex mklinks.as.hqx and OpenSSL.mcp.hqx if present (**), do it - "in-place", i.e. unpacked files should end-up in the very same folder; -- execute mklinks.as; -- open OpenSSL.mcp(***) and build 'GetHTTPS PPC' target(****); -- that's it for now; - -(*) URL is hardcoded into ./MacOS/GetHTTPS.src/GetHTTPS.cpp, lines 40 - to 42, change appropriately. -(**) If you use SUNtar, then it might have already unbinhexed the files - in question. -(***) The project file was saved with CW Pro 5.3. If you have an earlier - version and it refuses to open it, then download - http://www.openssl.org/~appro/OpenSSL.mcp.xml and import it - overwriting the original OpenSSL.mcp. -(****) Other targets are works in progress. If you feel like giving 'em a - shot, then you should know that OpenSSL* and Lib* targets are - supposed to be built with the GUSI, MacOS library which mimics - BSD sockets and some other POSIX APIs. The GUSI distribution is - expected to be found in the same directory as the openssl source tree, - i.e., in the parent directory to the one where this very file, - namely INSTALL.MacOS, resides. For more information about GUSI, see - http://www.iis.ee.ethz.ch/~neeri/macintosh/gusi-qa.html - -Finally some essential comments from our generous contributor:-) - -"I've gotten OpenSSL working on the Macintosh. It's probably a bit of a -hack, but it works for what I'm doing. If you don't like the way I've done -it, then feel free to change what I've done. I freely admit that I've done -some less-than-ideal things in my port, and if you don't like the way I've -done something, then feel free to change it-- I won't be offended! - -... I've tweaked "bss_sock.c" a little to call routines in a "MacSocket" -library I wrote. My MacSocket library is a wrapper around OpenTransport, -handling stuff like endpoint creation, reading, writing, etc. It is not -designed as a high-performance package such as you'd use in a webserver, -but is fine for lots of other applications. MacSocket also uses some other -code libraries I've written to deal with string manipulations and error -handling. Feel free to use these things in your own code, but give me -credit and/or send me free stuff in appreciation! :-) - -... - -If you have any questions, feel free to email me as the following: - -roy@centricsystems.ca - --Roy Wood" - diff --git a/3rdparty/openssl-1.0.0d/INSTALL.NW b/3rdparty/openssl-1.0.0d/INSTALL.NW deleted file mode 100755 index 609a7309e1..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL.NW +++ /dev/null @@ -1,454 +0,0 @@ - -INSTALLATION ON THE NETWARE PLATFORM ------------------------------------- - -Notes about building OpenSSL for NetWare. - - -BUILD PLATFORM: ---------------- -The build scripts (batch files, perl scripts, etc) have been developed and -tested on W2K. The scripts should run fine on other Windows platforms -(NT, Win9x, WinXP) but they have not been tested. They may require some -modifications. - - -Supported NetWare Platforms - NetWare 5.x, NetWare 6.x: -------------------------------------------------------- -OpenSSL can either use the WinSock interfaces introduced in NetWare 5, -or the BSD socket interface. Previous versions of NetWare, 4.x and 3.x, -are only supported if OpenSSL is build for CLIB and BSD sockets; -WinSock builds only support NetWare 5 and up. - -On NetWare there are two c-runtime libraries. There is the legacy CLIB -interfaces and the newer LIBC interfaces. Being ANSI-C libraries, the -functionality in CLIB and LIBC is similar but the LIBC interfaces are built -using Novell Kernal Services (NKS) which is designed to leverage -multi-processor environments. - -The NetWare port of OpenSSL can be configured to build using CLIB or LIBC. -The CLIB build was developed and tested using NetWare 5.0 sp6.0a. The LIBC -build was developed and tested using the NetWare 6.0 FCS. - -The necessary LIBC functionality ships with NetWare 6. However, earlier -NetWare 5.x versions will require updates in order to run the OpenSSL LIBC -build (NetWare 5.1 SP8 is known to work). - -As of June 2005, the LIBC build can be configured to use BSD sockets instead -of WinSock sockets. Call Configure (usually through netware\build.bat) using -a target of "netware-libc-bsdsock" instead of "netware-libc". - -As of June 2007, support for CLIB and BSD sockets is also now available -using a target of "netware-clib-bsdsock" instead of "netware-clib"; -also gcc builds are now supported on both Linux and Win32 (post 0.9.8e). - -REQUIRED TOOLS: ---------------- -Based upon the configuration and build options used, some or all of the -following tools may be required: - -* Perl for Win32 - required (http://www.activestate.com/ActivePerl) - Used to run the various perl scripts on the build platform. - -* Perl 5.8.0 for NetWare v3.20 (or later) - required - (http://developer.novell.com) Used to run the test script on NetWare - after building. - -* Compiler / Linker - required: - Metrowerks CodeWarrior PDK 2.1 (or later) for NetWare (commercial): - Provides command line tools used for building. - Tools: - mwccnlm.exe - C/C++ Compiler for NetWare - mwldnlm.exe - Linker for NetWare - mwasmnlm.exe - x86 assembler for NetWare (if using assembly option) - - gcc / nlmconv Cross-Compiler, available from Novell Forge (free): - http://forge.novell.com/modules/xfmod/project/?aunixnw - -* Assemblers - optional: - If you intend to build using the assembly options you will need an - assembler. Work has been completed to support two assemblers, Metrowerks - and NASM. However, during development, a bug was found in the Metrowerks - assembler which generates incorrect code. Until this problem is fixed, - the Metrowerks assembler cannot be used. - - mwasmnlm.exe - Metrowerks x86 assembler - part of CodeWarrior tools. - (version 2.2 Built Aug 23, 1999 - not useable due to code - generation bug) - - nasmw.exe - Netwide Assembler NASM - version 0.98 was used in development and testing - -* Make Tool - required: - In order to build you will need a make tool. Two make tools are - supported, GNU make (gmake.exe) or Microsoft nmake.exe. - - make.exe - GNU make for Windows (version 3.75 used for development) - http://gnuwin32.sourceforge.net/packages/make.htm - - nmake.exe - Microsoft make (Version 6.00.8168.0 used for development) - http://support.microsoft.com/kb/132084/EN-US/ - -* Novell Developer Kit (NDK) - required: (http://developer.novell.com) - - CLIB - BUILDS: - - WinSock2 Developer Components for NetWare: - For initial development, the October 27, 2000 version was used. - However, future versions should also work. - - NOTE: The WinSock2 components include headers & import files for - NetWare, but you will also need the winsock2.h and supporting - headers (pshpack4.h, poppack.h, qos.h) delivered in the - Microsoft SDK. Note: The winsock2.h support headers may change - with various versions of winsock2.h. Check the dependencies - section on the NDK WinSock2 download page for the latest - information on dependencies. These components are unsupported by - Novell. They are provided as a courtesy, but it is strongly - suggested that all development be done using LIBC, not CLIB. - - As of June 2005, the WinSock2 components are available at: - http://forgeftp.novell.com//ws2comp/ - - - NLM and NetWare libraries for C (including CLIB and XPlat): - If you are going to build a CLIB version of OpenSSL, you will - need the CLIB headers and imports. The March, 2001 NDK release or - later is recommended. - - Earlier versions should work but haven't been tested. In recent - versions the import files have been consolidated and function - names moved. This means you may run into link problems - (undefined symbols) when using earlier versions. The functions - are available in earlier versions, but you will have to modifiy - the make files to include additional import files (see - openssl\util\pl\netware.pl). - - - LIBC - BUILDS: - - Libraries for C (LIBC) - LIBC headers and import files - If you are going to build a LIBC version of OpenSSL, you will - need the LIBC headers and imports. The March 14, 2002 NDK release or - later is required. - - NOTE: The LIBC SDK includes the necessary WinSock2 support. - It is not necessary to download the WinSock2 NDK when building for - LIBC. The LIBC SDK also includes the appropriate BSD socket support - if configuring to use BSD sockets. - - -BUILDING: ---------- -Before building, you will need to set a few environment variables. You can -set them manually or you can modify the "netware\set_env.bat" file. - -The set_env.bat file is a template you can use to set up the path -and environment variables you will need to build. Modify the -various lines to point to YOUR tools and run set_env.bat. - - netware\set_env.bat [compiler] - - target - "netware-clib" - CLIB NetWare build - - "netware-libc" - LIBC NetWare build - - compiler - "gnuc" - GNU GCC Compiler - - "codewarrior" - MetroWerks CodeWarrior (default) - -If you don't use set_env.bat, you will need to set up the following -environment variables: - - PATH - Set PATH to point to the tools you will use. - - INCLUDE - The location of the NDK include files. - - CLIB ex: set INCLUDE=c:\ndk\nwsdk\include\nlm - LIBC ex: set INCLUDE=c:\ndk\libc\include - - PRELUDE - The absolute path of the prelude object to link with. For - a CLIB build it is recommended you use the "clibpre.o" files shipped - with the Metrowerks PDK for NetWare. For a LIBC build you should - use the "libcpre.o" file delivered with the LIBC NDK components. - - CLIB ex: set PRELUDE=c:\ndk\nwsdk\imports\clibpre.o - LIBC ex: set PRELUDE=c:\ndk\libc\imports\libcpre.o - - IMPORTS - The locaton of the NDK import files. - - CLIB ex: set IMPORTS=c:\ndk\nwsdk\imports - LIBC ex: set IMPORTS=c:\ndk\libc\imports - - -In order to build, you need to run the Perl scripts to configure the build -process and generate a make file. There is a batch file, -"netware\build.bat", to automate the process. - -Build.bat runs the build configuration scripts and generates a make file. -If an assembly option is specified, it also runs the scripts to generate -the assembly code. Always run build.bat from the "openssl" directory. - - netware\build [target] [debug opts] [assembly opts] [configure opts] - - target - "netware-clib" - CLIB NetWare build (WinSock Sockets) - - "netware-clib-bsdsock" - CLIB NetWare build (BSD Sockets) - - "netware-libc" - LIBC NetWare build (WinSock Sockets) - - "netware-libc-bsdsock" - LIBC NetWare build (BSD Sockets) - - debug opts - "debug" - build debug - - assembly opts - "nw-mwasm" - use Metrowerks assembler - "nw-nasm" - use NASM assembler - "no-asm" - don't use assembly - - configure opts- all unrecognized arguments are passed to the - perl 'configure' script. See that script for - internal documentation regarding options that - are available. - - examples: - - CLIB build, debug, without assembly: - netware\build.bat netware-clib debug no-asm - - LIBC build, non-debug, using NASM assembly, add mdc2 support: - netware\build.bat netware-libc nw-nasm enable-mdc2 - - LIBC build, BSD sockets, non-debug, without assembly: - netware\build.bat netware-libc-bsdsock no-asm - -Running build.bat generates a make file to be processed by your make -tool (gmake or nmake): - - CLIB ex: gmake -f netware\nlm_clib_dbg.mak - LIBC ex: gmake -f netware\nlm_libc.mak - LIBC ex: gmake -f netware\nlm_libc_bsdsock.mak - - -You can also run the build scripts manually if you do not want to use the -build.bat file. Run the following scripts in the "\openssl" -subdirectory (in the order listed below): - - perl configure no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock] - configures no assembly build for specified netware environment - (CLIB or LIBC). - - perl util\mkfiles.pl >MINFO - generates a listing of source files (used by mk1mf) - - perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock >netware\nlm.mak - generates the makefile for NetWare - - gmake -f netware\nlm.mak - build with the make tool (nmake.exe also works) - -NOTE: If you are building using the assembly option, you must also run the -various Perl scripts to generate the assembly files. See build.bat -for an example of running the various assembly scripts. You must use the -"no-asm" option to build without assembly. The configure and mk1mf scripts -also have various other options. See the scripts for more information. - - -The output from the build is placed in the following directories: - - CLIB Debug build: - out_nw_clib.dbg - static libs & test nlm(s) - tmp_nw_clib.dbg - temporary build files - outinc_nw_clib - necessary include files - - CLIB Non-debug build: - out_nw_clib - static libs & test nlm(s) - tmp_nw_clib - temporary build files - outinc_nw_clib - necesary include files - - LIBC Debug build: - out_nw_libc.dbg - static libs & test nlm(s) - tmp_nw_libc.dbg - temporary build files - outinc_nw_libc - necessary include files - - LIBC Non-debug build: - out_nw_libc - static libs & test nlm(s) - tmp_nw_libc - temporary build files - outinc_nw_libc - necesary include files - - -TESTING: --------- -The build process creates the OpenSSL static libs ( crypto.lib, ssl.lib, -rsaglue.lib ) and several test programs. You should copy the test programs -to your NetWare server and run the tests. - -The batch file "netware\cpy_tests.bat" will copy all the necessary files -to your server for testing. In order to run the batch file, you need a -drive mapped to your target server. It will create an "OpenSSL" directory -on the drive and copy the test files to it. CAUTION: If a directory with the -name of "OpenSSL" already exists, it will be deleted. - -To run cpy_tests.bat: - - netware\cpy_tests [output directory] [NetWare drive] - - output directory - "out_nw_clib.dbg", "out_nw_libc", etc. - NetWare drive - drive letter of mapped drive - - CLIB ex: netware\cpy_tests out_nw_clib m: - LIBC ex: netware\cpy_tests out_nw_libc m: - - -The Perl script, "do_tests.pl", in the "OpenSSL" directory on the server -should be used to execute the tests. Before running the script, make sure -your SEARCH PATH includes the "OpenSSL" directory. For example, if you -copied the files to the "sys:" volume you use the command: - - SEARCH ADD SYS:\OPENSSL - - -To run do_tests.pl type (at the console prompt): - - perl \openssl\do_tests.pl [options] - - options: - -p - pause after executing each test - -The do_tests.pl script generates a log file "\openssl\test_out\tests.log" -which should be reviewed for errors. Any errors will be denoted by the word -"ERROR" in the log. - -DEVELOPING WITH THE OPENSSL SDK: --------------------------------- -Now that everything is built and tested, you are ready to use the OpenSSL -libraries in your development. - -There is no real installation procedure, just copy the static libs and -headers to your build location. The libs (crypto.lib & ssl.lib) are -located in the appropriate "out_nw_XXXX" directory -(out_nw_clib, out_nw_libc, etc). - -The headers are located in the appropriate "outinc_nw_XXX" directory -(outinc_nw_clib, outinc_nw_libc). - -One suggestion is to create the following directory -structure for the OpenSSL SDK: - - \openssl - |- bin - | |- openssl.nlm - | |- (other tests you want) - | - |- lib - | | - crypto.lib - | | - ssl.lib - | - |- include - | | - openssl - | | | - (all the headers in "outinc_nw\openssl") - - -The program "openssl.nlm" can be very useful. It has dozens of -options and you may want to keep it handy for debugging, testing, etc. - -When building your apps using OpenSSL, define "NETWARE". It is needed by -some of the OpenSSL headers. One way to do this is with a compile option, -for example "-DNETWARE". - - - -NOTES: ------- - -Resource leaks in Tests ------------------------- -Some OpenSSL tests do not clean up resources and NetWare reports -the resource leaks when the tests unload. If this really bugs you, -you can stop the messages by setting the developer option off at the console -prompt (set developer option = off). Or better yet, fix the tests to -clean up the resources! - - -Multi-threaded Development ---------------------------- -The NetWare version of OpenSSL is thread-safe, however multi-threaded -applications must provide the necessary locking function callbacks. This -is described in doc\threads.doc. The file "openssl-x.x.x\crypto\threads\mttest.c" -is a multi-threaded test program and demonstrates the locking functions. - - -What is openssl2.nlm? ---------------------- -The openssl program has numerous options and can be used for many different -things. Many of the options operate in an interactive mode requiring the -user to enter data. Because of this, a default screen is created for the -program. However, when running the test script it is not desirable to -have a seperate screen. Therefore, the build also creates openssl2.nlm. -Openssl2.nlm is functionally identical but uses the console screen. -Openssl2 can be used when a non-interactive mode is desired. - -NOTE: There are may other possibilities (command line options, etc) -which could have been used to address the screen issue. The openssl2.nlm -option was chosen because it impacted only the build not the code. - - -Why only static libraries? --------------------------- -Globals, globals, and more globals. The OpenSSL code uses many global -variables that are allocated and initialized when used for the first time. - -On NetWare, most applications (at least historically) run in the kernel. -When running in the kernel, there is one instance of global variables. -For regular application type NLM(s) this isn't a problem because they are -the only ones using the globals. However, for a library NLM (an NLM which -exposes functions and has no threads of execution), the globals cause -problems. Applications could inadvertently step on each other if they -change some globals. Even worse, the first application that triggers a -global to be allocated and initialized has the allocated memory charged to -itself. Now when that application unloads, NetWare will clean up all the -applicaton's memory. The global pointer variables inside OpenSSL now -point to freed memory. An abend waiting to happen! - -To work correctly in the kernel, library NLM(s) that use globals need to -provide a set of globals (instance data) for each application. Another -option is to require the library only be loaded in a protected address -space along with the application using it. - -Modifying the OpenSSL code to provide a set of globals (instance data) for -each application isn't technically difficult, but due to the large number -globals it would require substantial code changes and it wasn't done. Hence, -the build currently only builds static libraries which are then linked -into each application. - -NOTE: If you are building a library NLM that uses the OpenSSL static -libraries, you will still have to deal with the global variable issue. -This is because when you link in the OpenSSL code you bring in all the -globals. One possible solution for the global pointer variables is to -register memory functions with OpenSSL which allocate memory and charge it -to your library NLM (see the function CRYPTO_set_mem_functions). However, -be aware that now all memory allocated by OpenSSL is charged to your NLM. - - -CodeWarrior Tools and W2K ---------------------------- -There have been problems reported with the CodeWarrior Linker -(mwldnlm.exe) in the PDK 2.1 for NetWare when running on Windows 2000. The -problems cause the link step to fail. The only work around is to obtain an -updated linker from Metrowerks. It is expected Metrowerks will release -PDK 3.0 (in beta testing at this time - May, 2001) in the near future which -will fix these problems. - - -Makefile "vclean" ------------------- -The generated makefile has a "vclean" target which cleans up the build -directories. If you have been building successfully and suddenly -experience problems, use "vclean" (gmake -f netware\nlm_xxxx.mak vclean) and retry. - - -"Undefined Symbol" Linker errors --------------------------------- -There have been linker errors reported when doing a CLIB build. The problems -occur because some versions of the CLIB SDK import files inadvertently -left out some symbols. One symbol in particular is "_lrotl". The missing -functions are actually delivered in the binaries, but they were left out of -the import files. The issues should be fixed in the September 2001 release -of the NDK. If you experience the problems you can temporarily -work around it by manually adding the missing symbols to your version of -"clib.imp". - diff --git a/3rdparty/openssl-1.0.0d/INSTALL.OS2 b/3rdparty/openssl-1.0.0d/INSTALL.OS2 deleted file mode 100755 index 530316db18..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL.OS2 +++ /dev/null @@ -1,31 +0,0 @@ - - Installation on OS/2 - -------------------- - - You need to have the following tools installed: - - * EMX GCC - * PERL - * GNU make - - - To build the makefile, run - - > os2\os2-emx - - This will configure OpenSSL and create OS2-EMX.mak which you then use to - build the OpenSSL libraries & programs by running - - > make -f os2-emx.mak - - If that finishes successfully you will find the libraries and programs in the - "out" directory. - - Alternatively, you can make a dynamic build that puts the library code into - crypto.dll and ssl.dll by running - - > make -f os2-emx-dll.mak - - This will build the above mentioned dlls and a matching pair of import - libraries in the "out_dll" directory along with the set of test programs - and the openssl application. diff --git a/3rdparty/openssl-1.0.0d/INSTALL.VMS b/3rdparty/openssl-1.0.0d/INSTALL.VMS deleted file mode 100755 index 7658f64e1d..0000000000 --- a/3rdparty/openssl-1.0.0d/INSTALL.VMS +++ /dev/null @@ -1,299 +0,0 @@ - VMS Installation instructions - written by Richard Levitte - - - -Intro: -====== - -This file is divided in the following parts: - - Requirements - Mandatory reading. - Checking the distribution - Mandatory reading. - Compilation - Mandatory reading. - Logical names - Mandatory reading. - Test - Mandatory reading. - Installation - Mandatory reading. - Backward portability - Read if it's an issue. - Possible bugs or quirks - A few warnings on things that - may go wrong or may surprise you. - TODO - Things that are to come. - - -Requirements: -============= - -To build and install OpenSSL, you will need: - - * DEC C or some other ANSI C compiler. VAX C is *not* supported. - [Note: OpenSSL has only been tested with DEC C. Compiling with - a different ANSI C compiler may require some work] - -Checking the distribution: -========================== - -There have been reports of places where the distribution didn't quite get -through, for example if you've copied the tree from a NFS-mounted Unix -mount point. - -The easiest way to check if everything got through as it should is to check -for one of the following files: - - [.CRYPTO]OPENSSLCONF.H_IN - [.CRYPTO]OPENSSLCONF_H.IN - -They should never exist both at once, but one of them should (preferably -the first variant). If you can't find any of those two, something went -wrong. - -The best way to get a correct distribution is to download the gzipped tar -file from ftp://ftp.openssl.org/source/, use GUNZIP to uncompress it and -use VMSTAR to unpack the resulting tar file. - -GUNZIP is available in many places on the net. One of the distribution -points is the WKU software archive, ftp://ftp.wku.edu/vms/fileserv/ . - -VMSTAR is also available in many places on the net. The recommended place -to find information about it is http://www.free.lp.se/vmstar/ . - - -Compilation: -============ - -I've used the very good command procedures written by Robert Byer -, and just slightly modified them, making -them slightly more general and easier to maintain. - -You can actually compile in almost any directory separately. Look -for a command procedure name xxx-LIB.COM (in the library directories) -or MAKExxx.COM (in the program directories) and read the comments at -the top to understand how to use them. However, if you want to -compile all you can get, the simplest is to use MAKEVMS.COM in the top -directory. The syntax is the following: - - @MAKEVMS