On Tue, May 13, 2008 at 07:55:26AM -0400, David Bruce wrote: > On Tuesday 13 May 2008 04:37:16 am Stepan Kasal wrote: > > > On Mon, 2008-05-12 at 11:22 -0400, David Bruce wrote: > > > > "MKDIR_P" is recommended but requires automake-1.10 or higher. [...] > > > > is there an acceptable workaround? > > > > forgive me stating the obvious, but the workaround is to use > > $(mkdir_p). It will work in Automake 1.10.x, perhaps even longer. > > Well, of course. What I meant was that I wanted the code in the svn > repository > to be as "correct" as possible, so I used MKDIR_P. My thought was whether > there was some sort of autotools conditional that would allow this to work > with automake 1.9 (i.e. if automake version < 1.10, define "MKDIR_P" to > be "mkdir_p").
Try this in configure.ac: AC_DEFUN([MY_MKDIR_P], [ m4_ifdef([AC_PROG_MKDIR_P], [AC_REQUIRE([AC_PROG_MKDIR_P])]) ]) MY_MKDIR_P or m4_ifdef([AC_PROG_MKDIR_P], [AC_PROG_MKDIR_P]) The latter might mean that the macro is expanded second time, which does not actually matter, but is somewhat inelegant. But if you put that line before AM_INIT_AUTOMAKE, you might get the first and the only expansion. The former has to use AC_DEFUN because yoiu cannot have AC_REQUIRE directly in configure.ac. This was an interesting excercise; yet I believe $(mkdir_p) is the solution. Every project has certain small probability that it will break on Automake upgrade to 1.11, 1.12, etc. $(mkdir_p) is not something which would increase that probability much. And the above hack is not safer--just a small fraction, but non-zero. HTH, Stepan