"Fossies" - the Fresh Open Source Software Archive

Member "regexxer-0.10/m4/dk-pkgprog.m4" (6 Oct 2011, 1832 Bytes) of package /linux/privat/old/regexxer-0.10.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ## Copyright (c) 2004-2007  Daniel Elstner  <daniel.kitta@gmail.com>
    2 ##
    3 ## This file is part of danielk's Autostuff.
    4 ##
    5 ## danielk's Autostuff is free software; you can redistribute it and/or
    6 ## modify it under the terms of the GNU General Public License as published
    7 ## by the Free Software Foundation; either version 2 of the License, or (at
    8 ## your option) any later version.
    9 ##
   10 ## danielk's Autostuff is distributed in the hope that it will be useful, but
   11 ## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   12 ## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   13 ## for more details.
   14 ##
   15 ## You should have received a copy of the GNU General Public License along
   16 ## with danielk's Autostuff; if not, write to the Free Software Foundation,
   17 ## Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   18 
   19 #serial 20070105
   20 
   21 ## DK_PKG_PATH_PROG(variable, package, executable)
   22 ##
   23 ## Like AC_PATH_PROG(variable, executable,, <extra_path>), where <extra_path>
   24 ## is set to the contents of $PATH prepended by the package's binary executable
   25 ## directory.  This should catch even the weirdest setups.  An error message is
   26 ## generated if the executable cannot be found anywhere in the resulting path.
   27 ##
   28 AC_DEFUN([DK_PKG_PATH_PROG],
   29 [dnl
   30 m4_if([$3],, [AC_FATAL([3 arguments expected])])[]dnl
   31 AC_REQUIRE([PKG_PROG_PKG_CONFIG])[]dnl
   32 dnl
   33 dk_pkg_prefix=`$PKG_CONFIG --variable=exec_prefix "$2" 2>&AS_MESSAGE_LOG_FD`
   34 
   35 AS_IF([test "x$dk_pkg_prefix" = x],
   36       [dk_pkg_path=$PATH],
   37       [dk_pkg_path=$dk_pkg_prefix/bin$PATH_SEPARATOR$PATH])
   38 
   39 AC_PATH_PROG([$1], [$3],, [$dk_pkg_path])
   40 
   41 AS_IF([test "x$$1" = x], [AC_MSG_ERROR([[
   42 Oops, could not find "]$3[".  This program is
   43 normally included with the ]$2[ package.  Please make sure
   44 that your installation of ]$2[ is set up correctly.
   45 ]])])
   46 ])