warn-on-use: use instead of link-warning
[pspp] / m4 / langinfo_h.m4
index 4975734cb29c34742a8f137e52c6fe0c893c9893..a4c5409dd047f25b6404a9bb0776d4070c4c32c7 100644 (file)
@@ -1,5 +1,5 @@
-# langinfo_h.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# langinfo_h.m4 serial 3
+dnl Copyright (C) 2009, 2010 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.
@@ -52,12 +52,10 @@ int a = ERA;
   AC_SUBST([HAVE_LANGINFO_CODESET])
   AC_SUBST([HAVE_LANGINFO_ERA])
 
-  if test $HAVE_LANGINFO_H = 1 && test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
-    LANGINFO_H=
-  else
-    LANGINFO_H='langinfo.h'
-  fi
-  AC_SUBST([LANGINFO_H])
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
+    ]], [nl_langinfo])
 ])
 
 AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],