From 0bafa47bc5da21caebede1749df3bba825a4a2ac Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 26 Jun 2023 14:45:37 -0400 Subject: build: Install helpers under libexecdir --- diff --git a/Makefile.am b/Makefile.am index 9e6d12c..687ac8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,11 @@ endif # * Our release target PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)$(PACKAGE_VERSION_GIT) -bin_PROGRAMS = opkg-opk mknod +bin_PROGRAMS = opkg-opk + +if WITH_HELPERS +helpers_PROGRAMS = mknod +endif opkg_opk_SOURCES = opkg_opk_CFLAGS = \ diff --git a/configure.ac b/configure.ac index 77d9c6a..ad067cc 100644 --- a/configure.ac +++ b/configure.ac @@ -144,6 +144,28 @@ if test "x${address_sanitization}" = 'xyes'; then AC_SUBST([ASAN_CFLAGS]) fi +helpersdir='${libexecdir}/${PACKAGE_TARNAME}' +AC_ARG_WITH([helpers-dir], + [AS_HELP_STRING([--with-helpers-dir=DIR], + [helper utilities @<:@LIBEXECDIR/opkg-opk@:>@])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR([--with-helpers-dir requires $(: \ + )an argument]) + ;; + 'no') + helpersdir='' + ;; + *) + helpersdir="\"${withval}\"" + ;; + esac + ] +) +AM_CONDITIONAL([WITH_HELPERS], [test -n "${helpersdir}"]) +AC_SUBST([helpersdir]) + AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_CONFIG_HEADERS([config.h]) AC_OUTPUT() -- cgit v0.9.1