[Pkg-privacy-commits] [libgsecuredelete] 69/168: Rename AX_PATH_PROG to GSD_PATH_PROG and move it to its own .m4

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository libgsecuredelete.

commit ecfeed32f4157e3d4eae05fa21e181972b6e0137
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed Apr 27 18:20:02 2011 +0200

    Rename AX_PATH_PROG to GSD_PATH_PROG and move it to its own .m4
    
    Also rewrite it a bit to fix and improve it a little.
---
 Makefile.am            |  2 +-
 build/gsd-path-prog.m4 | 23 +++++++++++++++++++++++
 configure.ac           | 32 ++++----------------------------
 3 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8622d63..b16d3f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = gsecuredelete
 
-ACLOCAL_AMFLAGS = -I build/m4
+ACLOCAL_AMFLAGS = -I build/m4 -I build
 
 pkgconfigdir = $(libdir)/pkgconfig
 
diff --git a/build/gsd-path-prog.m4 b/build/gsd-path-prog.m4
new file mode 100644
index 0000000..3bad3b9
--- /dev/null
+++ b/build/gsd-path-prog.m4
@@ -0,0 +1,23 @@
+dnl GSD_PATH_PROG(VAR, PROG, [DEFAULT])
+dnl --------------------------------
+dnl Checks for a program like AC_PATH_PROG but supports overwriting with a
+dnl --with option. With argument yes (or check, the default), search for the
+dnl program with AC_PATH_PROG; with argument no (or default), use the default
+dnl value, and with any other value, use this value as the path to the program.
+AC_DEFUN([GSD_PATH_PROG],
+[
+  AC_ARG_WITH([$2],
+              [AS_HELP_STRING([--with-m4_tolower($2)=PATH],
+                              [Specify the path to the $2 program])],
+              [],
+              [m4_tolower(AS_TR_SH([with_$2]))=check])
+  
+  AS_CASE([$m4_tolower(AS_TR_SH([with_$2]))],
+          [check|yes],  [AC_PATH_PROG([$1], [$2], [$3])],
+          [default|no], [AC_MSG_CHECKING([for $2])
+                         AS_TR_SH([$1])="$3"
+                         AC_MSG_RESULT([$AS_TR_SH([$1])])],
+          [AC_MSG_CHECKING([for $2])
+           AS_TR_SH([$1])="$m4_tolower(AS_TR_SH([with_$2]))"
+           AC_MSG_RESULT([$AS_TR_SH([$1])])])
+])
diff --git a/configure.ac b/configure.ac
index fdeb52a..7a0b5f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,34 +30,10 @@ LT_INIT
 AM_PROG_VALAC([0.7.8])
 
 
-# AX_PATH_PROG(VAR, prog, [default])
-# --------------------------------
-# Checks for a program like AC_PATH_PROG but supports overwriting with a
-# --with option. With argument yes (or check, te default), search for the
-# program with AC_PATH_PROG; with argument no (or default), use the default
-# value, and with any other value, use this value as the prog's path.
-AC_DEFUN([AX_PATH_PROG],
-         [AC_ARG_WITH([$2],
-                      [AS_HELP_STRING([--with-$2=PATH],
-                                      [Specify the path to the $2 program])],
-                      [],
-                      [with_$2=check])
-          case "$with_$2" in
-            "check"|"yes") AC_PATH_PROG([$1], [$2], [$3]);;
-            *)
-              AC_MSG_CHECKING([for $2])
-              case "$with_$2" in
-                "no"|"default") $1="$3";;
-                *)              $1="$with_$2";;
-              esac
-              AC_MSG_RESULT([$1])
-              ;;
-          esac])
-
-AX_PATH_PROG([SRM],   [srm],    [/usr/bin/srm])
-AX_PATH_PROG([SFILL], [sfill],  [/usr/bin/sfill])
-AX_PATH_PROG([SMEM],  [smem],   [/usr/bin/smem])
-AX_PATH_PROG([SSWAP], [sswap],  [/usr/bin/sswap])
+GSD_PATH_PROG([SRM],   [srm],   [/usr/bin/srm])
+GSD_PATH_PROG([SFILL], [sfill], [/usr/bin/sfill])
+GSD_PATH_PROG([SMEM],  [smem],  [/usr/bin/smem])
+GSD_PATH_PROG([SSWAP], [sswap], [/usr/bin/sswap])
 
 AC_DEFINE_UNQUOTED([SRM_PATH],   ["$SRM"],   [Path to the srm binary])
 AC_DEFINE_UNQUOTED([SFILL_PATH], ["$SFILL"], [Path to the sfill binary])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git



More information about the Pkg-privacy-commits mailing list