CVS update: /ccvs/m4/

[email protected] 13 May 2005 02:59:11 -0000
Newsgroups gmane.comp.version-control.cvs.cvs
Message-ID <[email protected]>
User: dprice  
Date: 05/05/12 19:59:11

Added:
 /ccvs/m4/
  d-type.m4

Modified:
 /ccvs/m4/
  ChangeLog, glob.m4

Log:
 * d-type.m4: New file from GNULIB.
 * glob.m4 (gl_GLOB): Remove indirection.  Check gnu-versions.h instead
 of looking for glob_pattern_p().  Use new d-type macro.
 (gl_PREREQ_GLOB): Reformat to remove blanks line in the generated
 configure script.

File Changes:

Directory: /ccvs/m4/
====================

File [changed]: ChangeLog
Url: https://ccvs.cvshome.org/source/browse/ccvs/m4/ChangeLog?r1=1.120&r2=1.121
Delta lines:  +8 -0
-------------------
--- ChangeLog	11 May 2005 19:53:12 -0000	1.120
+++ ChangeLog	13 May 2005 02:59:09 -0000	1.121
@@ -1,3 +1,11 @@
+2005-05-12  Derek Price  <[email protected]>
+
+	* d-type.m4: New file from GNULIB.
+	* glob.m4 (gl_GLOB): Remove indirection.  Check gnu-versions.h instead
+	of looking for glob_pattern_p().  Use new d-type macro.
+	(gl_PREREQ_GLOB): Reformat to remove blanks line in the generated
+	configure script.
+
 2005-05-11  Derek Price  <[email protected]>
 
 	* glob.m4: New file.

File [added]: d-type.m4
Url: https://ccvs.cvshome.org/source/browse/ccvs/m4/d-type.m4?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 49
---------------
#serial 8

dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl

# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
  [AC_REQUIRE([AC_HEADER_DIRENT])dnl
   AC_CACHE_CHECK([for d_type member in directory struct],
		  jm_cv_struct_dirent_d_type,
     [AC_TRY_LINK(dnl
       [
#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
#  include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# ifdef HAVE_SYS_DIR_H
#  include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# ifdef HAVE_NDIR_H
#  include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
       ],
       [struct dirent dp; dp.d_type = 0;],

       jm_cv_struct_dirent_d_type=yes,
       jm_cv_struct_dirent_d_type=no)
     ]
   )
   if test $jm_cv_struct_dirent_d_type = yes; then
     AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
       [Define if there is a member named d_type in the struct describing
        directory headers.])
   fi
  ]
)

File [changed]: glob.m4
Url: https://ccvs.cvshome.org/source/browse/ccvs/m4/glob.m4?r1=1.1&r2=1.2
Delta lines:  +15 -14
---------------------
--- glob.m4	11 May 2005 19:53:12 -0000	1.1
+++ glob.m4	13 May 2005 02:59:09 -0000	1.2
@@ -24,23 +24,24 @@
 [
   gl_PREREQ_GLOB
 
-  if test -z "$GLOB_H"; then
     GLOB_H=
-    AC_CHECK_HEADERS([glob.h], [], [GLOB_H=glob.h])
+  AC_CHECK_HEADERS([glob.h gnu-versions.h], [], [GLOB_H=glob.h])
+
     if test -z "$GLOB_H"; then
-      AC_CHECK_FUNCS([glob_pattern_p], [], [GLOB_H=glob.h])
+    AC_EGREP_CPP([gl_gnu_glob_version = 1$],
+[#include <gnu-versions.h>
+gl_gnu_glob_version = _GNU_GLOB_INTERFACE_VERSION],
+      [], [GLOB_H=glob.h])
     fi
 
     if test -n "$GLOB_H"; then
       gl_GLOB_SUBSTITUTE
     fi
-  fi
 ])
 
 # Prerequisites of lib/glob.*.
-AC_DEFUN([gl_PREREQ_GLOB], [
-  AC_CHECK_HEADERS_ONCE([dirent.h sys/ndir.h sys/dir.h ndir.h])
-  AC_CHECK_FUNCS_ONCE([dirent64 getlogin_r getpwnam_r stat64])
-  AC_CHECK_MEMBERS([struct dirent.d_type],,, [#include <dirent.h>])
-  :
-])
+AC_DEFUN([gl_PREREQ_GLOB],
+[ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl
+  AC_CHECK_HEADERS_ONCE([dirent.h sys/ndir.h sys/dir.h ndir.h])dnl
+  AC_CHECK_FUNCS_ONCE([dirent64 getlogin_r getpwnam_r stat64])dnl
+  :])