[Top][All Lists]

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

Re: configure-generated *.in's

From: Bruce Korb
Subject: Re: configure-generated *.in's
Date: Thu, 30 Dec 2004 20:36:36 -0800
User-agent: KMail/1.6.2

On Thursday 30 December 2004 08:19 pm, J.T. Conklin wrote:
> Roger Leigh's AC_CONFIG_PKGCONFIG_IN macro from the autoconf macro
> archive generates a * files.  The intent seems to be for the
> * file to be post-processed by AC_CONFIG_FILES to expand any
> @macros@, and then the resulting *.pc file can be installed for use 
> by pkg-config.
> However, if I add foo.pc to AC_CONFIG_FILES, autoconf complains that
> does not exist (which it does not).  However, if I omit it,
> is generated at configure-time, but foo.pc is not.
> Does anyone have any clue how to use this macro?

My solution was a "" shell script.
I confess I already had a "mumble-config" script that was derived
from "", but shell scripts are pretty flexible.
I would be open to better suggestions :-).

Cheers - Bruce

#! /bin/ksh

test -f autoopts-config || exit 1

eval $(fgrep ' version=' autoopts-config)
version=$(echo $version | sed 's/:/./;s/:.*//')
libflags=$(sh ./autoopts-config ldflags)
ccflags=$( sh ./autoopts-config cflags)

dirname=$(dirname $@)
test -d ${dirname} || mkdir -p ${dirname}

cat > ${1} <<-  _EOF_
        Name:           AutoOpts
        Description:    A semi-automated generated/library option parser
        Version:        ${version}
        Libs:           ${libflags}
        Cflags:         ${ccflags}

        # Variables:

reply via email to

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