Re: [modwsgi] configure not using --exec_prefix

27 views
Skip to first unread message

Graham Dumpleton

unread,
Oct 28, 2012, 6:52:12 PM10/28/12
to mod...@googlegroups.com
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

Hugh McManus

unread,
Oct 29, 2012, 6:36:59 PM10/29/12
to mod...@googlegroups.com
Hey Graham,

Thanks for getting back to me on this. Yes you're right, I'm not sure that what I've done is enough. In fact you've pointed out how little I know of configure files and their ecosystem altogether.

This is my real first attempt at looking at those types of files and I was only really using the python runtime executable as an example, as I've also created an rpm for it, and since I wanted to install it in /opt/python27 I used the --prefix option for that which worked fine. I really only played around with this one to see if I could get it working with some sort of prefix for packaging purposes.

Maybe I was a little hasty in not considering that it could affect a bunch of other parts of the configuration and possible a more comprehensive look at the configure script with testing is required.

Unfortunately I don't happen to know of the documentation for handling exec_prefix, or any autoconf. As I said I was going from what I had seen in the python configure script and trial and error.

Thanks for taking the time to review anyway.

Hugh  
Reply all
Reply to author
Forward
0 new messages