From 2a21a8f9567ae1042f60900f2fd1bfa72946b888 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 16 Apr 2019 11:42:46 -0400 Subject: configure.ac: Add --with-system-usign and --with-cmake --- (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b3a8285..69c2186 100644 --- a/configure.ac +++ b/configure.ac @@ -279,6 +279,74 @@ if ! ${XZ} -V 2>&1 | grep '^xz (XZ Utils) ' >/dev/null 2>&1; then AC_MSG_ERROR([xz from the XZ Utils package is required]) fi +# +# usign +# +AC_ARG_WITH( + [system-usign], + [AS_HELP_STRING([--with-system-usign[=PATH]], [use system usign])], + [ + case "${withval}" in + 'yes'|'') + AC_PATH_PROG([USIGN], [usign]) + if test -z "${USIGN}"; then + AC_MSG_ERROR([usign not found]) + fi + embedded_usign=false + ;; + 'no') + embedded_usign=true + ;; + *) + USIGN="${withval}" + AC_SUBST([USIGN]) + embedded_usign=false + ;; + esac + ], + [ + embedded_usign=true + ] +) +AC_ARG_WITH( + [cmake], + [AS_HELP_STRING([--with-cmake=PATH], [path to cmake utility])], + [ + if ${embedded_usign}; then + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR([--with-cmake requires an + argument]) + ;; + 'no') + AC_MSG_ERROR([cmake is required]) + ;; + *) + CMAKE="${withval}" + AC_SUBST([CMAKE]) + ;; + esac + fi + ], + [ + if ${embedded_usign}; then + AC_PATH_PROG([CMAKE], [cmake]) + if test -z "${CMAKE}"; then + AC_MSG_ERROR([cmake not found]) + fi + fi + ] +) +if ${embedded_usign}; then + AS_MKDIR_P([3rdparty/usign]) + abs_srcdir="$(cd "${srcdir}" && pwd)" + ( + cd 3rdparty/usign + "${CMAKE}" -DUSE_LIBUBOX:BOOL=OFF "${abs_srcdir}/3rdparty/usign" + ) +fi +AM_CONDITIONAL([EMBEDDED_USIGN], [${embedded_usign}]) + AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([config.sh]) AC_OUTPUT() -- cgit v0.9.1