diff options
-rw-r--r-- | config.sh.in | 3 | ||||
-rw-r--r-- | configure.ac | 75 |
2 files changed, 78 insertions, 0 deletions
diff --git a/config.sh.in b/config.sh.in index 767586f..1526b60 100644 --- a/config.sh.in +++ b/config.sh.in @@ -1,3 +1,6 @@ PACKAGE='@PACKAGE@' PACKAGE_NAME='@PACKAGE_NAME@' +MD5SUM='@MD5SUM@' +SHA256SUM='@SHA256SUM@' +GZIP='@GZIP@' DATE='@DATE@' diff --git a/configure.ac b/configure.ac index ae4fbab..1e92c9c 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,81 @@ AC_ARG_WITH( ) AC_ARG_WITH( + [md5sum], + [AS_HELP_STRING([--with-md5sum=PATH], [path to md5sum utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-md5sum requires an argument]) + ;; + 'no') + AC_MSG_ERROR([md5sum is required]) + ;; + *) + MD5SUM="${withval}" + AC_SUBST([MD5SUM]) + ;; + esac + ], + [ + AC_PATH_PROG([MD5SUM], [md5sum]) + if test -z "${MD5SUM}"; then + AC_MSG_ERROR([md5sum not found]) + fi + ] +) +AC_ARG_WITH( + [sha256sum], + [AS_HELP_STRING([--with-sha256sum=PATH], [path to sha256sum utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-sha256sum requires an argument]) + ;; + 'no') + AC_MSG_ERROR([sha256sum is required]) + ;; + *) + SHA256SUM="${withval}" + AC_SUBST([SHA256SUM]) + ;; + esac + ], + [ + AC_PATH_PROG([SHA256SUM], [sha256sum]) + if test -z "${SHA256SUM}"; then + AC_MSG_ERROR([sha256sum not found]) + fi + ] +) +AC_ARG_WITH( + [gzip], + [AS_HELP_STRING([--with-gzip=PATH], [path to gzip utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-gzip requires an argument]) + ;; + 'no') + AC_MSG_ERROR([gzip is required]) + ;; + *) + GZIP="${withval}" + AC_SUBST([GZIP]) + ;; + esac + ], + [ + AC_PATH_PROG([GZIP], [gzip]) + if test -z "${GZIP}"; then + AC_MSG_ERROR([gzip not found]) + fi + ] +) +AC_ARG_WITH( [date], [AS_HELP_STRING([--with-date=PATH], [path to date utility with `%s' format specifier])], |