Trouble with variable substitution

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

 



Hi there, I am trying to do the following:

  AC_INIT(libhid, 0.1.91.0.0, libhid@xxxxxxxxxxxxxx)

  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:"; net@madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
 
http://www.transnationalrepublic.org/

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux