configure fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-07-11 09:34:10 +00:00
commit b7340dd4d6
14 changed files with 9 additions and 159 deletions

View file

@ -18,3 +18,4 @@ run:
clean:
rm -f *.o *.out *.so *.a *.dll *.exe *_wrap* *_proxy* *~
check: all

View file

@ -1,35 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
int main(int argc, char** argv) {
MyClass* mc = new_MyClass();
A* a = new_A(123), *b = new_A(234), *as[5];
int i, j = 321, *js[5];
double d = 55.0;
for (i = 0; i < 4; ++i) {
as[i] = new_A(20 + i);
js[i] = (int*) malloc(sizeof(int));
*js[i] = 10 + i;
}
as[i] = 0;
js[i] = 0;
MyClass_bar(mc, j, &j, js);
MyClass_foo(mc, a, b, as);
MyClass_foo_1(mc, a, b);
MyClass_foo_1(mc, a, b);
MyClass_foo_2(mc, &j, &d);
MyClass_foo_2(mc, &j, &d);
delete_A(a);
delete_A(b);
delete_MyClass(mc);
for (i = 0; i < 4; ++i)
delete_A(as[i]);
}

View file

@ -18,3 +18,4 @@ run:
clean:
rm -f *.o *.out *.so *.a *.dll *.exe *_wrap* *_proxy* *~
check: all

View file

@ -1,42 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
int main(int argc, char **argv) {
printf("Creating some objects:\n");
Circle* c = new_Circle(10);
printf(" Created circle\n");
Square* s = new_Square(10);
printf(" Created square\n");
printf("\nA total of %d shapes were created\n", Shape_get_nshapes());
Circle_set_x(c, 20);
Circle_set_y(c, 30);
Shape* shape = (Shape*) s;
Shape_set_x(shape, -10);
Shape_set_y(shape, 5);
printf("\nHere is their current positions:\n");
printf(" Circle = (%f %f)\n", Circle_get_x(c), Circle_get_y(c));
printf(" Square = (%f %f)\n", Square_get_x(s), Square_get_y(s));
printf("\nHere are some properties of the shapes:\n");
Shape* shapes[] = {(Shape*) c, (Shape*) s};
int i;
for (i = 0; i < 2; i++) {
printf(" %s\n", i ? "Square" : "Circle");
printf(" area = %f\n", Shape_area(shapes[i]));
printf(" perimeter = %f\n", Shape_perimeter(shapes[i]));
}
printf("\nGuess I'll clean up now\n");
delete_Square(s);
delete_Circle(c);
printf("%d shapes remain\n", Shape_get_nshapes());
printf("Goodbye\n");
}

View file

@ -1,6 +0,0 @@
#!/bin/sh
LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
./a.out

View file

@ -1,20 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
int main(int argc, char **argv) {
geom_Circle* pc = new_geom_Circle(10.0);
geom_Square* ps = new_geom_Square(10.0);
printf("Circle perim.=%f, area=%f\n", geom_Circle_perimeter(pc), geom_Circle_area(pc));
printf("Square perim.=%f, area=%f\n", geom_Square_perimeter(ps), geom_Square_area(ps));
printf("Circle pos.=(%f, %f)\n", geom_Shape_get_x(pc), geom_Shape_get_y(pc));
geom_Shape_move(pc, 5.0, -5.0);
printf("After move pos.=(%f, %f)\n", geom_Shape_get_x(pc), geom_Shape_get_y(pc));
delete_geom_Square(ps);
delete_geom_Circle(pc);
}

View file

@ -18,3 +18,4 @@ run:
clean:
rm -f *.o *.out *.so *.a *.dll *.exe *_wrap* *_proxy* *~
check: all

View file

@ -1,21 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
void test(Bar * bar) {
printf("value of x is %d\n", Bar_get(bar));
}
int main(int argc, char** argv) {
Bar* bar = new_Bar();
test(bar);
foo_by_val(bar);
test(bar);
foo_by_ptr(bar);
test(bar);
foo_by_ref(bar);
test(bar);
delete_Bar(bar);
return 0;
}

View file

@ -18,3 +18,4 @@ run:
clean:
rm -f *.o *.out *.so *.a *.dll *.exe *_wrap* *_proxy* *~
check: all

View file

@ -1,10 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
int main(int argc, char** argv) {
Bar b = foo_ret_val();
//Bar * bp = foo_ret_ptr(NULL);
printf("x = %d\n", Bar_get(&b));
}

View file

@ -18,3 +18,4 @@ run:
clean:
rm -f *.o *.so *.out *.a *.exe *.dll *_wrap* *_proxy* *~
check: all

View file

@ -1,15 +0,0 @@
#include <stdio.h>
#include "example_proxy.h"
int main(int argc, char **argv) {
int a = 35;
int b = 15;
printf("Foo is %f\n", Foo);
printf("Foo by ptr is \%f\n", *Foo_ptr);
printf("my_str is: %s\n", my_str);
printf("GCD(%d, %d)=%d\n", a, b, gcd(a, b));
printf("array_of_strs contains %s and %s\n", get_str(0, 0, 0), get_str(1, 0, 0));
return 0;
}

View file

@ -1,6 +0,0 @@
#!/bin/sh
LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
./a.out

View file

@ -1959,10 +1959,10 @@ SKIP_UFFI=
#fi
AC_SUBST(SKIP_UFFI)
SKIP_C=
if test -x "$(CC)" || test -z "$(CXX)" ; then
SKIP_C="1"
fi
SKIP_C=""
#if test -x "$(CC)" || test -z "$(CXX)" ; then
# SKIP_C="1"
#fi
AC_SUBST(SKIP_C)
#----------------------------------------------------------------