[PATCH] autoconf: Add checking for unsetenv function

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: H.Merijn Brand <h.m.brand@...>, Junio C Hamano <gitster@...>, Jakub Narebski <jnareb@...>
Date: Thursday, January 17, 2008 - 9:03 pm

Update configure.ac (and config.mak.in) by adding test for unsetenv
(NO_UNSETENV).  Add comment about NO_UNSETENV to Makefile header, as
original commit 731043fd adding compat/unsetenv.c didn't do that.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---

I'm sorry for that. When I was checking which tests were missing from
configure.ac I have examined only Makefile header... and there was no
note about NO_UNSETENV there.

But the above comment I think also means that the uname base "guessage"
system in Makefile didn't catch that. You probably would want to modify
Makefile in that direction too; currently "guessage system" sets
NO_UNSETENV for and SunOS 5.8, SunOS 5.9, and you probably would want
to use it also for (older?) HP-UX.

 Makefile      |    2 ++
 config.mak.in |    1 +
 configure.ac  |    6 ++++++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 82e9cd6..f35e269 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,8 @@ all::
 #
 # Define NO_SETENV if you don't have setenv in the C library.
 #
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+#
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
diff --git a/config.mak.in b/config.mak.in
index 15fb26c..40b14d9 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -40,6 +40,7 @@ NO_MEMMEM=@NO_MEMMEM@
 NO_STRLCPY=@NO_STRLCPY@
 NO_STRTOUMAX=@NO_STRTOUMAX@
 NO_SETENV=@NO_SETENV@
+NO_UNSETENV=@NO_UNSETENV@
 NO_MKDTEMP=@NO_MKDTEMP@
 NO_ICONV=@NO_ICONV@
 OLD_ICONV=@OLD_ICONV@
diff --git a/configure.ac b/configure.ac
index 6f641e3..af177fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,6 +356,12 @@ AC_CHECK_FUNC(setenv,
 [NO_SETENV=YesPlease])
 AC_SUBST(NO_SETENV)
 #
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+AC_CHECK_FUNC(unsetenv,
+[NO_UNSETENV=],
+[NO_UNSETENV=YesPlease])
+AC_SUBST(NO_UNSETENV)
+#
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 AC_CHECK_FUNC(mkdtemp,
 [NO_MKDTEMP=],
-- 
1.5.3.7

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
FYI: Reply from HP-UX, H.Merijn Brand, (Thu Jan 17, 9:11 am)
[PATCH] autoconf: Add checking for unsetenv function, Jakub Narebski, (Thu Jan 17, 9:03 pm)
Re: FYI: Reply from HP-UX, Daniel Barkalow, (Thu Jan 17, 5:17 pm)
Re: FYI: Reply from HP-UX, Johannes Schindelin, (Thu Jan 17, 12:58 pm)
Re: FYI: Reply from HP-UX, H.Merijn Brand, (Thu Jan 17, 1:55 pm)
Re: FYI: Reply from HP-UX, Johannes Schindelin, (Thu Jan 17, 2:14 pm)
Re: FYI: Reply from HP-UX, H.Merijn Brand, (Thu Jan 17, 2:21 pm)
Re: FYI: Reply from HP-UX, Johannes Schindelin, (Thu Jan 17, 2:24 pm)
Re: FYI: Reply from HP-UX, H.Merijn Brand, (Thu Jan 17, 2:29 pm)