automake
[Top][All Lists]
Advanced

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

am I missing something about configuration headers?


From: Dale E Martin
Subject: am I missing something about configuration headers?
Date: Fri, 5 Sep 2003 10:18:30 -0400
User-agent: Mutt/1.3.28i

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
address@hidden
http://www.cliftonlabs.com
pgp key available




reply via email to

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