git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix naming scheme for configure cache variables.
@ 2009-01-19 20:34 Ralf Wildenhues
  2009-01-20  6:30 ` Junio C Hamano
  2009-01-21 10:26 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Ralf Wildenhues @ 2009-01-19 20:34 UTC (permalink / raw)
  To: git

In order to be cached, configure variables need to contain the
string '_cv_', and they should begin with a package-specific
prefix in order to avoid interfering with third-party macros.
Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.
---

This avoids a warning with newer autoconf versions about the naming of
the cache variables, and makes the caching work for them.

As to the 'git_' prefix, it could be argued that the other cache
variables used in configure.ac should also be renamed s/ac_/git_/
If you like, I can provide a patch for those, too.

Thanks,
Ralf

 configure.ac |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0a5fc8c..363547c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,31 +114,31 @@ AC_MSG_NOTICE([CHECKS for programs])
 #
 AC_PROG_CC([cc gcc])
 # which switch to pass runtime path to dynamic libraries to the linker
-AC_CACHE_CHECK([if linker supports -R], ld_dashr, [
+AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [
    SAVE_LDFLAGS="${LDFLAGS}"
    LDFLAGS="${SAVE_LDFLAGS} -R /"
-   AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_dashr=yes], [ld_dashr=no])
+   AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_dashr=yes], [git_cv_ld_dashr=no])
    LDFLAGS="${SAVE_LDFLAGS}"
 ])
-if test "$ld_dashr" = "yes"; then
+if test "$git_cv_ld_dashr" = "yes"; then
    AC_SUBST(CC_LD_DYNPATH, [-R])
 else
-   AC_CACHE_CHECK([if linker supports -Wl,-rpath,], ld_wl_rpath, [
+   AC_CACHE_CHECK([if linker supports -Wl,-rpath,], git_cv_ld_wl_rpath, [
       SAVE_LDFLAGS="${LDFLAGS}"
       LDFLAGS="${SAVE_LDFLAGS} -Wl,-rpath,/"
-      AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_wl_rpath=yes], [ld_wl_rpath=no])
+      AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_wl_rpath=yes], [git_cv_ld_wl_rpath=no])
       LDFLAGS="${SAVE_LDFLAGS}"
    ])
-   if test "$ld_wl_rpath" = "yes"; then
+   if test "$git_cv_ld_wl_rpath" = "yes"; then
       AC_SUBST(CC_LD_DYNPATH, [-Wl,-rpath,])
    else
-      AC_CACHE_CHECK([if linker supports -rpath], ld_rpath, [
+      AC_CACHE_CHECK([if linker supports -rpath], git_cv_ld_rpath, [
          SAVE_LDFLAGS="${LDFLAGS}"
          LDFLAGS="${SAVE_LDFLAGS} -rpath /"
-         AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_rpath=yes], [ld_rpath=no])
+         AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_rpath=yes], [git_cv_ld_rpath=no])
          LDFLAGS="${SAVE_LDFLAGS}"
       ])
-      if test "$ld_rpath" = "yes"; then
+      if test "$git_cv_ld_rpath" = "yes"; then
          AC_SUBST(CC_LD_DYNPATH, [-rpath])
       else
          AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
-- 
1.6.1.137.g3d9e8

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix naming scheme for configure cache variables.
  2009-01-19 20:34 [PATCH] Fix naming scheme for configure cache variables Ralf Wildenhues
@ 2009-01-20  6:30 ` Junio C Hamano
  2009-01-20  7:08   ` Ralf Wildenhues
  2009-01-21 10:26 ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-01-20  6:30 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: git

Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> In order to be cached, configure variables need to contain the
> string '_cv_', and they should begin with a package-specific
> prefix in order to avoid interfering with third-party macros.
> Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.
> ---
>
> This avoids a warning with newer autoconf versions about the naming of
> the cache variables, and makes the caching work for them.

Thanks.

We require every patch we accept to be accompanied with a sign-off.

Can you certify that ... [see Documentation/SubmittingPatches and look for
(4) Sign your work] ... please?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix naming scheme for configure cache variables.
  2009-01-20  6:30 ` Junio C Hamano
@ 2009-01-20  7:08   ` Ralf Wildenhues
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Wildenhues @ 2009-01-20  7:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

* Junio C Hamano wrote on Tue, Jan 20, 2009 at 07:30:27AM CET:
> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> 
> > In order to be cached, configure variables need to contain the
> > string '_cv_', and they should begin with a package-specific
> > prefix in order to avoid interfering with third-party macros.
> > Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.

> We require every patch we accept to be accompanied with a sign-off.
> 
> Can you certify that ... [see Documentation/SubmittingPatches and look for
> (4) Sign your work] ... please?

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

Sorry about that.

Cheers,
Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix naming scheme for configure cache variables.
  2009-01-19 20:34 [PATCH] Fix naming scheme for configure cache variables Ralf Wildenhues
  2009-01-20  6:30 ` Junio C Hamano
@ 2009-01-21 10:26 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-01-21 10:26 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: git

Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> In order to be cached, configure variables need to contain the
> string '_cv_', and they should begin with a package-specific
> prefix in order to avoid interfering with third-party macros.
> Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.
>
> Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-21 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 20:34 [PATCH] Fix naming scheme for configure cache variables Ralf Wildenhues
2009-01-20  6:30 ` Junio C Hamano
2009-01-20  7:08   ` Ralf Wildenhues
2009-01-21 10:26 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).