"Fossies" - the Fresh Open Source Software Archive

Member "xorg-server-1.20.5/m4/ac_define_dir.m4" (30 May 2019, 1632 Bytes) of package /linux/misc/xorg-server-1.20.5.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # ===========================================================================
    2 #             http://autoconf-archive.cryp.to/ac_define_dir.html
    3 # ===========================================================================
    4 #
    5 # SYNOPSIS
    6 #
    7 #   AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
    8 #
    9 # DESCRIPTION
   10 #
   11 #   This macro sets VARNAME to the expansion of the DIR variable, taking
   12 #   care of fixing up ${prefix} and such.
   13 #
   14 #   VARNAME is then offered as both an output variable and a C preprocessor
   15 #   symbol.
   16 #
   17 #   Example:
   18 #
   19 #      AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
   20 #
   21 # LAST MODIFICATION
   22 #
   23 #   2008-04-12
   24 #
   25 # COPYLEFT
   26 #
   27 #   Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
   28 #   Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
   29 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
   30 #   Copyright (c) 2008 Alexandre Oliva
   31 #
   32 #   Copying and distribution of this file, with or without modification, are
   33 #   permitted in any medium without royalty provided the copyright notice
   34 #   and this notice are preserved.
   35 
   36 AC_DEFUN([AC_DEFINE_DIR], [
   37   prefix_NONE=
   38   exec_prefix_NONE=
   39   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
   40   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
   41 dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
   42 dnl refers to ${prefix}.  Thus we have to use `eval' twice.
   43   eval ac_define_dir="\"[$]$2\""
   44   eval ac_define_dir="\"$ac_define_dir\""
   45   AC_SUBST($1, "$ac_define_dir")
   46   AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
   47   test "$prefix_NONE" && prefix=NONE
   48   test "$exec_prefix_NONE" && exec_prefix=NONE
   49 ])