[DVDnav-discuss] [PATCH 1/2] Modernize configure.ac a'la libdvdnav (r1085 - r1090)
Dan Nicholson
dbn.lists at gmail.com
Mon Jun 9 02:44:22 CEST 2008
---
configure.ac | 52 ++++++++++++++++++++--------------------------
misc/libdvdread.spec.in | 4 +-
misc/relchk.sh.in | 2 +-
3 files changed, 26 insertions(+), 32 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8170fdd..40d1f21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,21 +2,33 @@ 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)
+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])
+AM_INIT_AUTOMAKE([1.3])
+
+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 +67,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 +78,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 +93,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
diff --git a/misc/libdvdread.spec.in b/misc/libdvdread.spec.in
index b9d6396..4416857 100644
--- a/misc/libdvdread.spec.in
+++ b/misc/libdvdread.spec.in
@@ -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}
diff --git a/misc/relchk.sh.in b/misc/relchk.sh.in
index fbf4b94..8251874 100755
--- a/misc/relchk.sh.in
+++ b/misc/relchk.sh.in
@@ -4,7 +4,7 @@
##
topdir="`pwd`"
-distdir="@TAR_NAME@"
+distdir="@PACKAGE_NAME at -@PACKAGE_VERSION@"
log="$topdir/dist-log"
logerror="$topdir/dist-errors"
--
1.5.3.2
More information about the DVDnav-discuss
mailing list