summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-16 11:42:46 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-16 11:42:46 (EDT)
commit2a21a8f9567ae1042f60900f2fd1bfa72946b888 (patch)
tree36c2e9533f909f920d35bcd358fba5f328a3a1d4 /configure.ac
parent139fc9369f538c786120b5767a4b827f1899d9ef (diff)
configure.ac: Add --with-system-usign and --with-cmake
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac68
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()