am I missing something about configuration headers?

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

 



I've got the following configure.ac:
[configure.ac]

dnl Process this file with autoconf to produce a configure script.
AC_INIT( [foo.cpp] )
AM_INIT_AUTOMAKE( [foo], [v0] )

dnl Require GNU Autoconf version 2.57 or later
AC_PREREQ(2.57)

AC_PROG_CXX

AC_ARG_VAR([SSH],
        [When spawning remote processes via ssh, use the command specified
in SS
H])
AC_PATH_PROG(SSH, ssh)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_HEADERS([FooConfig.h:FooConfig.h.in])
AC_OUTPUT(Makefile)

[/configure.ac]

And FooConfig.h.in looks like:
#ifndef FOO_CONFIG_H
#define FOO_CONFIG_H

inline
const string &
getSshPath(){
  static const string sshPath = "@SSH@";
  return sshPath;
}

#endif

Configure finds "/usr/bin/ssh", and SSH gets defined properly in my
Makefile, but it FooConfig.h looks like this when it's generated:
* FooConfig.h.  Generated by configure.  */
#ifndef FOO_CONFIG_H
#define FOO_CONFIG_H

inline
const string &
getSshPath(){
  static const string sshPath = "@SSH@";
  return sshPath;
}

#endif

What's the missing link here?  The documentation would lead me to believe
that @SSH@ should be AC_SUBSTed into /usr/bin/ssh.

Thanks,
	Dale
-- 
Dale E. Martin, Clifton Labs, Inc.
Senior Computer Engineer
dmartin@xxxxxxxxxxxxxxx
http://www.cliftonlabs.com
pgp key available



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

  Powered by Linux