m4: Check for GNU realpath program

It is a dependency of the ocaml-dep.sh script, required for all builds.
This commit is contained in:
Richard W.M. Jones
2022-08-16 13:44:19 +01:00
parent be60075b16
commit c51d1cfe9a
3 changed files with 13 additions and 4 deletions

View File

@@ -142,6 +142,10 @@ I<Required>.
I<Required>.
=item realpath
I<Required>.
=item flex
=item bison

View File

@@ -49,6 +49,11 @@ AC_CHECK_PROG([GPERF],[gperf],[gperf],[no])
test "x$GPERF" = "xno" &&
AC_MSG_ERROR([gperf must be installed])
dnl Check for realpath (used by ocaml-dep.sh for basic builds).
AC_CHECK_PROGS([REALPATH],[grealpath realpath],[no])
test "x$REALPATH" = "xno" &&
AC_MSG_ERROR([GNU realpath program must be installed])
dnl Check for xorriso/genisoimage/mkisofs.
AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no],
[$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin])

View File

@@ -44,10 +44,10 @@ ocaml
# Output file is always created in the current directory.
output=.depend
subdir=$(realpath --relative-to=@abs_top_builddir@ .)
srcdir=$(realpath --relative-to=. @abs_top_srcdir@/${subdir})
srcdir_re=$(realpath --relative-to=. @abs_top_srcdir@/${subdir} | sed 's/\./[.]/g')
top_builddir=$(realpath --relative-to=. @abs_top_builddir@)
subdir=$(@REALPATH@ --relative-to=@abs_top_builddir@ .)
srcdir=$(@REALPATH@ --relative-to=. @abs_top_srcdir@/${subdir})
srcdir_re=$(@REALPATH@ --relative-to=. @abs_top_srcdir@/${subdir} | sed 's/\./[.]/g')
top_builddir=$(@REALPATH@ --relative-to=. @abs_top_builddir@)
includes="-I @abs_top_srcdir@/$subdir -I @abs_top_builddir@/$subdir"
for i in $include_dirs; do