warnings: fix compilation with old autoconf
[gnulib/ericb.git] / m4 / wcswidth.m4
blob4b86fdada53112759d4065aa8bbdbc0cc0b6a3c6
1 # wcswidth.m4 serial 2
2 dnl Copyright (C) 2011-2017 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.
7 AC_DEFUN([gl_FUNC_WCSWIDTH],
9   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
10   AC_REQUIRE([gl_FUNC_WCWIDTH])
11   AC_CHECK_FUNCS_ONCE([wcswidth])
12   if test $ac_cv_func_wcswidth = no; then
13     HAVE_WCSWIDTH=0
14   else
15     if test $REPLACE_WCWIDTH = 1; then
16       dnl If wcwidth needed to be replaced, wcswidth needs to be replaced
17       dnl as well.
18       REPLACE_WCSWIDTH=1
19     fi
20   fi