Using @bindir@ etc. in C headers

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

 



I would like to define macros containing the standard paths, like this:

#define BINDIR "@bindir@"

It does not work due to this code in lib/autoconf/general.m4 (which
appears to be predate DESTDIR support):

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl

Is there are generally approved way to work around this?  The manual
tells us to use -D preprocessor arguments, but I'd prefer the
explicitness of defining the macros via a header file.

Thanks,
Florian





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

  Powered by Linux