@matheusbsbs / matheus-bagliano / commits / bfa8fccf47
Fork 0

autoconf: Add checking for unsetenv function

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Jan 18, 2008 at 02:03 UTC bfa8fccf477ed2567b035f1c6a3cb2b74ec4ef67
3 files changed +9
Makefile
+2
@@ -38,6 +38,8 @@ all::
38 #
39 # Define NO_SETENV if you don't have setenv in the C library.
40 #
41 +# Define NO_UNSETENV if you don't have unsetenv in the C library.
42 +#
43 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
44 #
45 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
config.mak.in
+1
@@ -40,6 +40,7 @@ NO_MEMMEM=@NO_MEMMEM@
40 NO_STRLCPY=@NO_STRLCPY@
41 NO_STRTOUMAX=@NO_STRTOUMAX@
42 NO_SETENV=@NO_SETENV@
43 +NO_UNSETENV=@NO_UNSETENV@
44 NO_MKDTEMP=@NO_MKDTEMP@
45 NO_ICONV=@NO_ICONV@
46 OLD_ICONV=@OLD_ICONV@
configure.ac
+6
@@ -356,6 +356,12 @@ AC_CHECK_FUNC(setenv,
356 [NO_SETENV=YesPlease])
357 AC_SUBST(NO_SETENV)
358 #
359 +# Define NO_UNSETENV if you don't have unsetenv in the C library.
360 +AC_CHECK_FUNC(unsetenv,
361 +[NO_UNSETENV=],
362 +[NO_UNSETENV=YesPlease])
363 +AC_SUBST(NO_UNSETENV)
364 +#
365 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
366 AC_CHECK_FUNC(mkdtemp,
367 [NO_MKDTEMP=],