[PATCH app-xdm 1/4] config: upgrade AC_DEFINE_DIR to AX_DEFINE_DIR

Gaetan Nadon memsize at videotron.ca
Sat Aug 21 16:31:54 PDT 2010


Use the latest version now hosted by GNU.
The renaming protects Autoconf namespace.
There is no functional change in the macro.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac        |   24 ++++++++++++------------
 m4/ac_define_dir.m4 |   45 ---------------------------------------------
 m4/ax_define_dir.m4 |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 57 deletions(-)
 delete mode 100644 m4/ac_define_dir.m4
 create mode 100644 m4/ax_define_dir.m4

diff --git a/configure.ac b/configure.ac
index 9963e7b..ad6ff8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,7 +419,7 @@ if test "x$DYNAMIC_GREETER" = "xyes" ; then
 	PKG_CHECK_MODULES(XDMGREET, xt x11 xext)
 
 	GREETERLIB="${XDMLIBDIR}/libXdmGreet.so"
-	AC_DEFINE_DIR(DEF_GREETER_LIB, GREETERLIB, 
+	AX_DEFINE_DIR(DEF_GREETER_LIB, GREETERLIB,
 			[Location of Xdm Greeter library])
 
 	XDMGREET_CFLAGS="$XDMGREET_CFLAGS $XDM_PRINT_CFLAGS $DMCP_CFLAGS $XLIB_CFLAGS $OS_CFLAGS $GREETER_CFLAGS $AUTH_CFLAGS"
@@ -496,21 +496,21 @@ fi
 if test -z "$DEF_SERVER_LINE" ; then 
 	DEF_SERVER_LINE=":0 local ${DEF_SERVER} :0"
 fi
-AC_DEFINE_DIR(DEF_SERVER_LINE, DEF_SERVER_LINE,
+AX_DEFINE_DIR(DEF_SERVER_LINE, DEF_SERVER_LINE,
 	[Define to default Xserver file entry for local X server])
 
 # -DXRDB_PROGRAM="$(BINDIR)/xrdb"
 AC_ARG_WITH(xrdb, AC_HELP_STRING([--with-xrdb=path],
 			[Use path for xrdb (default: bindir/xrdb)]),
 	    [XRDB=$withval], [XRDB=${bindir}/xrdb])
-AC_DEFINE_DIR(XRDB_PROGRAM, XRDB, 
+AX_DEFINE_DIR(XRDB_PROGRAM, XRDB,
 	[Define to pathname for xrdb program])
 
 # -DDEF_SESSION="$(BINDIR)/xterm -ls"
 AC_ARG_WITH(default-session, AC_HELP_STRING([--with-default-session=command],
 		[Use command for default session (default: bindir/xterm -ls)]),
 	    [DEF_SESSION=$withval], [DEF_SESSION="${bindir}/xterm -ls"])
-AC_DEFINE_DIR(DEF_SESSION, DEF_SESSION,
+AX_DEFINE_DIR(DEF_SESSION, DEF_SESSION,
 	[Define to default command to start X session])
 
 # -DDEF_USER_PATH="$(DEF_USER_PATH)"
@@ -538,7 +538,7 @@ if test -z "$DEF_USER_PATH" ; then
 		;;
 	esac
 fi
-AC_DEFINE_DIR(DEF_USER_PATH, DEF_USER_PATH,
+AX_DEFINE_DIR(DEF_USER_PATH, DEF_USER_PATH,
 	[Define to default PATH environment variable for user sessions])
 
 # -DDEF_SYSTEM_PATH="$(DEF_SYSTEM_PATH)"
@@ -560,29 +560,29 @@ if test -z "$DEF_SYSTEM_PATH" ; then
 		;;
 	esac
 fi
-AC_DEFINE_DIR(DEF_SYSTEM_PATH, DEF_SYSTEM_PATH,
+AX_DEFINE_DIR(DEF_SYSTEM_PATH, DEF_SYSTEM_PATH,
 	[Define to default PATH environment variable for system commands])
 
 # -DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"
 if test -z "$BOURNE_SHELL" ; then
 	BOURNE_SHELL=/bin/sh
 fi
-AC_DEFINE_DIR(DEF_SYSTEM_SHELL, BOURNE_SHELL,
+AX_DEFINE_DIR(DEF_SYSTEM_SHELL, BOURNE_SHELL,
 	[Define to default shell])
 
 # -DDEF_FAILSAFE_CLIENT="$(BINDIR)/xterm"
 
-AC_DEFINE_DIR(DEF_FAILSAFE_CLIENT, bindir/xterm,
+AX_DEFINE_DIR(DEF_FAILSAFE_CLIENT, bindir/xterm,
 	[Define to default command to start failsafe X session])
 
 # -DDEF_XDM_CONFIG="$(XDMDIR)/xdm-config"
 
-AC_DEFINE_DIR(DEF_XDM_CONFIG, XDMCONFIGDIR/xdm-config, 
+AX_DEFINE_DIR(DEF_XDM_CONFIG, XDMCONFIGDIR/xdm-config,
 	[Define to pathname of default xdm-config file])
 
 # -DDEF_CHOOSER="$(CHOOSERPATH)"
 
-AC_DEFINE_DIR(DEF_CHOOSER, XDMLIBDIR/chooser, 
+AX_DEFINE_DIR(DEF_CHOOSER, XDMLIBDIR/chooser,
 	[Define to pathname of where chooser binary is installed])
 
 # -DDEF_AUTH_DIR="$(XDMDIR)"
@@ -593,12 +593,12 @@ AC_ARG_WITH(authdir,
 	[XDMXAUTHDIR="$withval"], [XDMXAUTHDIR="/var/lib/xdm"])
 AC_SUBST(XDMXAUTHDIR)
 
-AC_DEFINE_DIR(DEF_AUTH_DIR, XDMXAUTHDIR,
+AX_DEFINE_DIR(DEF_AUTH_DIR, XDMXAUTHDIR,
 	[Define to pathname where authentication cookie files should be stored])
 
 # -DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"
 
-AC_DEFINE_DIR(DEF_GREETER_LIB, XDMLIBDIR/libXdmGreet.so, 
+AX_DEFINE_DIR(DEF_GREETER_LIB, XDMLIBDIR/libXdmGreet.so,
 	[Define to pathname where greeter shared object is installed (if used)])
 
 PKG_CHECK_MODULES(APPDEFS, xt)
diff --git a/m4/ac_define_dir.m4 b/m4/ac_define_dir.m4
deleted file mode 100644
index 44971b9..0000000
--- a/m4/ac_define_dir.m4
+++ /dev/null
@@ -1,45 +0,0 @@
-# ===========================================================================
-#          http://www.nongnu.org/autoconf-archive/ac_define_dir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
-#
-# DESCRIPTION
-#
-#   This macro sets VARNAME to the expansion of the DIR variable, taking
-#   care of fixing up ${prefix} and such.
-#
-#   VARNAME is then offered as both an output variable and a C preprocessor
-#   symbol.
-#
-#   Example:
-#
-#      AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Stepan Kasal <kasal at ucw.cz>
-#   Copyright (c) 2008 Andreas Schwab <schwab at suse.de>
-#   Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
-#   Copyright (c) 2008 Alexandre Oliva
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-
-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
-])
diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4
new file mode 100644
index 0000000..b74d155
--- /dev/null
+++ b/m4/ax_define_dir.m4
@@ -0,0 +1,49 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+#   This macro sets VARNAME to the expansion of the DIR variable, taking
+#   care of fixing up ${prefix} and such.
+#
+#   VARNAME is then offered as both an output variable and a C preprocessor
+#   symbol.
+#
+#   Example:
+#
+#     AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Stepan Kasal <kasal at ucw.cz>
+#   Copyright (c) 2008 Andreas Schwab <schwab at suse.de>
+#   Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
+#   Copyright (c) 2008 Alexandre Oliva
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 6
+
+AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
+AC_DEFUN([AX_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 ax_define_dir="\"[$]$2\""
+  eval ax_define_dir="\"$ax_define_dir\""
+  AC_SUBST($1, "$ax_define_dir")
+  AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+])
-- 
1.6.0.4



More information about the xorg-devel mailing list