From 7e68b8205a603a7ec53ed0d9798126de155321f7 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 31 Jan 2001 01:59:56 +0000 Subject: Reworked configuration: - Splitted up acinclude.m4 - Added m4 macros, needed for KDE stuff --- conf/m4/plptools/PLP_FIND_FILE.m4 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 conf/m4/plptools/PLP_FIND_FILE.m4 (limited to 'conf/m4/plptools/PLP_FIND_FILE.m4') diff --git a/conf/m4/plptools/PLP_FIND_FILE.m4 b/conf/m4/plptools/PLP_FIND_FILE.m4 new file mode 100644 index 0000000..868b2d5 --- /dev/null +++ b/conf/m4/plptools/PLP_FIND_FILE.m4 @@ -0,0 +1,17 @@ +dnl +dnl Select first existing file from a list of given files +dnl Usage: +dnl PLP_FIND_FILE(filea fileb filec, FOUND) +dnl +dnl On return, variable FOUND is set to one of fileX or to NO, if none +dnl was found. +dnl +AC_DEFUN(PLP_FIND_FILE,[ + $2=NO + for i in $1; do + if test -r "$i" ; then + $2=$i + break 2 + fi + done +]) -- cgit v1.2.3