From 7a1cd873ff461aa546f9bbaaa2a622b65d7d9820 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 20 Oct 2008 13:06:51 +0200 Subject: [PATCH] Use AC_LANG_SOURCE instead of AC_LANG_PROGRAM. --- ChangeLog | 5 +++++ m4/posix_spawn.m4 | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2414e6fcc..808ebc5f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-20 Bruno Haible + + * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Use AC_LANG_SOURCE instead + of AC_LANG_PROGRAM. + 2008-10-20 Simon Josefsson * lib/netdb.in.h: Don't define GNU specific constants until they diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4 index 8d9ae4c46..a6839eec9 100644 --- a/m4/posix_spawn.m4 +++ b/m4/posix_spawn.m4 @@ -59,7 +59,7 @@ AC_DEFUN([gl_POSIX_SPAWN_WORKS], AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether posix_spawn works], [gl_cv_func_posix_spawn_works], [if test $cross_compiling = no; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -109,10 +109,11 @@ fd_safer (int fd) } return fd; -} -]], -dnl Now comes the main() function. -[[ +} + +int +main () +{ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL }; int ofd[2]; sigset_t blocked_signals; @@ -181,6 +182,8 @@ dnl Now comes the main() function. fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus); exit (1); } + return 0; +} ]])], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext > conftest.out \ -- 2.11.0