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: Jef Driesen
Subject: Re: PKG_CHECK_MODULES on system without pkg-config installed?
Date: Thu, 10 Mar 2011 06:52:16 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 07/03/11 01:55, Miles Bader wrote:
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


Isn't it easier to just check for the presence of the header file and/or the library file, avoiding pkg-config entirely?




reply via email to

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