summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-07-13 08:54:57 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2006-07-13 08:54:57 (GMT)
commit6b9cc76d0a27631fbab19a31ab8bd46e143b7580 (patch)
tree7153d03691decf028fa422dac86d3aec46908f54 /m4
parenta46e358d68027289cffaffeb7a4b32ababb2105b (diff)
downloadmonitoring-plugins-6b9cc76d0a27631fbab19a31ab8bd46e143b7580.tar.gz
Using coreutils' base_name function because of portability issues with
Tru64 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1450 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'm4')
-rw-r--r--m4/basename.m414
-rw-r--r--m4/dos.m458
-rw-r--r--m4/np_coreutils.m41
3 files changed, 73 insertions, 0 deletions
diff --git a/m4/basename.m4 b/m4/basename.m4
new file mode 100644
index 0000000..69a0996
--- /dev/null
+++ b/m4/basename.m4
@@ -0,0 +1,14 @@
1# basename.m4 serial 1
2dnl Copyright (C) 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_BASENAME],
8[
9 AC_LIBSOURCES([basename.c, dirname.h])
10 AC_LIBOBJ([basename])
11
12 dnl Prerequisites of lib/basename.c.
13 AC_REQUIRE([gl_AC_DOS])
14])
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 @@
1#serial 9
2
3# Define some macros required for proper operation of code in lib/*.c
4# on MSDOS/Windows systems.
5
6# Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# From Jim Meyering.
12
13AC_DEFUN([gl_AC_DOS],
14 [
15 AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
16 [
17 AC_TRY_COMPILE([],
18 [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
19neither MSDOS nor Windows
20#endif],
21 [ac_cv_win_or_dos=yes],
22 [ac_cv_win_or_dos=no])
23 ])
24
25 if test x"$ac_cv_win_or_dos" = xyes; then
26 ac_fs_accepts_drive_letter_prefix=1
27 ac_fs_backslash_is_file_name_separator=1
28 else
29 ac_fs_accepts_drive_letter_prefix=0
30 ac_fs_backslash_is_file_name_separator=0
31 fi
32
33 AH_VERBATIM(FILE_SYSTEM_PREFIX_LEN,
34 [#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
35# define FILE_SYSTEM_PREFIX_LEN(Filename) \
36 ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
37#else
38# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
39#endif])
40
41 AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
42 $ac_fs_accepts_drive_letter_prefix,
43 [Define on systems for which file names may have a so-called
44 `drive letter' prefix, define this to compute the length of that
45 prefix, including the colon.])
46
47 AH_VERBATIM(ISSLASH,
48 [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
49# define ISSLASH(C) ((C) == '/' || (C) == '\\')
50#else
51# define ISSLASH(C) ((C) == '/')
52#endif])
53
54 AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
55 $ac_fs_backslash_is_file_name_separator,
56 [Define if the backslash character may also serve as a file name
57 component separator.])
58 ])
diff --git a/m4/np_coreutils.m4 b/m4/np_coreutils.m4
index 5360bbd..77cb9f6 100644
--- a/m4/np_coreutils.m4
+++ b/m4/np_coreutils.m4
@@ -11,6 +11,7 @@ dnl Usually in coreutils' prereq.m4, but this is a subset that we need
11AC_DEFUN([np_COREUTILS], 11AC_DEFUN([np_COREUTILS],
12[ 12[
13 AC_REQUIRE([AM_STDBOOL_H]) 13 AC_REQUIRE([AM_STDBOOL_H])
14 AC_REQUIRE([gl_BASENAME])
14 AC_REQUIRE([gl_C_STRTOLD]) 15 AC_REQUIRE([gl_C_STRTOLD])
15 AC_REQUIRE([gl_EXITFAIL]) 16 AC_REQUIRE([gl_EXITFAIL])
16 AC_REQUIRE([gl_FCNTL_SAFER]) 17 AC_REQUIRE([gl_FCNTL_SAFER])