automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PKG_CHECK_MODULES on system without pkg-config installed?


From: Miles Bader
Subject: Re: PKG_CHECK_MODULES on system without pkg-config installed?
Date: Mon, 07 Mar 2011 09:55:44 +0900

Jef Driesen <address@hidden> writes:
>> is pkg.m4 in /usr/share/aclocal ?
>
> No. I suppose that file is only present if pkg-config is installed?
>
> I'm trying to build on Mac OS X in case that would matter.

I use some hacks to make the resulting configure script work even if
autoconf can't find pkg.m4.  Basically I just use "m4_define_default" to
define stub versions of the PKG_... macros:

   # Check for pkg-config program, used for configuring some libraries.
   #
   m4_define_default([PKG_PROG_PKG_CONFIG],
     [AC_MSG_CHECKING([pkg-config])
      AC_MSG_RESULT([no])])

   PKG_PROG_PKG_CONFIG

   # If the pkg-config autoconf support isn't installed, define its
   # autoconf macro to disable any packages depending on it.
   #
   m4_define_default([PKG_CHECK_MODULES],
     [AC_MSG_CHECKING([$1])
      AC_MSG_RESULT([no])
      $4])

   ... etc
   PKG_CHECK_MODULES([libpng], [libpng], [have_libpng=yes], [:])
   ... etc

-Miles

-- 
Accordion, n. An instrument in harmony with the sentiments of an assassin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]