On 26 October 2012 00:10, Hugh McManus <
hmcm...@gmail.com> wrote:
> Hey,
>
> I have created a rpm spec file for packaging this up into a rpm for my
> installation. I have noticed however that the configure script isn't
> honoring the -exec-prefix location passed. It's in the following line in
> configure:
>
> LIBEXECDIR="`${APXS} -q LIBEXECDIR`"
>
> In order to get this working I've changed it to be:
>
> if [ $exec_prefix == "NONE" ];then
> LIBEXECDIR="`${APXS} -q LIBEXECDIR`"
> else
> LIBEXECDIR="$exec_prefix`${APXS} -q LIBEXECDIR`"
> fi
>
> I was going to create a issue on the google code for the project but I just
> wanted to run it by here first to make sure it sounds sensible.
Are you sure that is enough?
Prior to that point there is:
AC_ARG_WITH(apxs, AC_HELP_STRING([--with-apxs=NAME],
[name of the apxs executable [[apxs]]]),
[APXS="$with_apxs"])
if test -z "${APXS}"; then
AC_PATH_PROGS(APXS, apxs2 apxs, [apxs],
[$PATH:/usr/local/apache/bin:/usr/sbin])
fi
So, if it found an apxs executable the value of APXS would be a full path.
If it was not found, it will be left as apxs.
It seems to me that shoving exec_prefix in only at point of running it
relies on apxs still being found in a system wide location, or does
AC_PATH_PROGS automatically take into consideration that exec_prefix
is set and adds it at the beginning of directories sourced from the
provided PATH. But then if it did that, why wouldn't it include the
exec_prefix automatically itself then.
Also issues if exec_prefix is shoved in front when is just apxs. Sure
it would have failed anyway if not found when run, but now also got
some extra path in front which is likely just to confuse.
Do you happen to know of any autoconf documentation which explains how
one is mean to handle exec_prefix when searching and then running
executables?
Graham