annotate m4/dos.m4 @ 272:d5392bb5da3c 2.5

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