Ticket #2183 (closed defect: fixed)
configure "test -e" is not portable
| Reported by: | havatv | Owned by: | dmorissette |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0 release |
| Component: | Build Problems | Version: | 5.0 |
| Severity: | normal | Keywords: | configure test portable |
| Cc: | sdlime |
Description
test -e, as used in the AGG section of configure, is not considered
portable.
It causes configure to fail on my Solaris 2.7 system (/bin/sh).
See for example: http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html#Limitations-of-Builtins
test (files)
To enable configure scripts to support cross-compilation, they shouldn't do anything that tests features of the build system instead of the host system. But occasionally you may find it necessary to check whether some arbitrary file exists. To do so, use test -f' or test -r'. Do not use test -x', because 4.3BSD does not have it. Do not use test -e' either, because Solaris /bin/sh lacks it. To test for symbolic links on systems that have them, use test -h' rather than test -L'; either form conforms to Posix 1003.1-2001, but older shells like Solaris 8 /bin/sh support only -h.
