annotate m4/dos.m4 @ 423:079d43b6967b 3.0-beta2 3.0-beta2

Added missing file
author lost@l-w.ca
date Sun, 19 Sep 2010 01:44:47 -0600
parents 3c2e1f24cc7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
421
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
1 #serial 11 -*- autoconf -*-
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
2
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
3 # Define some macros required for proper operation of code in lib/*.c
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
4 # on MSDOS/Windows systems.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
5
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
6 # Copyright (C) 2000-2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
7 # This file is free software; the Free Software Foundation
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
8 # gives unlimited permission to copy and/or distribute it,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
9 # with or without modifications, as long as this notice is preserved.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
10
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
11 # From Jim Meyering.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
12
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
13 AC_DEFUN([gl_AC_DOS],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
14 [
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
15 AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
16 [
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
17 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
18 #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
19 neither MSDOS nor Windows
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
20 #endif]])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
21 [ac_cv_win_or_dos=yes],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
22 [ac_cv_win_or_dos=no])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
23 ])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
24
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
25 if test x"$ac_cv_win_or_dos" = xyes; then
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
26 ac_fs_accepts_drive_letter_prefix=1
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
27 ac_fs_backslash_is_file_name_separator=1
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
28 AC_CACHE_CHECK([whether drive letter can start relative path],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
29 [ac_cv_drive_letter_can_be_relative],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
30 [
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
31 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
32 #if defined __CYGWIN__
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
33 drive letters are always absolute
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
34 #endif]])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
35 [ac_cv_drive_letter_can_be_relative=yes],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
36 [ac_cv_drive_letter_can_be_relative=no])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
37 ])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
38 if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
39 ac_fs_drive_letter_can_be_relative=1
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
40 else
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
41 ac_fs_drive_letter_can_be_relative=0
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
42 fi
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
43 else
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
44 ac_fs_accepts_drive_letter_prefix=0
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
45 ac_fs_backslash_is_file_name_separator=0
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
46 ac_fs_drive_letter_can_be_relative=0
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
47 fi
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
48
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
49 AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
50 $ac_fs_accepts_drive_letter_prefix,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
51 [Define on systems for which file names may have a so-called
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
52 `drive letter' prefix, define this to compute the length of that
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
53 prefix, including the colon.])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
54
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
55 AH_VERBATIM(ISSLASH,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
56 [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
57 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
58 #else
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
59 # define ISSLASH(C) ((C) == '/')
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
60 #endif])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
61
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
62 AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
63 $ac_fs_backslash_is_file_name_separator,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
64 [Define if the backslash character may also serve as a file name
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
65 component separator.])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
66
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
67 AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
68 $ac_fs_drive_letter_can_be_relative,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
69 [Define if a drive letter prefix denotes a relative path if it is
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
70 not followed by a file name component separator.])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
71 ])