-dnl Copyright © 2020 Nick Bowler
+dnl Copyright © 2020, 2022-2023 Nick Bowler
dnl License GPLv2+: GNU General Public License version 2 or any later version.
dnl This is free software: you are free to change and redistribute it.
dnl There is NO WARRANTY, to the extent permitted by law.
}
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-fooable.o main.o])
AT_CHECK([./main], [0], [42
])
}
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-a-mod.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-a-mod.o test-fooable.o main.o])
AT_CHECK([./main], [0], [54
])
}
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-b.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-b.o test-fooable.o main.o])
AT_CHECK([./main], [0], [Test:A foo called
42
Test:B foo called
}
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-b.o test-b-mod.o test-fooable.o main.o])
-
+TEST_LINK_GOBJECT([main],
+ [test-a.o test-b.o test-b-mod.o test-fooable.o main.o])
AT_CHECK([./main], [0], [Test:A foo called
42
Test:B foo called
}
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-a-mod.o test-b.o test-b-mod.o test-fooable.o main.o])
-
+TEST_LINK_GOBJECT([main],
+ [test-a.o test-a-mod.o test-b.o test-b-mod.o test-fooable.o main.o])
AT_CHECK([./main], [0], [Test:A foo called
42
Test:B foo called
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-b.o test-c.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-b.o test-c.o test-fooable.o main.o])
AT_CHECK([./main], [0], [Test:C foo called
Test:B foo called
Test:A foo called
]])
TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
- test-a.o test-a-mod.o test-b.o test-b-mod.o test-c.o test-c-mod.o \
- test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], m4_join([ ],
+ [test-a.o test-a-mod.o test-b.o test-b-mod.o test-c.o test-c-mod.o],
+ [test-fooable.o main.o]))
AT_CHECK([./main], [0], [Test:C foo called
Test:B foo called
Test:A foo called