From 2902641342e0869c827e9ac508de1068739afeb0 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 21 Dec 2020 14:21:48 -0500 Subject: configure.ac, Makefile.am: Find libopkbuild --- diff --git a/Makefile.am b/Makefile.am index 11755af..80993b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,6 +68,7 @@ do_subst = sed \ -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ -e 's|[@]MANUAL[@]|$(MANUAL)|g' \ -e 's|[@]SH[@]|$(SH)|g' \ + -e 's|[@]LIBOPKBUILD[@]|$(LIBOPKBUILD)|g' \ -e 's|[@]READELF[@]|$(READELF)|g' \ -e 's|[@]OPKG[@]|$(OPKG)|g' \ -e 's|[@]multiarch_libdir[@]|$(multiarch_libdir)|g' \ diff --git a/NEWS b/NEWS index 5145c03..378f79c 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ opkhelper version 3.1.3+dev Released: ????-??-?? + * libopkbuild is now a required dependency. * oh-shlibdeps no longer overwrites the contents of existing substvars files. 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]) -- cgit v0.9.1