diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-01-01 20:05:04 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-01-03 12:36:59 -0500 |
commit | a4ece35911f2b37a2031b9d6a233021e3eac5de8 (patch) | |
tree | 03007552e6d06707a4ae68d2444126d4cc6bb11c /aclocal.m4 | |
parent | 9c3ea642e36e7c0ab95f226b46573a5b40c2c551 (diff) | |
download | e2fsprogs-a4ece35911f2b37a2031b9d6a233021e3eac5de8.tar.gz |
Use pkg-config to determine where to find the devmapper library
Fedora and Red Hat puts the devmapper library in different locations
compared to Debian, so we use pkg-config. Unfortunately Debian's
devmapper.pc file is buggy (See Debian Bug #390243), so we have to
work around it.
Historically, e2fsprogs has tried not to depend on pkg-config, since
its answers are so often **wrong** (the Debian bug has been ignored
for over a year), so I'm hoping I'm not going to regret this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -2649,3 +2649,48 @@ AC_DEFUN([AX_TLS], [ fi AC_MSG_RESULT($ac_cv_tls) ]) + +# Excerpted from pkg.m4 - Macros to locate and utilise pkg-config +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG |