32f2e26b7aa601b6aa6bab194df51027190ae5b2
[gnulib.git] / m4 / fclose.m4
1 # fclose.m4 serial 5
2 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_FUNC_FCLOSE],
8 [
9   gl_FUNC_FFLUSH_STDIN
10   if test $gl_cv_func_fflush_stdin = no; then
11     gl_REPLACE_FCLOSE
12   fi
13
14   AC_REQUIRE([gl_FUNC_CLOSE])
15   if test $REPLACE_CLOSE = 1; then
16     gl_REPLACE_FCLOSE
17   fi
18 ])
19
20 AC_DEFUN([gl_REPLACE_FCLOSE],
21 [
22   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
23   REPLACE_FCLOSE=1
24   AC_LIBOBJ([fclose])
25 ])