summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile.in1
-rw-r--r--m4/dirname.m416
-rw-r--r--m4/dos.m458
-rw-r--r--m4/gnulib-cache.m44
-rw-r--r--m4/gnulib-comp.m47
5 files changed, 84 insertions, 2 deletions
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 9ebf7a4..2c2dcba 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -41,6 +41,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/closeout.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/d-ino.m4 \
+ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exclude.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
diff --git a/m4/dirname.m4 b/m4/dirname.m4
new file mode 100644
index 0000000..e36937d
--- /dev/null
+++ b/m4/dirname.m4
@@ -0,0 +1,16 @@
+# dirname.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2004, 2005 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.
+
+AC_DEFUN([gl_DIRNAME],
+[
+ AC_LIBSOURCES([dirname.c, dirname.h])
+ AC_LIBOBJ([dirname])
+
+ dnl Prerequisites of lib/dirname.h.
+ AC_REQUIRE([gl_AC_DOS])
+
+ dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c.
+])
diff --git a/m4/dos.m4 b/m4/dos.m4
new file mode 100644
index 0000000..0713cf1
--- /dev/null
+++ b/m4/dos.m4
@@ -0,0 +1,58 @@
+#serial 9
+
+# Define some macros required for proper operation of code in lib/*.c
+# on MSDOS/Windows systems.
+
+# Copyright (C) 2000, 2001, 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.
+
+# From Jim Meyering.
+
+AC_DEFUN([gl_AC_DOS],
+ [
+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
+ [
+ AC_TRY_COMPILE([],
+ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif],
+ [ac_cv_win_or_dos=yes],
+ [ac_cv_win_or_dos=no])
+ ])
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ fi
+
+ AH_VERBATIM(FILE_SYSTEM_PREFIX_LEN,
+ [#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+#endif])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
+ $ac_fs_accepts_drive_letter_prefix,
+ [Define on systems for which file names may have a so-called
+ `drive letter' prefix, define this to compute the length of that
+ prefix, including the colon.])
+
+ AH_VERBATIM(ISSLASH,
+ [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
+ $ac_fs_backslash_is_file_name_separator,
+ [Define if the backslash character may also serve as a file name
+ component separator.])
+ ])
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index 0cd632c..2257882 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -14,10 +14,10 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --aux-dir=. --macro-prefix=gl alloca alloca-opt atexit closeout error exclude exit exitfail extensions fnmatch fnmatch-gnu fpending getcwd getopt gettext gettext-h havelib inttostr lstat malloc mbchar mbuiter memchr memcpy mempcpy memset obstack pathmax quotearg realloc regex restrict stat-macros stdbool strcase strcspn strdup strnlen1 strpbrk strsep strstr xalloc xalloc-die xgetcwd
+# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --aux-dir=. --macro-prefix=gl alloca alloca-opt atexit closeout dirname error exclude exit exitfail extensions fnmatch fnmatch-gnu fpending getcwd getopt gettext gettext-h havelib inttostr lstat malloc mbchar mbuiter memchr memcpy mempcpy memset obstack pathmax quotearg realloc regex restrict stat-macros stdbool strcase strcspn strdup strnlen1 strpbrk strsep strstr xalloc xalloc-die xgetcwd
# Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_MODULES([alloca alloca-opt atexit closeout error exclude exit exitfail extensions fnmatch fnmatch-gnu fpending getcwd getopt gettext gettext-h havelib inttostr lstat malloc mbchar mbuiter memchr memcpy mempcpy memset obstack pathmax quotearg realloc regex restrict stat-macros stdbool strcase strcspn strdup strnlen1 strpbrk strsep strstr xalloc xalloc-die xgetcwd])
+gl_MODULES([alloca alloca-opt atexit closeout dirname error exclude exit exitfail extensions fnmatch fnmatch-gnu fpending getcwd getopt gettext gettext-h havelib inttostr lstat malloc mbchar mbuiter memchr memcpy mempcpy memset obstack pathmax quotearg realloc regex restrict stat-macros stdbool strcase strcspn strdup strnlen1 strpbrk strsep strstr xalloc xalloc-die xgetcwd])
gl_AVOID([])
gl_SOURCE_BASE([lib])
gl_M4_BASE([m4])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index f33dbbb..96b0f7c 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -29,6 +29,7 @@ AC_DEFUN([gl_INIT],
gl_FUNC_ALLOCA
gl_FUNC_ATEXIT
gl_CLOSEOUT
+ gl_DIRNAME
gl_ERROR
gl_EXCLUDE
gl_EXITFAIL
@@ -75,8 +76,11 @@ AC_DEFUN([gl_FILE_LIST], [
lib/alloca.c
lib/alloca_.h
lib/atexit.c
+ lib/basename.c
lib/closeout.c
lib/closeout.h
+ lib/dirname.c
+ lib/dirname.h
lib/error.c
lib/error.h
lib/exclude.c
@@ -129,6 +133,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strcspn.c
lib/strdup.c
lib/strdup.h
+ lib/stripslash.c
lib/strncasecmp.c
lib/strnlen1.c
lib/strnlen1.h
@@ -149,6 +154,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/closeout.m4
m4/codeset.m4
m4/d-ino.m4
+ m4/dirname.m4
+ m4/dos.m4
m4/error.m4
m4/exclude.m4
m4/exitfail.m4