summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in5
-rw-r--r--curl-config.in5
-rw-r--r--docs/curl-config.17
3 files changed, 16 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 13bc7e3f9..1dfc4c5e4 100644
--- a/configure.in
+++ b/configure.in
@@ -8,6 +8,11 @@ VERSION=`sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/cu
AM_INIT_AUTOMAKE(curl,$VERSION)
dnl
+dnl we extract the numerical version for curl-config only
+VERSIONNUM=`sed -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h`
+AC_SUBST(VERSIONNUM)
+
+dnl
dnl Detect the canonical host and target build environment
dnl
diff --git a/curl-config.in b/curl-config.in
index d2d984212..7de459318 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -62,6 +62,11 @@ while test $# -gt 0; do
exit 0
;;
+ --vernum)
+ echo @VERSIONNUM@
+ exit 0
+ ;;
+
--help)
usage 0
;;
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index c37537961..4993aedb7 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -2,7 +2,7 @@
.\" nroff -man curl-config.1
.\" Written by Daniel Stenberg
.\"
-.TH curl-config 1 "18 March 2001" "Curl 7.7.2" "curl-config manual"
+.TH curl-config 1 "28 May 2001" "Curl 7.8" "curl-config manual"
.SH NAME
curl-config \- Get information about a libcurl installation
.SH SYNOPSIS
@@ -30,6 +30,11 @@ in $prefix/lib and its header files are installed in $prefix/include and so
on. The prefix is set with "configure --prefix".
.IP "--version"
Outputs version information about the installed libcurl.
+.IP "--vernum"
+Outputs version information about the installed libcurl, in numerical mode.
+This outputs the version number, in hexadecimal, with 8 bits for each part;
+major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl
+12.13.14 would appear as 0c0d0e...
.SH "EXAMPLES"
What is the path to the curl header files?