[DVDnav-discuss] r1086 - trunk/libdvdnav/configure.ac

Dan Nicholson dbn.lists at gmail.com
Sat Jun 7 20:25:32 CEST 2008


On Sat, Jun 7, 2008 at 10:48 AM, nicodvb <subversion at mplayerhq.hu> wrote:
> Author: nicodvb
> Date: Sat Jun  7 19:48:31 2008
> New Revision: 1086
>
> Log:
> Modernization of configure.ac and fixing of certain abuses
> of DVDNAV_ macros that allegedly can't be used that way
> (dunno, I just trust Dan).
> Patch by Dan Nicholson
>
>
> Modified:
>   trunk/libdvdnav/configure.ac
>
> Modified: trunk/libdvdnav/configure.ac
> ==============================================================================
> --- trunk/libdvdnav/configure.ac        (original)
> +++ trunk/libdvdnav/configure.ac        Sat Jun  7 19:48:31 2008
> @@ -2,21 +2,32 @@ dnl ------------------------------------
>  dnl Configure.ac for libdvdnav
>  dnl --------------------------------------------------------------
>
> -AC_INIT
> -AC_CONFIG_SRCDIR([src/dvdnav.c])
> -
>  dnl --------------------------------------------------------------
>  dnl Require autoconf version 2.53
>  dnl --------------------------------------------------------------
>  AC_PREREQ([2.53])
>
>  dnl --------------------------------------------------------------
> -dnl Making releases: DVDNAV_SUB += 1; change DVDNAV_LT_* accordingly
> +dnl Making releases: dvdnav_sub += 1; change DVDNAV_LT_* accordingly
> +dnl
> +dnl These are defined in m4 so they can be passed to AC_INIT
>  dnl --------------------------------------------------------------
> -DVDNAV_MAJOR=4
> -DVDNAV_MINOR=1
> -DVDNAV_SUB=2
> -DVDNAV_PRE=""
> +m4_define([dvdnav_major], [4])
> +m4_define([dvdnav_minor], [1])
> +m4_define([dvdnav_sub],   [2])
> +m4_define([dvdnav_pre],   [])
> +
> +AC_INIT([libdvdnav], [dvdnav_major.dvdnav_minor.dvdnav_sub[]dvdnav_pre])
> +AC_CONFIG_SRCDIR([src/dvdnav.c])

I should have put a longer log message in my patch. The point here is
that we want to pass the version number to AC_INIT rather than
AM_INIT_AUTOMAKE. Since we can't pass shell variables to AC_INIT, just
define the version numbers in m4. We could just duplicate the version
into AC_INIT and keep the shell variables as is, but this is a little
cleaner, IMO. Later, we just recreate the DVDNAV_* shell variables
with the m4 values, and everything is the same as it was before.

Once we have the version being specified in AC_INIT, we can use the
new style AM_INIT_AUTOMAKE (in the next commit) where we specify
options for automake, such as the automake prerequisite, if we want to
create a bzipped tarball, etc.

--
Dan



More information about the DVDnav-discuss mailing list