smpp: Parse and use SMPP-provided validity period

Before this patch, we always ignored any SMPP-provided validity period
and used '0' which is now, and means it expires immediately.

As SMPP allows for validity_period of NULL, use 7 days as SMSC default
in such situations.

Change-Id: Iad9f2697f045ed3bc0eb74c3a9730861f82e6c48
Closes: OS#5567
diff --git a/configure.ac b/configure.ac
index 45f6806..4b67ea6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,8 @@
 PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.9.0)
 PKG_CHECK_MODULES(LIBOSMOGSUPCLIENT, libosmo-gsup-client >= 1.4.0)
 
+AC_CHECK_FUNC([timegm], [AC_DEFINE(HAVE_TIMEGM, 1, Define if libc implements timegm)])
+
 old_LIBS=$LIBS
 AC_SEARCH_LIBS([sctp_send], [sctp], [
 	AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])