aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-07-10 09:19:44 +0000
committerOmar Polo <op@omarpolo.com>2021-07-10 09:19:44 +0000
commitf361f7997917a42a7b377d2764c5fb7467cccb62 (patch)
treed222e3ae549533e275d685302d897406245e6be5
parenta82d4dfa25d30d3c512bd1fc15821186bf4d35c4 (diff)
move version number to configure script
-rwxr-xr-xconfigure5
-rw-r--r--gmid.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index 016ae56..1573c7e 100755
--- a/configure
+++ b/configure
@@ -34,6 +34,8 @@ echo "file config.log: writing..."
# default settings: initialize all vars here such that nothing is
# leaked from the environment except for CC, CFLAGS and LDFLAGS
+VERSION=1.6
+
CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make ${MAKE_FLAGS} -sf -`
if [ -z "${CFLAGS}" ]; then
@@ -305,6 +307,7 @@ echo "#include <imsg.h>"
cat <<__HEREDOC__
+#define VERSION "${VERSION}"
#define DISABLE_SANDBOX ${DISABLE_SANDBOX}
#define HAVE_ERR ${HAVE_ERR}
@@ -428,6 +431,8 @@ INSTALL_LIB = ${INSTALL_LIB}
INSTALL_MAN = ${INSTALL_MAN}
INSTALL_DATA = ${INSTALL_DATA}
+VERSION = ${VERSION}
+
__HEREDOC__
printf "COMPAT ="
diff --git a/gmid.h b/gmid.h
index 9a06656..def5176 100644
--- a/gmid.h
+++ b/gmid.h
@@ -38,8 +38,8 @@
#include <openssl/x509.h>
-#define GMID_STRING "gmid 1.7"
-#define GMID_VERSION "gmid/1.7"
+#define GMID_STRING "gmid " VERSION
+#define GMID_VERSION "gmid/" VERSION
#define GEMINI_URL_LEN (1024+3) /* URL max len + \r\n + \0 */