File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / m4 / define_dir.m4
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (12 years, 1 month ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

    1: dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
    2: dnl
    3: dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
    4: dnl variable, taking care of fixing up ${prefix} and such.
    5: dnl
    6: dnl Note that the 3 argument form is only supported with autoconf 2.13 and
    7: dnl later (i.e. only where AC_DEFINE supports 3 arguments).
    8: dnl
    9: dnl Examples:
   10: dnl
   11: dnl    AC_DEFINE_DIR(DATADIR, datadir)
   12: dnl    AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
   13: dnl
   14: dnl @version $Id: define_dir.m4,v 1.1.1.1 2012/05/29 12:08:38 misho Exp $
   15: dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
   16: 
   17: AC_DEFUN([AC_DEFINE_DIR], [
   18: 	ac_expanded=`(
   19: 	    test "x$prefix" = xNONE && prefix="$ac_default_prefix"
   20: 	    test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
   21: 	    eval echo \""[$]$2"\"
   22: 	)`
   23: 	ifelse([$3], [],
   24: 	  AC_DEFINE_UNQUOTED([$1], ["$ac_expanded"]),
   25: 	  AC_DEFINE_UNQUOTED([$1], ["$ac_expanded"], [$3]))
   26: ])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>