summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-07-07 02:11:21 +0000
committerYang Tse <yangsita@gmail.com>2008-07-07 02:11:21 +0000
commit371f63f73a6dced71160cb23c06c5f91d12fa871 (patch)
tree75e57df2def36bbff4cccdafb8dd5af7e65d6b80 /configure.ac
parent13f4c3ea540622562b4789febc6881afb6ff3af5 (diff)
downloadc-ares-371f63f73a6dced71160cb23c06c5f91d12fa871.tar.gz
c-ares-371f63f73a6dced71160cb23c06c5f91d12fa871.tar.bz2
c-ares-371f63f73a6dced71160cb23c06c5f91d12fa871.zip
fix c-ares version reported in generated libcares.pc file when building
from CVS tree.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3759f1a..5b069cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,12 @@
-AC_INIT([c-ares],[1.5.1],[daniel@haxx.se])
AC_PREREQ(2.57)
+
+dnl Version not hardcoded here. Fetched later from ares_version.h
+AC_INIT([c-ares], [-],
+ [c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares])
+
AC_CONFIG_SRCDIR([ares_ipv6.h])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
-AM_INIT_AUTOMAKE
dnl SED is mandatory for configure process and libtool.
dnl Set it now and prevent it from being changed later.
@@ -53,6 +56,12 @@ if test -z "$AR" || test "$AR" = "not_found"; then
fi
AC_SUBST([AR])
+dnl Fetch c-ares version from ares_version.h
+VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h`
+AM_INIT_AUTOMAKE([c-ares], [$VERSION])
+AC_MSG_CHECKING([c-ares version])
+AC_MSG_RESULT([$VERSION])
+
dnl
dnl Detect the canonical host and target build environment
dnl