autoconf
[Top][All Lists]
Advanced

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

Trouble with variable substitution


From: martin f krafft
Subject: Trouble with variable substitution
Date: Sun, 25 Jan 2004 18:49:16 +0100
User-agent: Mutt/1.5.4i

Hi there, I am trying to do the following:

  AC_INIT(libhid, 0.1.91.0.0, address@hidden)

  LIBHID_MAJOR_VERSION=`echo $AC_PACKAGE_VERSION | cut -d. -f1`
  LIBHID_MINOR_VERSION=`echo $AC_PACKAGE_VERSION | cut -d. -f2`
  LIBHID_MICRO_VERSION=`echo $AC_PACKAGE_VERSION | cut -d. -f3`
  LIBHID_INTERFACE_AGE=`echo $AC_PACKAGE_VERSION | cut -d. -f4`
  LIBHID_BINARY_AGE=`echo $AC_PACKAGE_VERSION | cut -d. -f5`
  LIBHID_VERSION=`echo $AC_PACKAGE_VERSION | cut -d. -f1-3`

  PACKAGE=AC_PACKAGE_NAME
  VERSION=LIBHID_VERSION

Thus, LIBHID_VERSION and VERSION should contain 0.1.91.

However, the above causes $distdir to be libhid-LIBHID_VERSION, so
it seems as if PACKAGE is set correctly, but LIBHID_VERSION isn't
being substituted.

What is weird though is writing

  VERSION=$LIBHID_VERSION

which yields as $distdir the following curiosity:

  libhid-/path/to/configure.1.91

I conclude from this that LIBHID_VERSION is being substituted, since
"$0.1.91" contains the shell variable responsible for printing the
absolute path of the configure script.

I am not an autoconf guru at all, but I did try to play with
AC_DEFINE and AC_DEFINE_UNQUOTED, AC_SUBST and others. However,
I have not succeeded yet in getting the above to work.

I would be very grateful if you'd give me a hint! Please CC me on
replies!

Cheers,
  
-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; address@hidden
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
 
http://www.transnationalrepublic.org/

Attachment: signature.asc
Description: Digital signature


reply via email to

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