diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2014-09-18 10:47:47 +0200 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2014-09-18 10:47:47 +0200 |
commit | cbb845482abafc917241240e88f3c0271093b98c (patch) | |
tree | bdd1dfe061aff1b902b83270b5cfbafeeaa2e0d2 /m4 | |
parent | 168cc7aa947ed992c17d2f6e4db353518338b4a1 (diff) | |
download | postgresql-setup-cbb845482abafc917241240e88f3c0271093b98c.tar.gz postgresql-setup-cbb845482abafc917241240e88f3c0271093b98c.tar.xz postgresql-setup-cbb845482abafc917241240e88f3c0271093b98c.zip |
configury: some steps making the macros more consistent
Diffstat (limited to 'm4')
-rw-r--r-- | m4/packaging.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/m4/packaging.m4 b/m4/packaging.m4 new file mode 100644 index 0000000..7160ae8 --- /dev/null +++ b/m4/packaging.m4 @@ -0,0 +1,35 @@ +AC_DEFUN([PGSETUP_PACKAGING_INIT], [ + AC_CACHE_CHECK( + [for oprating system (distribution)], + [pgsetup_cv_os_family], [ + pgsetup_cv_os_family= + if test -r /etc/redhat-release; then + pgsetup_cv_os_family=redhat + fi + ] + ) + + case $pgsetup_cv_os_family in + redhat) + AC_PATH_PROG([RPM], [rpm]) + if test -z "$ac_cv_path_RPM"; then + AC_MSG_ERROR("can not find RPM package manager") + fi + ;; + *) + AC_MSG_ERROR([rpm distro only ATM (todo)]) + ;; + esac +]) + +# PGSETUP_SUBST_REQ(VARIABLE,DESCRIPTION) +# --------------------------------------- +# Make sure that the VARIABLE is mentioned in './configure --help' output and +# that it is not empty after processing this macro. Use the DESCRIPTION as a +# comment. +m4_define([PGSETUP_SUBST_REQ], [ + AC_ARG_VAR([$1], [$2]) + test -z "$[]$1" && + AC_MSG_ERROR([the \$$1 variable is not set]) +]) + |