On Fri, 16 Dec 2005, Daniel Pekelharing wrote:

Hi all,

How would I get autoconf to #define the install paths in my config.h ?
My app needs a shared data directory like: /usr/share/myapp,
how would I get that path?

This is a way to do it for package "MyApp":

eval "eval DATA_DIR=$datadir"
AC_SUBST(DATA_DIR)
MyAppSharePath="${DATA_DIR}/MyApp"
MyAppSharePathDefine="${MyAppSharePath}/"
AC_DEFINE_UNQUOTED(MyAppSharePath,"$MyAppSharePathDefine",Directory where 
architecture-independent files live.)
AC_SUBST(MyAppSharePath)

The AC_SUBST(DATA_DIR) defines DATA_DIR, and the AC_SUBST(MyAppSharePath) defines MyAppSharePath, in case you also want to use it in your Makefiles (e.g. to support install).

Bob
======================================
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to