Do the version number the way it's now done for libpcap.

Use the two-argument version of AC_INIT() - which requires autoconf 2.64
or later, so require that as a minimum - and get the version string from
the VERSION file.  Use AC_CONFIG_SRCDIR() to say that the source
directory needs tcpdump.c; the two-argument version of AC_INIT() doesn't
do that.

This means that we no longer have a version.c file.
diff --git a/Makefile.in b/Makefile.in
index 99f6dba..49e2060 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -238,7 +238,6 @@
 	util-print.c
 
 LOCALSRC = @LOCALSRC@
-GENSRC = version.c
 LIBOBJS = @LIBOBJS@
 
 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS}
@@ -395,19 +394,6 @@
 strsep.o: $(srcdir)/missing/strsep.c
 	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
 
-version.o: version.c
-	$(CC) $(FULL_CFLAGS) -c version.c
-
-version.c: $(srcdir)/VERSION
-	@rm -f $@
-	if grep GIT ${srcdir}/VERSION >/dev/null; then \
-		read ver <${srcdir}/VERSION; \
-		echo $$ver | tr -d '\012'; \
-		date +_%Y_%m_%d; \
-	else \
-		cat ${srcdir}/VERSION; \
-	fi | sed -e 's/.*/const char version[] = "&";/' > $@
-
 install: all
 	[ -d $(DESTDIR)$(sbindir) ] || \
 	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
diff --git a/configure b/configure
index 88020c7..a6424e2 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.69 for tcpdump 4.10.0-PRE-GIT.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -575,12 +575,12 @@
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='tcpdump'
+PACKAGE_TARNAME='tcpdump'
+PACKAGE_VERSION='4.10.0-PRE-GIT'
+PACKAGE_STRING='tcpdump 4.10.0-PRE-GIT'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
 
 ac_unique_file="tcpdump.c"
 # Factoring default headers for most tests.
@@ -757,7 +757,7 @@
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1257,7 +1257,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures tcpdump 4.10.0-PRE-GIT to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1305,7 +1305,7 @@
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/tcpdump]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1321,7 +1321,9 @@
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of tcpdump 4.10.0-PRE-GIT:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
@@ -1423,7 +1425,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+tcpdump configure 4.10.0-PRE-GIT
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1888,7 +1890,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
+It was created by tcpdump $as_me 4.10.0-PRE-GIT, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2237,6 +2239,7 @@
 
 
 
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -8169,7 +8172,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
+This file was extended by tcpdump $as_me 4.10.0-PRE-GIT, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8235,7 +8238,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-config.status
+tcpdump config.status 4.10.0-PRE-GIT
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.in b/configure.in
index 2c5939d..76becf7 100644
--- a/configure.in
+++ b/configure.in
@@ -13,8 +13,9 @@
 # config.sub.
 #
 
-AC_PREREQ(2.61)
-AC_INIT(tcpdump.c)
+AC_PREREQ(2.64)
+AC_INIT(tcpdump, m4_esyscmd_s([cat VERSION]))
+AC_CONFIG_SRCDIR(tcpdump.c)
 
 AC_CANONICAL_HOST
 
diff --git a/tcpdump.c b/tcpdump.c
index 65b7e76..ecd41fc 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -2747,7 +2747,6 @@
 static void
 print_version(void)
 {
-	extern char version[];
 #ifndef HAVE_PCAP_LIB_VERSION
 #if defined(_WIN32) || defined(HAVE_PCAP_VERSION)
 	extern char pcap_version[];
@@ -2757,21 +2756,11 @@
 #endif /* HAVE_PCAP_LIB_VERSION */
 	const char *smi_version_string;
 
+	(void)fprintf(stderr, "%s version " PACKAGE_VERSION "\n", program_name);
 #ifdef HAVE_PCAP_LIB_VERSION
-#ifdef _WIN32
-	(void)fprintf(stderr, "%s version %s, based on tcpdump version %s\n", program_name, WDversion, version);
-#else /* _WIN32 */
-	(void)fprintf(stderr, "%s version %s\n", program_name, version);
-#endif /* _WIN32 */
 	(void)fprintf(stderr, "%s\n",pcap_lib_version());
 #else /* HAVE_PCAP_LIB_VERSION */
-#ifdef _WIN32
-	(void)fprintf(stderr, "%s version %s, based on tcpdump version %s\n", program_name, WDversion, version);
-	(void)fprintf(stderr, "WinPcap version %s, based on libpcap version %s\n",Wpcap_version, pcap_version);
-#else /* _WIN32 */
-	(void)fprintf(stderr, "%s version %s\n", program_name, version);
 	(void)fprintf(stderr, "libpcap version %s\n", pcap_version);
-#endif /* _WIN32 */
 #endif /* HAVE_PCAP_LIB_VERSION */
 
 #if defined(HAVE_LIBCRYPTO) && defined(SSLEAY_VERSION)