0
0
mirror of https://github.com/vim/vim.git synced 2025-10-29 09:37:35 -04:00

patch 8.0.0464: can't find executable name on Solaris and FreeBSD

Problem:    Can't find executable name on Solaris and FreeBSD.
Solution:   Check for "/proc/self/path/a.out". (Danek Duvall) And for
            "/proc/curproc/file".
This commit is contained in:
Bram Moolenaar
2017-03-16 15:13:45 +01:00
parent 0f39a82b07
commit f3757f0c87
5 changed files with 35 additions and 14 deletions

View File

@@ -3020,12 +3020,21 @@ dnl ---------------------------------------------------------------------------
dnl end of GUI-checking
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING([for /proc/self/exe])
AC_MSG_CHECKING([for /proc link to executable])
if test -L "/proc/self/exe"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PROC_SELF_EXE)
dnl Linux
AC_MSG_RESULT([/proc/self/exe])
AC_DEFINE(PROC_EXE_LINK, "/proc/self/exe")
elif test -L "/proc/self/path/a.out"; then
dnl Solaris
AC_MSG_RESULT([/proc/self/path/a.out])
AC_DEFINE(PROC_EXE_LINK, "/proc/self/path/a.out")
elif test -L "/proc/curproc/file"; then
dnl FreeBSD
AC_MSG_RESULT([/proc/curproc/file])
AC_DEFINE(PROC_EXE_LINK, "/proc/curproc/file")
else
AC_MSG_RESULT(no)
AC_MSG_RESULT(no)
fi
dnl Check for Cygwin, which needs an extra source file if not using X11