[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] [PATCH] Autoconf 2.60 compatibility fix
From: |
Russ Allbery |
Subject: |
[Bug-gnubg] [PATCH] Autoconf 2.60 compatibility fix |
Date: |
Sat, 20 May 2006 20:32:56 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) XEmacs/21.4.18 (linux) |
Autoconf 2.60 will require some changes to the AC_DEFINE_DIR macro; this
updates it to the current version from the macro archive. Also, don't
define the same variable twice just to provide the introductory comment,
since AC_DEFINE_DIR can handle the comment as well.
Index: gnubg/configure.in
===================================================================
--- gnubg.orig/configure.in 2006-05-20 16:23:59.000000000 -0700
+++ gnubg/configure.in 2006-05-20 16:23:59.000000000 -0700
@@ -594,8 +594,7 @@ fi
AC_SUBST(PNG_LIBS)
dnl Record installation paths.
-AC_DEFINE_DIR(_DATADIR, datadir)
-AC_DEFINE([_DATADIR], datadir,
+AC_DEFINE_DIR([_DATADIR], [datadir],
[Installation directory (used to determine PKGDATADIR below).])
AC_DEFINE([PKGDATADIR],[_DATADIR "/" PACKAGE],
[The directory where the weights and databases will be stored.])
Index: gnubg/acinclude.m4
===================================================================
--- gnubg.orig/acinclude.m4 2006-05-20 16:07:32.000000000 -0700
+++ gnubg/acinclude.m4 2006-05-20 16:23:59.000000000 -0700
@@ -1,28 +1,36 @@
dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
dnl
-dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
-dnl variable, taking care of fixing up ${prefix} and such.
+dnl This macro sets VARNAME to the expansion of the DIR variable,
+dnl taking care of fixing up ${prefix} and such.
dnl
-dnl Note that the 3 argument form is only supported with autoconf 2.13 and
-dnl later (i.e. only where AC_DEFINE supports 3 arguments).
+dnl VARNAME is then offered as both an output variable and a C
+dnl preprocessor symbol.
dnl
-dnl Examples:
+dnl Example:
dnl
-dnl AC_DEFINE_DIR(DATADIR, datadir)
-dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
-dnl
-dnl @version $ac_define_dir.m4,v 1.2 1999/09/27 15:10:44 simons Exp$
-dnl @author Alexandre Oliva <address@hidden>
-
-AC_DEFUN(AC_DEFINE_DIR, [
- ac_expanded=`(
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- eval echo \""[$]$2"\"
- )`
- ifelse($3, ,
- AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
- AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
+dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <address@hidden>
+dnl @author Andreas Schwab <address@hidden>
+dnl @author Guido Draheim <address@hidden>
+dnl @author Alexandre Oliva
+dnl @version 2005-07-29
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
])
dnl @synopsis AM_GUILE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
--
Russ Allbery (address@hidden) <http://www.eyrie.org/~eagle/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnubg] [PATCH] Autoconf 2.60 compatibility fix,
Russ Allbery <=