summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 26 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2240c725c..9b05c30f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1674,7 +1674,6 @@ AC_CHECK_FUNCS([ \
1674 pstat \ 1674 pstat \
1675 readpassphrase \ 1675 readpassphrase \
1676 reallocarray \ 1676 reallocarray \
1677 realpath \
1678 recvmsg \ 1677 recvmsg \
1679 rresvport_af \ 1678 rresvport_af \
1680 sendmsg \ 1679 sendmsg \
@@ -1891,6 +1890,32 @@ AC_CHECK_FUNCS([setresgid], [
1891 ) 1890 )
1892]) 1891])
1893 1892
1893AC_CHECK_FUNCS([realpath], [
1894 dnl the sftp v3 spec says SSH_FXP_REALPATH will "canonicalize any given
1895 dnl path name", however some implementations of realpath (and some
1896 dnl versions of the POSIX spec) do not work on non-existent files,
1897 dnl so we use the OpenBSD implementation on those platforms.
1898 AC_MSG_CHECKING([if realpath works with non-existent files])
1899 AC_RUN_IFELSE(
1900 [AC_LANG_PROGRAM([[
1901#include <limits.h>
1902#include <stdlib.h>
1903#include <errno.h>
1904 ]], [[
1905 char buf[PATH_MAX];
1906 if (realpath("/opensshnonexistentfilename1234", buf) == NULL)
1907 if (errno == ENOENT)
1908 exit(1);
1909 exit(0);
1910 ]])],
1911 [AC_MSG_RESULT([yes])],
1912 [AC_DEFINE([BROKEN_REALPATH], [1],
1913 [realpath does not work with nonexistent files])
1914 AC_MSG_RESULT([no])],
1915 [AC_MSG_WARN([cross compiling: assuming working])]
1916 )
1917])
1918
1894dnl Checks for time functions 1919dnl Checks for time functions
1895AC_CHECK_FUNCS([gettimeofday time]) 1920AC_CHECK_FUNCS([gettimeofday time])
1896dnl Checks for utmp functions 1921dnl Checks for utmp functions