diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-10-10 16:05:56 +0000 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2006-10-10 16:05:56 +0000 |
commit | e2edd7725f9b256e5bdb3dfe63ee974f739639db (patch) | |
tree | d015aa10fe2335616a5340a2bc2fa9fee9099466 | |
parent | 56fd4e7746498044a84acfc5420255809bc0df08 (diff) | |
download | quilt-e2edd7725f9b256e5bdb3dfe63ee974f739639db.tar.gz |
- aclocal.m4: New helper for optional binaries.
- configure.ac: Use the new helper for diffstat and rpmbuild.
- compat/diffstat.in: Delete.
- compat/rpmbuild.in: Delete.
-rw-r--r-- | aclocal.m4 | 55 | ||||
-rw-r--r-- | compat/diffstat.in | 6 | ||||
-rw-r--r-- | compat/rpmbuild.in | 6 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | quilt.changes | 8 |
5 files changed, 67 insertions, 16 deletions
@@ -62,3 +62,58 @@ AC_DEFUN([QUILT_COMPAT_PROG_PATH],[ fi AC_SUBST($1) ]) + +dnl Allow configure to specify a specific binary +dnl This variant is for optional binaries. +dnl 1: Environment variable +dnl 2: binary name +dnl 3: optional list of alternative binary names +dnl 4: optional list of additional search directories +AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[ + AC_ARG_WITH($2, AC_HELP_STRING( + [--with-$2], [name of the $2 executable to use]), + [ + if test x"$withval" != xno; then + AC_MSG_CHECKING(for $2) + $1="$withval" + if test -e "$$1"; then + if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then + AC_MSG_ERROR([$$1 is not an executable file]) + fi + fi + AC_MSG_RESULT([$$1]) + if test ! -e "$$1"; then + AC_MSG_WARN([$$1 does not exist]) + fi + COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" + fi + ],[ + m4_if([$3],[],[ + AC_PATH_PROG($1,$2,,$PATH:$4) + ],[ + AC_PATH_PROGS($1,$3,,$PATH:$4) + if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then + COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" + fi + ]) + m4_if([$4],[],[],[ + if test -n "$$1"; then + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for dir in "$4"; do + if test "`dirname $$1`" = "$dir"; then + COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2" + break + fi + done + IFS="$as_save_IFS" + fi + ]) + if test -z "$$1"; then + AC_MSG_WARN([$2 not found, some optional functionalities will be missing]) + fi + ]) + if test -z "$$1"; then + $1=$2 + fi + AC_SUBST($1) +]) diff --git a/compat/diffstat.in b/compat/diffstat.in deleted file mode 100644 index b4f6e02..0000000 --- a/compat/diffstat.in +++ /dev/null @@ -1,6 +0,0 @@ -#! @BASH@ - -QUILT_COMPAT=@QUILT_DIR@/compat -QUILT_COMPAT=${QUILT_COMPAT//\//\\\/} -PATH=${PATH//$QUILT_COMPAT/} -exec "${0##*/}" "$@" diff --git a/compat/rpmbuild.in b/compat/rpmbuild.in deleted file mode 100644 index b4f6e02..0000000 --- a/compat/rpmbuild.in +++ /dev/null @@ -1,6 +0,0 @@ -#! @BASH@ - -QUILT_COMPAT=@QUILT_DIR@/compat -QUILT_COMPAT=${QUILT_COMPAT//\//\\\/} -PATH=${PATH//$QUILT_COMPAT/} -exec "${0##*/}" "$@" diff --git a/configure.ac b/configure.ac index e9d5eba..acf6639 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([quilt],[0.45],[quilt-dev@nongnu.org]) AC_CONFIG_AUX_DIR(config) AC_PREREQ(2.53) -AC_REVISION ($Revision: 1.80 $) +AC_REVISION ($Revision: 1.81 $) PACKAGE_RELEASE=1 AC_SUBST(PACKAGE_RELEASE) @@ -296,9 +296,9 @@ does understand -path, you can supply its path with the ]) fi -QUILT_COMPAT_PROG_PATH(DIFFSTAT, diffstat) +QUILT_COMPAT_PROG_PATH_OPT(DIFFSTAT, diffstat) -if test -z "$INTERNAL_DIFFSTAT"; then +if test "$DIFFSTAT" != "diffstat"; then # We need diffstat version 1.32 or better, else quilt refresh --diffstat # will show progress data we don't want to see. This is only a warning # and we continue even if version is older, as this is only a minor @@ -372,7 +372,7 @@ fi AC_SUBST(docdir) dnl Check for rpmbuild (v4) vs. rpm (v3) -QUILT_COMPAT_PROG_PATH(RPMBUILD, rpmbuild, [rpmbuild rpm]) +QUILT_COMPAT_PROG_PATH_OPT(RPMBUILD, rpmbuild, [rpmbuild rpm]) AC_SUBST(COMPAT_SYMLINKS) AC_SUBST(COMPAT_PROGRAMS) diff --git a/quilt.changes b/quilt.changes index 8192f1e..4dd783d 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Oct 10 17:44:30 CEST 2006 - khali@linux-fr.org + +- aclocal.m4: New helper for optional binaries. +- configure.ac: Use the new helper for diffstat and rpmbuild. +- compat/diffstat.in: Delete. +- compat/rpmbuild.in: Delete. + +------------------------------------------------------------------- Mon Oct 9 17:08:19 CEST 2006 - agruen@suse.de - Update the German translation. |