[DVDnav-discuss] r1098 - in trunk/libdvdread: configure.ac misc/libdvdread.spec.in misc/relchk.sh.in

nicodvb subversion at mplayerhq.hu
Thu Jun 12 22:12:18 CEST 2008


Author: nicodvb
Date: Thu Jun 12 22:12:17 2008
New Revision: 1098

Log:
big cleanup patch for autotools; patch by Dan Nicholson

Modified:
   trunk/libdvdread/configure.ac
   trunk/libdvdread/misc/libdvdread.spec.in
   trunk/libdvdread/misc/relchk.sh.in

Modified: trunk/libdvdread/configure.ac
==============================================================================
--- trunk/libdvdread/configure.ac	(original)
+++ trunk/libdvdread/configure.ac	Thu Jun 12 22:12:17 2008
@@ -2,21 +2,32 @@ dnl ------------------------------------
 dnl Configure.ac for libdvdread
 dnl --------------------------------------------------------------
 
-AC_INIT
-AC_CONFIG_SRCDIR([src/dvd_reader.h])
-
 dnl --------------------------------------------------------------
 dnl Require autoconf version 2.53
 dnl --------------------------------------------------------------
 AC_PREREQ([2.53])
 
 dnl --------------------------------------------------------------
-dnl Making releases: DVDREAD_SUB += 1; change DVDREAD_LT_* accordingly
+dnl Making releases: dvdread_sub += 1; change DVDREAD_LT_* accordingly
+dnl
+dnl These are defined in m4 so they can be passed to AC_INIT
 dnl --------------------------------------------------------------
-DVDREAD_MAJOR=4
-DVDREAD_MINOR=1
-DVDREAD_SUB=2
-DVDREAD_PRE=""
+m4_define([dvdread_major], [4])
+m4_define([dvdread_minor], [1])
+m4_define([dvdread_sub],   [2])
+m4_define([dvdread_pre],   [])
+
+AC_INIT([libdvdread], [dvdread_major.dvdread_minor.dvdread_sub[]dvdread_pre])
+AC_CONFIG_SRCDIR([src/dvd_reader.h])
+
+dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
+AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_HOST
+
+DVDREAD_MAJOR="dvdread_major"
+DVDREAD_MINOR="dvdread_minor"
+DVDREAD_SUB="dvdread_sub"
+DVDREAD_PRE="dvdread_pre"
 
 AC_SUBST(DVDREAD_MAJOR)
 AC_SUBST(DVDREAD_MINOR)
@@ -55,23 +66,6 @@ AC_SUBST(DVDREAD_LT_CURRENT)
 AC_SUBST(DVDREAD_LT_AGE)
 AC_SUBST(DVDREAD_LT_REVISION)
 
-PACKAGE="libdvdread"
-RELEASE="1"
-TAR_NAME=$PACKAGE-$DVDREAD_MAJOR.$DVDREAD_MINOR.$DVDREAD_SUB$DVDREAD_PRE
-SPEC_VERSION=$DVDREAD_MAJOR.$DVDREAD_MINOR.$DVDREAD_SUB$DVDREAD_PRE
-
-AC_SUBST(TAR_NAME)
-AC_SUBST(SPEC_VERSION)
-AC_SUBST(PACKAGE)
-AC_SUBST(RELEASE)
-
-LIBNAME=libdvdread$DVDREAD_MAJOR
-AC_SUBST(LIBNAME)
-
-AC_CANONICAL_TARGET
-
-AM_INIT_AUTOMAKE("libdvdread", $DVDREAD_MAJOR.$DVDREAD_MINOR.$DVDREAD_SUB$DVDREAD_PRE)
-
 dnl --------------------------------------------------------------
 dnl Make possible to build for another arch.
 dnl --------------------------------------------------------------
@@ -83,9 +77,6 @@ else
   check_athlon=yes
 fi
 
-dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
-AM_CONFIG_HEADER(config.h)
-
 dnl --------------------------------------------------------------
 dnl Checks for programs.
 dnl --------------------------------------------------------------
@@ -101,6 +92,8 @@ AC_PROG_LN_S
 dnl --------------------------------------------------------------
 dnl Libtool
 dnl --------------------------------------------------------------
+dnl LT_PREREQ only available in libtool-2.2+
+dnl LT_PREREQ([1.4.0])
 AC_LIBTOOL_DLOPEN
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL

Modified: trunk/libdvdread/misc/libdvdread.spec.in
==============================================================================
--- trunk/libdvdread/misc/libdvdread.spec.in	(original)
+++ trunk/libdvdread/misc/libdvdread.spec.in	Thu Jun 12 22:12:17 2008
@@ -1,6 +1,6 @@
 %define	prefix  @prefix@
-%define name    @PACKAGE@
-%define ver     @SPEC_VERSION@
+%define name    @PACKAGE_NAME@
+%define ver     @PACKAGE_VERSION@
 %define rel     0
 
 Name:		%{name}

Modified: trunk/libdvdread/misc/relchk.sh.in
==============================================================================
--- trunk/libdvdread/misc/relchk.sh.in	(original)
+++ trunk/libdvdread/misc/relchk.sh.in	Thu Jun 12 22:12:17 2008
@@ -4,7 +4,7 @@
 ##
 
 topdir="`pwd`"
-distdir="@TAR_NAME@"
+distdir="@PACKAGE_NAME at - at PACKAGE_VERSION@"
 log="$topdir/dist-log"
 logerror="$topdir/dist-errors"
 



More information about the DVDnav-discuss mailing list