Re: --enable-layout and overriding --prefix
Aaron Bannert wrote: As I pointed out in my message *and* on irc where we were just having this discussion, there is no way to let --prefix override the layout with autoconf in a way that is guaranteed to work across versions of autoconf, at least as far as I can see Am I being especially thick to-day? If the layout is processed earlier in configure than the other arguments, why doesn't that solve the problem? I wasn't aware of any parallelisation done by configure :-) -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://GoluxCom/coar/ Author, developer, opinionist http://Apache-ServerCom/ Millennium hand and shrimp!
Re: --enable-layout and overriding --prefix
On Thu, Feb 28, 2002 at 01:06:21PM -0500, Rodent of Unusual Size wrote: Am I being especially thick to-day? If the layout is processed earlier in configure than the other arguments, why doesn't that solve the problem? I wasn't aware of any parallelisation done by configure :-) autoconf explicitly resets all prefix-variables before parsing its arguments So, we can't set the layout before then -- justin
Re: --enable-layout and overriding --prefix
On Thu, Feb 28, 2002 at 01:06:21PM -0500, Rodent of Unusual Size wrote: As I pointed out in my message *and* on irc where we were just having this discussion, there is no way to let --prefix override the layout with autoconf in a way that is guaranteed to work across versions of autoconf, at least as far as I can see Am I being especially thick to-day? If the layout is processed earlier in configure than the other arguments, why doesn't that solve the problem? I wasn't aware of any parallelisation done by configure :-) In my version of autoconf (213), AC_INIT calls AC_INIT_PARSE_ARG, which initializes all of the popular values to the autoconf defaults (eg prefix=NONE, exec_prefix=NONE, bindir='${exec_prefix}/bin', etc) and then immediately proceeds to parse the args to configure, possibly overwriting the defaults Since there is no way to know what those defaults might be on current or future versions of autoconf, we have no way to detect if the user actually explicitly set --prefix, or if the value we got was just the default This is a problem since we'd like our --enable-layout to only override those variables I would love to find a way around this, but for now I'm thinking that the only way is to have apache's configurein reparse the args to configure (like --prefix, etc) and set our own defaults for each -aaron
Re: --enable-layout and overriding --prefix
* Rodent of Unusual Size ([EMAIL PROTECTED]) wrote : Aaron Bannert wrote: As I pointed out in my message *and* on irc where we were just having this discussion, there is no way to let --prefix override the layout with autoconf in a way that is guaranteed to work across versions of autoconf, at least as far as I can see. Am I being especially thick to-day? If the layout is processed earlier in configure than the other arguments, why doesn't that solve the problem? I wasn't aware of any parallelisation done by configure.. :-) Layout is processed as early in configure as we can do it(before any other custom arguments), but autoconf handles --prefix and friends first as part of its default code. Thus, prefix etc get set, and then layout blows them away. (Autoconf also doesn't provide any way to check whether the variables are defaults or have been set with arguments passed to configure.) The way 1.3 worked was to run layout first and then handle the other variables. Cheers, -Thom
Re: --enable-layout and overriding --prefix
On Wed, Feb 27, 2002 at 12:21:41AM +, Thom May wrote: As promised: Index: acinclude.m4 === RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v retrieving revision 1.110 diff -u -u -r1.110 acinclude.m4 --- acinclude.m4 26 Feb 2002 21:31:45 - 1.110 +++ acinclude.m4 27 Feb 2002 00:19:07 - @@ -325,23 +325,6 @@ done changequote([,]) ])dnl -dnl -dnl APACHE_ENABLE_LAYOUT -dnl -AC_DEFUN(APACHE_ENABLE_LAYOUT,[ -AC_ARG_ENABLE(layout, -APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ - LAYOUT=$enableval -]) - -if test -z $LAYOUT; then - LAYOUT=Apache -fi -APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) - -AC_MSG_CHECKING(for chosen layout) -AC_MSG_RESULT($layout_name) -]) dnl dnl APACHE_ENABLE_MODULES Index: configure.in === RCS file: /home/cvspublic/httpd-2.0/configure.in,v retrieving revision 1.200 diff -u -u -r1.200 configure.in --- configure.in 1 Feb 2002 23:22:29 - 1.200 +++ configure.in 27 Feb 2002 00:19:08 - @@ -18,6 +18,21 @@ sinclude(srclib/apr/build/apr_threads.m4) sinclude(acinclude.m4) +dnl Get the layout here, so we can pass the required variables to apr +dnl APACHE_ENABLE_LAYOUT +AC_ARG_ENABLE(layout, +APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ + LAYOUT=$enableval + APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) +]) + +AC_MSG_CHECKING(for chosen layout) +if test -z $LAYOUT; then + AC_MSG_RESULT([Autoconf Defaults]) +else + AC_MSG_RESULT($layout_name) +fi + dnl Save user-defined environment settings for later restoration dnl APR_SAVE_THE_ENVIRONMENT(CPPFLAGS) I think as I pointed out in IRC, we need to pass all of the --libdir, etc flags to APR/apr-util/pcre as well. I don't think does this. Can you please resumbit with a patch that does this? I'll back off on the override capability for now, but I would like to be able to address this at some point. It just seems that autoconf can't do this and that shouldn't stop us from getting something working. If I have the time to sit down and look at it, I'll try. But, let's just get this working again. -- justin
Re: --enable-layout and overriding --prefix
* Aaron Bannert ([EMAIL PROTECTED]) wrote : On Wed, Feb 27, 2002 at 12:29:49AM -0800, Justin Erenkrantz wrote: I think as I pointed out in IRC, we need to pass all of the --libdir, etc flags to APR/apr-util/pcre as well. I don't think does this. Can you please resumbit with a patch that does this? Attached. -Thom Index: acinclude.m4 === RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v retrieving revision 1.110 diff -u -u -r1.110 acinclude.m4 --- acinclude.m426 Feb 2002 21:31:45 - 1.110 +++ acinclude.m427 Feb 2002 15:38:52 - @@ -325,23 +325,6 @@ done changequote([,]) ])dnl -dnl -dnl APACHE_ENABLE_LAYOUT -dnl -AC_DEFUN(APACHE_ENABLE_LAYOUT,[ -AC_ARG_ENABLE(layout, -APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ - LAYOUT=$enableval -]) - -if test -z $LAYOUT; then - LAYOUT=Apache -fi -APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) - -AC_MSG_CHECKING(for chosen layout) -AC_MSG_RESULT($layout_name) -]) dnl dnl APACHE_ENABLE_MODULES Index: configure.in === RCS file: /home/cvspublic/httpd-2.0/configure.in,v retrieving revision 1.200 diff -u -u -r1.200 configure.in --- configure.in1 Feb 2002 23:22:29 - 1.200 +++ configure.in27 Feb 2002 15:38:52 - @@ -18,6 +18,21 @@ sinclude(srclib/apr/build/apr_threads.m4) sinclude(acinclude.m4) +dnl Get the layout here, so we can pass the required variables to apr +dnl APACHE_ENABLE_LAYOUT +AC_ARG_ENABLE(layout, +APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ + LAYOUT=$enableval + APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) +]) + +AC_MSG_CHECKING(for chosen layout) +if test -z $LAYOUT; then + AC_MSG_RESULT([Autoconf Defaults]) +else + AC_MSG_RESULT($layout_name) +fi + dnl Save user-defined environment settings for later restoration dnl APR_SAVE_THE_ENVIRONMENT(CPPFLAGS) @@ -52,15 +67,15 @@ echo $ac_n ${nl}Configuring Apache Portable Runtime library ...${nl} -APR_SUBDIR_CONFIG(srclib/apr, $apache_apr_flags --prefix=$prefix) +APR_SUBDIR_CONFIG(srclib/apr, $apache_apr_flags --prefix=$prefix +--exec-prefix=$exec_prefix --libdir=$libdir --bindir=$bindir) echo $ac_n ${nl}Configuring Apache Portable Runtime Utility library...${nl} -APR_SUBDIR_CONFIG(srclib/apr-util, --with-apr=../apr --prefix=$prefix) +APR_SUBDIR_CONFIG(srclib/apr-util, --with-apr=../apr --prefix=$prefix +--exec-prefix=$exec_prefix --libdir=$libdir --bindir=$bindir) echo $ac_n ${nl}Configuring PCRE regular expression library ...${nl} -APR_SUBDIR_CONFIG(srclib/pcre, --prefix=$prefix) +APR_SUBDIR_CONFIG(srclib/pcre, --prefix=$prefix --exec-prefix=$exec_prefix +--libdir=$libdir --bindir=$bindir) echo $ac_n ${nl}Configuring Apache httpd ...${nl}
Re: --enable-layout and overriding --prefix
On Wed, Feb 27, 2002 at 07:07:07PM -0800, Aaron Bannert wrote: I don't think we want to have to do /configure --prefix=/foo --datadir='${prefix}' --sysconfdir=conf every time we configure Apache just to get the paths we're used to, so I'm hoping someone can provide some insight At this point I'm thinking that we should reparse the --prefix variables again in our configurein, and then set ap_prefix variables from those This will at least let us set defaults and check if a user changed from the default OTOH this will take some serious work How about always using a 'default' layout that is in configlayout? The default would be --layout=default However, that means we need the override functional =) So, this idea is pretty much shot, I think Oh, well -- justin
--enable-layout and overriding --prefix
There's a little catch-22 that we're running into in trying to get --enable-layout to work. I have a patch that seems to fix --enable-layout again, but there is a potential problem: If one specifies --enable-layout=foo then that layout profile will completely override other settings like --prefix. I don't see this as a problem, since one must explicitly introduce --enable-layout (which in and of itself can completely control all buildtime/installtime paths). Due to some issues with autoconf, it wouldn't be possible to simply save and restore the --prefix -like params after APACHE_ENABLE_LAYOUT, since we'd have to guess what AC_INIT is supplying as the defaults (we can test for $prefix = NONE, but that trick doesn't work everywhere). Are we content with --enable-layout potentially overwriting all --prefix -like parameters? -aaron
Re: --enable-layout and overriding --prefix
On Tue, Feb 26, 2002 at 11:47:42AM -0800, Aaron Bannert wrote: Are we content with --enable-layout potentially overwriting all --prefix -like parameters? I'm not. I think any argument specified on the command-line (such as --prefix) should override the specified layout. It worked like this in 1.3 (yes, it didn't use autoconf, but so what?). -- justin
Re: --enable-layout and overriding --prefix
On Tue, Feb 26, 2002 at 03:52:32PM -0800, Justin Erenkrantz wrote: On Tue, Feb 26, 2002 at 11:47:42AM -0800, Aaron Bannert wrote: Are we content with --enable-layout potentially overwriting all --prefix -like parameters? I'm not. I think any argument specified on the command-line (such as --prefix) should override the specified layout. It worked like this in 1.3 (yes, it didn't use autoconf, but so what?). -- justin As I pointed out in my message *and* on irc where we were just having this discussion, there is no way to let --prefix override the layout with autoconf in a way that is guaranteed to work across versions of autoconf, at least as far as I can see. If you can come up with a way to let that happen, I'd be happy to hear it, but in the mean time I don't think it's crutial to getting --enable-layout working*. * yes, we have this working now. Patch forthcoming. -aaron
Re: --enable-layout and overriding --prefix
* Aaron Bannert ([EMAIL PROTECTED]) wrote : On Tue, Feb 26, 2002 at 03:52:32PM -0800, Justin Erenkrantz wrote: On Tue, Feb 26, 2002 at 11:47:42AM -0800, Aaron Bannert wrote: Are we content with --enable-layout potentially overwriting all --prefix -like parameters? I'm not. I think any argument specified on the command-line (such as --prefix) should override the specified layout. It worked like this in 1.3 (yes, it didn't use autoconf, but so what?). -- justin As I pointed out in my message *and* on irc where we were just having this discussion, there is no way to let --prefix override the layout with autoconf in a way that is guaranteed to work across versions of autoconf, at least as far as I can see. If you can come up with a way to let that happen, I'd be happy to hear it, but in the mean time I don't think it's crutial to getting --enable-layout working*. * yes, we have this working now. Patch forthcoming. As promised: Index: acinclude.m4 === RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v retrieving revision 1.110 diff -u -u -r1.110 acinclude.m4 --- acinclude.m426 Feb 2002 21:31:45 - 1.110 +++ acinclude.m427 Feb 2002 00:19:07 - @@ -325,23 +325,6 @@ done changequote([,]) ])dnl -dnl -dnl APACHE_ENABLE_LAYOUT -dnl -AC_DEFUN(APACHE_ENABLE_LAYOUT,[ -AC_ARG_ENABLE(layout, -APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ - LAYOUT=$enableval -]) - -if test -z $LAYOUT; then - LAYOUT=Apache -fi -APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) - -AC_MSG_CHECKING(for chosen layout) -AC_MSG_RESULT($layout_name) -]) dnl dnl APACHE_ENABLE_MODULES Index: configure.in === RCS file: /home/cvspublic/httpd-2.0/configure.in,v retrieving revision 1.200 diff -u -u -r1.200 configure.in --- configure.in1 Feb 2002 23:22:29 - 1.200 +++ configure.in27 Feb 2002 00:19:08 - @@ -18,6 +18,21 @@ sinclude(srclib/apr/build/apr_threads.m4) sinclude(acinclude.m4) +dnl Get the layout here, so we can pass the required variables to apr +dnl APACHE_ENABLE_LAYOUT +AC_ARG_ENABLE(layout, +APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[ + LAYOUT=$enableval + APACHE_LAYOUT($srcdir/config.layout, $LAYOUT) +]) + +AC_MSG_CHECKING(for chosen layout) +if test -z $LAYOUT; then + AC_MSG_RESULT([Autoconf Defaults]) +else + AC_MSG_RESULT($layout_name) +fi + dnl Save user-defined environment settings for later restoration dnl APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)