{"thread":{"id":"17257","subject":"[PATCH] Fix naming scheme for configure cache variables.","startedAt":"2009-01-19T20:34:36Z","lastAt":"2009-01-21T10:26:47Z","messageCount":4,"participants":["Ralf Wildenhues","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"101166","messageId":"20090119203436.GB3539@ins.uni-bonn.de","threadId":"17257","inReplyTo":null,"subject":"[PATCH] Fix naming scheme for configure cache variables.","fromName":"Ralf Wildenhues","fromEmail":"ralf.wildenhues@gmx.de","sentAt":"2009-01-19T20:34:36Z","receivedAt":"2009-01-19T20:34:36Z","isPatch":true,"sender":{"key":"ralf.wildenhues@gmx.de","avatar":null},"body":"In order to be cached, configure variables need to contain the\nstring '_cv_', and they should begin with a package-specific\nprefix in order to avoid interfering with third-party macros.\nRename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.\n---\n\nThis avoids a warning with newer autoconf versions about the naming of\nthe cache variables, and makes the caching work for them.\n\nAs to the 'git_' prefix, it could be argued that the other cache\nvariables used in configure.ac should also be renamed s/ac_/git_/\nIf you like, I can provide a patch for those, too.\n\nThanks,\nRalf\n\n configure.ac |   18 +++++++++---------\n 1 files changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 0a5fc8c..363547c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -114,31 +114,31 @@ AC_MSG_NOTICE([CHECKS for programs])\n #\n AC_PROG_CC([cc gcc])\n # which switch to pass runtime path to dynamic libraries to the linker\n-AC_CACHE_CHECK([if linker supports -R], ld_dashr, [\n+AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [\n    SAVE_LDFLAGS=\"${LDFLAGS}\"\n    LDFLAGS=\"${SAVE_LDFLAGS} -R /\"\n-   AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_dashr=yes], [ld_dashr=no])\n+   AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_dashr=yes], [git_cv_ld_dashr=no])\n    LDFLAGS=\"${SAVE_LDFLAGS}\"\n ])\n-if test \"$ld_dashr\" = \"yes\"; then\n+if test \"$git_cv_ld_dashr\" = \"yes\"; then\n    AC_SUBST(CC_LD_DYNPATH, [-R])\n else\n-   AC_CACHE_CHECK([if linker supports -Wl,-rpath,], ld_wl_rpath, [\n+   AC_CACHE_CHECK([if linker supports -Wl,-rpath,], git_cv_ld_wl_rpath, [\n       SAVE_LDFLAGS=\"${LDFLAGS}\"\n       LDFLAGS=\"${SAVE_LDFLAGS} -Wl,-rpath,/\"\n-      AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_wl_rpath=yes], [ld_wl_rpath=no])\n+      AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_wl_rpath=yes], [git_cv_ld_wl_rpath=no])\n       LDFLAGS=\"${SAVE_LDFLAGS}\"\n    ])\n-   if test \"$ld_wl_rpath\" = \"yes\"; then\n+   if test \"$git_cv_ld_wl_rpath\" = \"yes\"; then\n       AC_SUBST(CC_LD_DYNPATH, [-Wl,-rpath,])\n    else\n-      AC_CACHE_CHECK([if linker supports -rpath], ld_rpath, [\n+      AC_CACHE_CHECK([if linker supports -rpath], git_cv_ld_rpath, [\n          SAVE_LDFLAGS=\"${LDFLAGS}\"\n          LDFLAGS=\"${SAVE_LDFLAGS} -rpath /\"\n-         AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_rpath=yes], [ld_rpath=no])\n+         AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_rpath=yes], [git_cv_ld_rpath=no])\n          LDFLAGS=\"${SAVE_LDFLAGS}\"\n       ])\n-      if test \"$ld_rpath\" = \"yes\"; then\n+      if test \"$git_cv_ld_rpath\" = \"yes\"; then\n          AC_SUBST(CC_LD_DYNPATH, [-rpath])\n       else\n          AC_MSG_WARN([linker does not support runtime path to dynamic libraries])\n-- \n1.6.1.137.g3d9e8\n"},{"id":"101219","messageId":"7vljt6mqv0.fsf@gitster.siamese.dyndns.org","threadId":"17257","inReplyTo":"20090119203436.GB3539@ins.uni-bonn.de","subject":"Re: [PATCH] Fix naming scheme for configure cache variables.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-20T06:30:27Z","receivedAt":"2009-01-20T06:30:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:\n\n> In order to be cached, configure variables need to contain the\n> string '_cv_', and they should begin with a package-specific\n> prefix in order to avoid interfering with third-party macros.\n> Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.\n> ---\n>\n> This avoids a warning with newer autoconf versions about the naming of\n> the cache variables, and makes the caching work for them.\n\nThanks.\n\nWe require every patch we accept to be accompanied with a sign-off.\n\nCan you certify that ... [see Documentation/SubmittingPatches and look for\n(4) Sign your work] ... please?\n"},{"id":"101228","messageId":"20090120070852.GE5561@ins.uni-bonn.de","threadId":"17257","inReplyTo":"7vljt6mqv0.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Fix naming scheme for configure cache variables.","fromName":"Ralf Wildenhues","fromEmail":"ralf.wildenhues@gmx.de","sentAt":"2009-01-20T07:08:52Z","receivedAt":"2009-01-20T07:08:52Z","isPatch":true,"sender":{"key":"ralf.wildenhues@gmx.de","avatar":null},"body":"* Junio C Hamano wrote on Tue, Jan 20, 2009 at 07:30:27AM CET:\n> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:\n> \n> > In order to be cached, configure variables need to contain the\n> > string '_cv_', and they should begin with a package-specific\n> > prefix in order to avoid interfering with third-party macros.\n> > Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.\n\n> We require every patch we accept to be accompanied with a sign-off.\n> \n> Can you certify that ... [see Documentation/SubmittingPatches and look for\n> (4) Sign your work] ... please?\n\nSigned-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>\n\nSorry about that.\n\nCheers,\nRalf\n"},{"id":"101367","messageId":"7v7i4peyzc.fsf@gitster.siamese.dyndns.org","threadId":"17257","inReplyTo":"20090119203436.GB3539@ins.uni-bonn.de","subject":"Re: [PATCH] Fix naming scheme for configure cache variables.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-21T10:26:47Z","receivedAt":"2009-01-21T10:26:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:\n\n> In order to be cached, configure variables need to contain the\n> string '_cv_', and they should begin with a package-specific\n> prefix in order to avoid interfering with third-party macros.\n> Rename ld_dashr, ld_wl_rpath, ld_rpath to git_cv_ld_dashr etc.\n>\n> Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>\n\nThanks.\n"}]}