diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-21 14:21:48 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-21 14:31:53 (EST) |
commit | 2902641342e0869c827e9ac508de1068739afeb0 (patch) | |
tree | fd2c61ea936c1a67425df3c84335bb3cfe95dfb2 /configure.ac | |
parent | 1b7a1b8954846b29e825a26cced6758a8b944683 (diff) |
configure.ac, Makefile.am: Find libopkbuild
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index fdc66cf..dd1cfe0 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,41 @@ AC_ARG_WITH( ) AC_ARG_WITH( + [libopkbuild], + [AS_HELP_STRING([--with-libopkbuild=PATH], + [path to libopkbuild.shso.2])], + [ + opt='libopkbuild' + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-${opt} requires an argument]) + ;; + 'no') + AC_MSG_ERROR([${opt} is required]) + ;; + *) + LIBOPKBUILD="${withval}" + ;; + esac + ], + [ + AC_MSG_CHECKING([for libopkbuild]) + for f in /usr/share/sh/libopkbuild.shso.2 \ + /usr/local/share/sh/libopkbuild.shso.2; do + if test -r "${f}"; then + LIBOPKBUILD="${f}" + AC_MSG_RESULT([${f}]) + break + fi + done + if test -z "${LIBOPKBUILD}"; then + AC_MSG_ERROR([libopkbuild not found]) + fi + ] +) + +AC_ARG_WITH( [readelf], [AS_HELP_STRING([--with-readelf=PATH], [path to readelf])], [ @@ -143,6 +178,7 @@ AC_ARG_WITH( ) AC_SUBST([SH]) +AC_SUBST([LIBOPKBUILD]) AC_SUBST([READELF]) AC_SUBST([OPKG]) AC_SUBST([LDCONFIG]) |