-#serial 14
-dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+#serial 17
+dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_CHECK_FUNCS_ONCE([dup2])
if test $ac_cv_func_dup2 = no; then
HAVE_DUP2=0
- AC_LIBOBJ([dup2])
fi
], [
AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
esac])
])
if test "$gl_cv_func_dup2_works" = no; then
- gl_REPLACE_DUP2
+ REPLACE_DUP2=1
fi
fi
dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
m4_ifdef([gl_FUNC_FCHDIR], [
gl_TEST_FCHDIR
if test $HAVE_FCHDIR = 0; then
- gl_REPLACE_DUP2
+ if test $HAVE_DUP2 = 1; then
+ REPLACE_DUP2=1
+ fi
fi
])
])
-AC_DEFUN([gl_REPLACE_DUP2],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([dup2])
- if test $ac_cv_func_dup2 = yes; then
- REPLACE_DUP2=1
- fi
- AC_LIBOBJ([dup2])
-])
+# Prerequisites of lib/dup2.c.
+AC_DEFUN([gl_PREREQ_DUP2], [])