~ubuntu-branches/ubuntu/wily/man-db/wily-proposed

« back to all changes in this revision

Viewing changes to gnulib/m4/rename.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-06-24 11:34:02 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20130624113402-6xdn53l2p9qu8yus
Tags: 2.6.4-1
* New upstream release:
  - Document default section list in manual pages (closes: #611007).
  - Quieten most warnings from compiling Gnulib (closes: #668429).
  - The MANLESS environment variable is now treated as if it were a
    default value for the -r option to man: occurrences of the text
    "$MAN_PN" are expanded, and explicitly using the -r option overrides
    the default (closes: #690831).
* Use 'set -e' rather than '#! /bin/sh -e' in maintainer scripts.
* Remove maintainer script support for direct upgrades from pre-etch
  (three releases before current stable).
* Breaks/Replaces manpages-zh (<< 1.5.2-1.1); man-db now ships zh_CN
  translations formerly included there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# serial 25
 
1
# serial 26
2
2
 
3
 
# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
 
3
# Copyright (C) 2001, 2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
4
4
# This file is free software; the Free Software Foundation
5
5
# gives unlimited permission to copy and/or distribute it,
6
6
# with or without modifications, as long as this notice is preserved.
54
54
      [gl_cv_func_rename_slash_dst_works=yes],
55
55
      [gl_cv_func_rename_slash_dst_works=no],
56
56
      dnl When crosscompiling, assume rename is broken.
57
 
      [gl_cv_func_rename_slash_dst_works="guessing no"])
 
57
      [case "$host_os" in
 
58
                 # Guess yes on glibc systems.
 
59
         *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
 
60
                 # If we don't know, assume the worst.
 
61
         *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
 
62
       esac
 
63
      ])
58
64
    rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
59
65
  ])
60
 
  if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
61
 
    REPLACE_RENAME=1
62
 
    AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
63
 
      [Define if rename does not correctly handle slashes on the destination
64
 
       argument, such as on Solaris 10 or NetBSD 1.6.])
65
 
  fi
 
66
  case "$gl_cv_func_rename_slash_dst_works" in
 
67
    *yes) ;;
 
68
    *)
 
69
      REPLACE_RENAME=1
 
70
      AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
 
71
        [Define if rename does not correctly handle slashes on the destination
 
72
         argument, such as on Solaris 10 or NetBSD 1.6.])
 
73
      ;;
 
74
  esac
66
75
 
67
76
  dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
68
77
  dnl Solaris 9 mistakenly allows rename("file/","name").
97
106
      [gl_cv_func_rename_slash_src_works=yes],
98
107
      [gl_cv_func_rename_slash_src_works=no],
99
108
      dnl When crosscompiling, assume rename is broken.
100
 
      [gl_cv_func_rename_slash_src_works="guessing no"])
 
109
      [case "$host_os" in
 
110
                 # Guess yes on glibc systems.
 
111
         *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
 
112
                 # If we don't know, assume the worst.
 
113
         *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
 
114
       esac
 
115
      ])
101
116
    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
102
117
  ])
103
 
  if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
104
 
    REPLACE_RENAME=1
105
 
    AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
106
 
      [Define if rename does not correctly handle slashes on the source
107
 
       argument, such as on Solaris 9 or cygwin 1.5.])
108
 
  fi
 
118
  case "$gl_cv_func_rename_slash_src_works" in
 
119
    *yes) ;;
 
120
    *)
 
121
      REPLACE_RENAME=1
 
122
      AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
 
123
        [Define if rename does not correctly handle slashes on the source
 
124
         argument, such as on Solaris 9 or cygwin 1.5.])
 
125
      ;;
 
126
  esac
109
127
 
110
128
  dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
111
129
  dnl on rename("h1","h2").
137
155
           [gl_cv_func_rename_link_works=yes],
138
156
           [gl_cv_func_rename_link_works=no],
139
157
           dnl When crosscompiling, assume rename is broken.
140
 
           [gl_cv_func_rename_link_works="guessing no"])
 
158
           [case "$host_os" in
 
159
                      # Guess yes on glibc systems.
 
160
              *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
 
161
                      # If we don't know, assume the worst.
 
162
              *)      gl_cv_func_rename_link_works="guessing no" ;;
 
163
            esac
 
164
           ])
141
165
       else
142
166
         gl_cv_func_rename_link_works="guessing no"
143
167
       fi
146
170
       gl_cv_func_rename_link_works=yes
147
171
     fi
148
172
    ])
149
 
  if test "x$gl_cv_func_rename_link_works" != xyes; then
150
 
    REPLACE_RENAME=1
151
 
    AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
152
 
      [Define if rename fails to leave hard links alone, as on NetBSD 1.6
153
 
       or Cygwin 1.5.])
154
 
  fi
 
173
  case "$gl_cv_func_rename_link_works" in
 
174
    *yes) ;;
 
175
    *)
 
176
      REPLACE_RENAME=1
 
177
      AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
 
178
        [Define if rename fails to leave hard links alone, as on NetBSD 1.6
 
179
         or Cygwin 1.5.])
 
180
      ;;
 
181
  esac
155
182
 
156
183
  dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
157
184
  dnl mingw mistakenly forbids rename("dir1","dir2").
177
204
      [gl_cv_func_rename_dest_works=yes],
178
205
      [gl_cv_func_rename_dest_works=no],
179
206
      dnl When crosscompiling, assume rename is broken.
180
 
      [gl_cv_func_rename_dest_works="guessing no"])
 
207
      [case "$host_os" in
 
208
                 # Guess yes on glibc systems.
 
209
         *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
 
210
                 # If we don't know, assume the worst.
 
211
         *)      gl_cv_func_rename_dest_works="guessing no" ;;
 
212
       esac
 
213
      ])
181
214
    rm -rf conftest.f conftest.d1 conftest.d2
182
215
  ])
183
 
  if test "x$gl_cv_func_rename_dest_works" != xyes; then
184
 
    REPLACE_RENAME=1
185
 
    AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
186
 
      [Define if rename does not work when the destination file exists,
187
 
       as on Cygwin 1.5 or Windows.])
188
 
  fi
 
216
  case "$gl_cv_func_rename_dest_works" in
 
217
    *yes) ;;
 
218
    *)
 
219
      REPLACE_RENAME=1
 
220
      AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
 
221
        [Define if rename does not work when the destination file exists,
 
222
         as on Cygwin 1.5 or Windows.])
 
223
      ;;
 
224
  esac
189
225
])