From: Bruno Haible Date: Sun, 8 May 2011 09:32:02 +0000 (+0200) Subject: getdelim: Move AC_LIBOBJ invocations to module description. X-Git-Tag: v0.1~2569 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=f1672b847030e825a15ae574f23e0bfe1a3c80fb;p=gnulib.git getdelim: Move AC_LIBOBJ invocations to module description. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ and gl_PREREQ_GETDELIM invocations from here... * modules/getdelim (configure.ac): ... to here. (Depends-on): Fix condition. --- diff --git a/ChangeLog b/ChangeLog index df46330d4..10470203a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-05-08 Bruno Haible + getdelim: Move AC_LIBOBJ invocations to module description. + * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ + and gl_PREREQ_GETDELIM invocations from here... + * modules/getdelim (configure.ac): ... to here. + (Depends-on): Fix condition. + +2011-05-08 Bruno Haible + getcwd: Move AC_LIBOBJ invocations to module description. * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD invocations from here... diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 index ef1273668..6a0f632c7 100644 --- a/m4/getdelim.m4 +++ b/m4/getdelim.m4 @@ -1,4 +1,4 @@ -# getdelim.m4 serial 8 +# getdelim.m4 serial 9 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. dnl @@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_GETDELIM], AC_CHECK_FUNCS_ONCE([getdelim]) if test $ac_cv_func_getdelim = yes; then + HAVE_GETDELIM=1 dnl Found it in some library. Verify that it works. AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data @@ -65,21 +66,16 @@ AC_DEFUN([gl_FUNC_GETDELIM], [gl_cv_func_working_getdelim=yes], [gl_cv_func_working_getdelim=no])] )]) + if test $gl_cv_func_working_getdelim = no; then + REPLACE_GETDELIM=1 + fi else - gl_cv_func_working_getdelim=no + HAVE_GETDELIM=0 fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi - - if test $gl_cv_func_working_getdelim = no; then - if test $ac_cv_func_getdelim = yes; then - REPLACE_GETDELIM=1 - fi - AC_LIBOBJ([getdelim]) - gl_PREREQ_GETDELIM - fi ]) # Prerequisites of lib/getdelim.c. diff --git a/modules/getdelim b/modules/getdelim index c3ef317a1..e84558cc2 100644 --- a/modules/getdelim +++ b/modules/getdelim @@ -8,12 +8,16 @@ m4/getdelim.m4 Depends-on: stdio extensions -stdint [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] -realloc-posix [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] -errno [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] +stdint [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] +realloc-posix [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] +errno [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1] configure.ac: gl_FUNC_GETDELIM +if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then + AC_LIBOBJ([getdelim]) + gl_PREREQ_GETDELIM +fi gl_STDIO_MODULE_INDICATOR([getdelim]) Makefile.am: