Skip to content

Commit a1a587e

Browse files
Ralf Wildenhuesgitster
authored andcommitted
Fix naming scheme for configure cache variables.
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b56c79c commit a1a587e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configure.ac

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,31 +114,31 @@ AC_MSG_NOTICE([CHECKS for programs])
114114
#
115115
AC_PROG_CC([cc gcc])
116116
# which switch to pass runtime path to dynamic libraries to the linker
117-
AC_CACHE_CHECK([if linker supports -R], ld_dashr, [
117+
AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [
118118
SAVE_LDFLAGS="${LDFLAGS}"
119119
LDFLAGS="${SAVE_LDFLAGS} -R /"
120-
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_dashr=yes], [ld_dashr=no])
120+
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_dashr=yes], [git_cv_ld_dashr=no])
121121
LDFLAGS="${SAVE_LDFLAGS}"
122122
])
123-
if test "$ld_dashr" = "yes"; then
123+
if test "$git_cv_ld_dashr" = "yes"; then
124124
AC_SUBST(CC_LD_DYNPATH, [-R])
125125
else
126-
AC_CACHE_CHECK([if linker supports -Wl,-rpath,], ld_wl_rpath, [
126+
AC_CACHE_CHECK([if linker supports -Wl,-rpath,], git_cv_ld_wl_rpath, [
127127
SAVE_LDFLAGS="${LDFLAGS}"
128128
LDFLAGS="${SAVE_LDFLAGS} -Wl,-rpath,/"
129-
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_wl_rpath=yes], [ld_wl_rpath=no])
129+
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_wl_rpath=yes], [git_cv_ld_wl_rpath=no])
130130
LDFLAGS="${SAVE_LDFLAGS}"
131131
])
132-
if test "$ld_wl_rpath" = "yes"; then
132+
if test "$git_cv_ld_wl_rpath" = "yes"; then
133133
AC_SUBST(CC_LD_DYNPATH, [-Wl,-rpath,])
134134
else
135-
AC_CACHE_CHECK([if linker supports -rpath], ld_rpath, [
135+
AC_CACHE_CHECK([if linker supports -rpath], git_cv_ld_rpath, [
136136
SAVE_LDFLAGS="${LDFLAGS}"
137137
LDFLAGS="${SAVE_LDFLAGS} -rpath /"
138-
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_rpath=yes], [ld_rpath=no])
138+
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_rpath=yes], [git_cv_ld_rpath=no])
139139
LDFLAGS="${SAVE_LDFLAGS}"
140140
])
141-
if test "$ld_rpath" = "yes"; then
141+
if test "$git_cv_ld_rpath" = "yes"; then
142142
AC_SUBST(CC_LD_DYNPATH, [-rpath])
143143
else
144144
AC_MSG_WARN([linker does not support runtime path to dynamic libraries])

0 commit comments

Comments
 (0)