diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 68 |
1 files changed, 68 insertions, 0 deletions
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() |