diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index f64352dc4..7874033f2 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -142,6 +142,10 @@ I. I. +=item realpath + +I. + =item flex =item bison diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 index 22fc61367..10ed96a7e 100644 --- a/m4/guestfs-progs.m4 +++ b/m4/guestfs-progs.m4 @@ -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]) diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in index 21bf3812a..866f48db8 100755 --- a/ocaml-dep.sh.in +++ b/ocaml-dep.sh.in @@ -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