From 99e8c6b00e5399e9d22fd5a0d27dc523d9ea0373 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 Dec 2011 15:57:00 +0100 Subject: sethostname tests: Fix link error on mingw. * tests/test-sethostname1.c: New file, extracted from tests/test-sethostname.c. * tests/test-sethostname2.c: New file, extracted from tests/test-sethostname.c. * tests/test-sethostname.c: Remove file. * modules/sethostname-tests (Files): Add tests/test-sethostname1.c, tests/test-sethostname2.c. Remove tests/test-sethostname.c. (Depends-on): Add gethostname. (Makefile.am): Compile both test-sethostname1 and test-sethostname2. Link the latter with $(GETHOSTNAME_LIB). --- modules/sethostname-tests | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/sethostname-tests') diff --git a/modules/sethostname-tests b/modules/sethostname-tests index 4435769f4c..3529abb2c9 100644 --- a/modules/sethostname-tests +++ b/modules/sethostname-tests @@ -1,13 +1,16 @@ Files: -tests/test-sethostname.c +tests/test-sethostname1.c +tests/test-sethostname2.c tests/signature.h tests/macros.h Depends-on: +gethostname configure.ac: AC_CHECK_FUNCS_ONCE([geteuid]) Makefile.am: -TESTS += test-sethostname -check_PROGRAMS += test-sethostname +TESTS += test-sethostname1 test-sethostname2 +check_PROGRAMS += test-sethostname1 test-sethostname2 +test_sethostname2_LDADD = $(LDADD) @GETHOSTNAME_LIB@ -- cgit v1.2.1