annotate m4/dos.m4 @ 448:5cccf90bf838 3.0 tip

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