aboutsummaryrefslogtreecommitdiff
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
commitd816a11bcafc021aae82a159b32be6c7a8021153 (patch)
tree41712ea00439b8a2608f45fd3c3995dfbe637d16
parent7820391cb98ec61c691bf8080b655ca409dc8ad4 (diff)
fix c-ares version reported in generated libcares.pc file when building
from CVS tree.
-rw-r--r--ares/configure.ac13
-rwxr-xr-xares/maketgz4
2 files changed, 14 insertions, 3 deletions
diff --git a/ares/configure.ac b/ares/configure.ac
index 3759f1a5b..5b069cf67 100644
--- a/ares/configure.ac
+++ b/ares/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
diff --git a/ares/maketgz b/ares/maketgz
index 7663dc057..923365cf5 100755
--- a/ares/maketgz
+++ b/ares/maketgz
@@ -38,7 +38,7 @@ if(!-f "configure") {
`./buildconf`;
}
print "adding $version in the configure.ac file\n";
-`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version])/' < configure.ac > configure.ac.dist`;
+`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`;
# now make a new configure script with this
print "makes a new configure script\n";
@@ -54,5 +54,7 @@ print "running make dist\n";
print "removing temporary configure.ac file\n";
`rm configure.ac.dist`;
+print "removing temporary ares_version.h file\n";
+`rm ares_version.h.dist`;
print "NOTE: now cvs tag this release!\n";