build-sys/rpm/debian: Add gmp library and devel package as dependency

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
diff --git a/configure.ac b/configure.ac
index ca93a5e..c1074cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,6 +269,18 @@
 fi
 AC_SUBST([GLIB_LIBS])
 
+GMP_CFLAGS=$(pkg-config --cflags gmp)
+if test $? -ne 0; then
+   AC_MSG_ERROR("Is libgmp-dev/gmp-devel installed? -- could not get cflags")
+fi
+AC_SUBST([GMP_CFLAGS])
+
+GMP_LIBS=$(pkg-config --libs gmp)
+if test $? -ne 0; then
+   AC_MSG_ERROR("Is libgmp-dev/gmp-devel installed? -- could not get libs")
+fi
+AC_SUBST([GMP_LIBS])
+
 AC_MSG_CHECKING([for whether to build with chardev interface])
 case $host_os in
 linux-*)
diff --git a/debian/control b/debian/control
index ce58349..adc9efa 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@
                gnutls-dev,
                libfuse-dev,
                libglib2.0-dev,
+               libgmp-dev,
                libjson-glib-dev,
                libseccomp-dev,
                libssl-dev,
diff --git a/swtpm.spec b/swtpm.spec
index 63b01b4..4ec09c1 100644
--- a/swtpm.spec
+++ b/swtpm.spec
@@ -39,6 +39,7 @@
 BuildRequires:  gcc
 BuildRequires:  libseccomp-devel
 BuildRequires:  tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd
+BuildRequires:  gmp-devel
 
 Requires:       %{name}-libs = %{version}-%{release}
 Requires:       libtpms >= 0.6.0
diff --git a/swtpm.spec.in b/swtpm.spec.in
index a97ac13..eceedde 100644
--- a/swtpm.spec.in
+++ b/swtpm.spec.in
@@ -39,6 +39,7 @@
 BuildRequires:  gcc
 BuildRequires:  libseccomp-devel
 BuildRequires:  tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd
+BuildRequires:  gmp-devel
 
 Requires:       %{name}-libs = %{version}-%{release}
 Requires:       libtpms >= 0.6.0