summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-17 23:48:41 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-17 23:48:41 (EDT)
commit2990e5778f74270f1ef61bd7d81a6b9bcab4c87c (patch)
tree62d43d4dc7110bd871acc3d5bdbf55855061266c
parente4c7e3b773581ffa70f1075e89beb289413f5a22 (diff)
configure.ac, config.sh.in: Check for fakeroot
-rw-r--r--config.sh.in1
-rw-r--r--configure.ac26
2 files changed, 27 insertions, 0 deletions
diff --git a/config.sh.in b/config.sh.in
index 2f7f025..ec3d34d 100644
--- a/config.sh.in
+++ b/config.sh.in
@@ -1,5 +1,6 @@
PACKAGE='@PACKAGE@'
PACKAGE_NAME='@PACKAGE_NAME@'
+FAKEROOT='@FAKEROOT@'
OPKG='@OPKG@'
TOUCH='@TOUCH@'
HAVE_TOUCH_NODEREF='@HAVE_TOUCH_NODEREF@'
diff --git a/configure.ac b/configure.ac
index adb0995..f2aa829 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,32 @@ AC_ARG_WITH(
)
AC_ARG_WITH(
+ [fakeroot],
+ [AS_HELP_STRING([--with-fakeroot=PATH], [path to fakeroot utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-fakeroot requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([fakeroot is required])
+ ;;
+ *)
+ FAKEROOT="${withval}"
+ AC_SUBST([FAKEROOT])
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([FAKEROOT], [fakeroot])
+ if test -z "${FAKEROOT}"; then
+ AC_MSG_ERROR([fakeroot not found])
+ fi
+ ]
+)
+
+AC_ARG_WITH(
[opkg],
[AS_HELP_STRING([--with-opkg=PATH], [path to opkg utility])],
[