X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fftello.m4;h=42be83e5a9f8189e75465255faa4cdd70565b5cb;hb=9e83e486f6e0949ad5d3843011ae88c495681727;hp=38bcf437ee321903f32c9bab93ca098700c9f5ea;hpb=ec062d7a2671739dd977ebde3965fc93f8678a2e;p=gnulib.git diff --git a/m4/ftello.m4 b/m4/ftello.m4 index 38bcf437e..42be83e5a 100644 --- a/m4/ftello.m4 +++ b/m4/ftello.m4 @@ -1,5 +1,5 @@ -# ftello.m4 serial 8 -dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. +# ftello.m4 serial 10 +dnl Copyright (C) 2007-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. @@ -13,6 +13,11 @@ AC_DEFUN([gl_FUNC_FTELLO], dnl Persuade glibc to declare ftello(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_DECLS_ONCE([ftello]) + if test $ac_cv_have_decl_ftello = no; then + HAVE_DECL_FTELLO=0 + fi + AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], [ AC_LINK_IFELSE( @@ -47,7 +52,8 @@ changequote(,)dnl *) gl_cv_func_ftello_works="guessing yes" ;; esac changequote([,])dnl - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include #include @@ -104,7 +110,9 @@ main (void) /* The file's contents is now "foogarsh!". */ return 0; -}], [gl_cv_func_ftello_works=yes], [gl_cv_func_ftello_works=no], [:]) +}]])], + [gl_cv_func_ftello_works=yes], + [gl_cv_func_ftello_works=no], [:]) ]) case "$gl_cv_func_ftello_works" in *yes) ;; @@ -116,12 +124,4 @@ main (void) esac fi fi - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - gl_REPLACE_FTELLO - fi -]) - -AC_DEFUN([gl_REPLACE_FTELLO], -[ - AC_LIBOBJ([ftello]) ])