[Box Backup-dev] Makefile.extra?

Martin Ebourne boxbackup-dev@fluffy.co.uk
Sun, 26 Feb 2006 19:51:29 +0000


On Sun, 2006-02-26 at 18:05 +0000, James O'Gorman wrote:
> It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
> but is this OK, and should these stay in configure.ac or in the 
> infrastructure/m4 directory?
> 
> AC_PROG_PATH([PERL], [perl], [no])
> if test "x$PERL" != "xno"; then
>    AC_SUBST([PERL])
>    AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
> perl executable])
> fi

Yes, that looks fine. Sorry, should have said AC_DEFINE_UNQUOTED, not
AC_SUBST. In fact, I think AC_DEFINE_UNQUOTED will AC_SUBST for you so
that may not be needed.

Do you really not want to define it if perl is not available? Would it
not be better to error on no perl? If you don't error you need to
usefully handle the case where it does not exist, which seems unlikely.

In configure.ac is fine. I split things out into inf/m4 when they become
a bit on the large/complex side, to keep configure.ac small and easy to
read. This is very modular so could be split, but then it's also only a
few lines, so it doesn't gain much.

Cheers,

Martin.