]> git.draconx.ca Git - gob-dx.git/blobdiff - tests/general.at
Use libtool to link programs in the testsuite.
[gob-dx.git] / tests / general.at
index 52c3fcac43209cfb096fdf8da35c3047a39e1049..a9d2def55164919beb56d118a84a502838cc7a10 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2019-2022 Nick Bowler
+dnl Copyright © 2019-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.
@@ -77,7 +77,7 @@ TEST_COMPILE_GOBJECT([str.c], [0], [], [stderr])
 mv stderr str_stderr
 TEST_COMPILE_GOBJECT([main.c], [0], [], [stderr])
 mv stderr main_stderr
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main str.o main.o])
+TEST_LINK_GOBJECT([main], [str.o main.o])
 
 AT_DATA([str.awk],
 [[/want a string/ { lines[NR] = 1; }
@@ -141,8 +141,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main test.o main.o])
+TEST_LINK_GOBJECT([main], [test.o main.o])
 
 AT_CLEANUP
 
@@ -207,9 +206,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test.o test-mod.o main.o])
+TEST_LINK_GOBJECT([main], [test.o test-mod.o main.o])
 AT_CHECK([./main], [0], [Hello, World
 ])
 
@@ -294,9 +291,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test.o main.o])
+TEST_LINK_GOBJECT([main], [test.o main.o])
 AT_CHECK([./main], [0], [42
 123
 ])
@@ -342,9 +337,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test.o test-mod.o main.o])
+TEST_LINK_GOBJECT([main], [test.o test-mod.o main.o])
 AT_CHECK([./main], [0], [54
 123
 ])