X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fobstack-printf.m4;h=d07af216c95cd2d8ac8939254ecf51713a5ec3eb;hb=fba50604716b355a02d023ef5c2f7a7897b07536;hp=98860c2e666640761666dbe3589383094be42ac2;hpb=7a8101a246b1c7aa64cd2f95ad2a43a2bf2ee891;p=gnulib.git diff --git a/m4/obstack-printf.m4 b/m4/obstack-printf.m4 index 98860c2e6..d07af216c 100644 --- a/m4/obstack-printf.m4 +++ b/m4/obstack-printf.m4 @@ -1,5 +1,5 @@ -# obstack-printf.m4 serial 1 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# obstack-printf.m4 serial 3 +dnl Copyright (C) 2008-2011 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. @@ -10,16 +10,16 @@ dnl obstack_vprintf behaves identically, so we only test for one. AC_DEFUN([gl_FUNC_OBSTACK_PRINTF], [ + dnl Persuade glibc to declare obstack_printf(), obstack_vprintf(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([obstack_printf]) if test $ac_cv_func_obstack_printf = no ; then gl_REPLACE_OBSTACK_PRINTF fi - AC_CHECK_DECLS_ONCE([obstack_printf]) - if test $ac_cv_have_decl_obstack_printf = no; then - HAVE_DECL_OBSTACK_PRINTF=0 - fi + gl_DECL_OBSTACK_PRINTF ]) AC_DEFUN([gl_REPLACE_OBSTACK_PRINTF], @@ -30,3 +30,13 @@ AC_DEFUN([gl_REPLACE_OBSTACK_PRINTF], REPLACE_OBSTACK_PRINTF=1 fi ]) + +dnl Ensure obstack_printf() and obstack_vprintf() are declared +dnl (whether or not they are being replaced). +AC_DEFUN([gl_DECL_OBSTACK_PRINTF], +[ + AC_CHECK_DECLS_ONCE([obstack_printf]) + if test $ac_cv_have_decl_obstack_printf = no; then + HAVE_DECL_OBSTACK_PRINTF=0 + fi +])