summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc8b5f0)
raw | patch | inline | side by side (parent: fc8b5f0)
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | |
Tue, 6 Nov 2007 20:12:45 +0000 (21:12 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 8 Nov 2007 01:21:41 +0000 (17:21 -0800) |
Avoid "test -o" as it is only XSI not POSIX, and not portable.
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index ed7cc895d276ac4d7548211a364a4e6952f9b7bd..bd80517667ad771362d8fcbc88564ca6ec1b092f 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_ARG_WITH([lib],
[AS_HELP_STRING([--with-lib=ARG],
[ARG specifies alternative name for lib directory])],
- [if test "$withval" = "no" -o "$withval" = "yes"; then \
+ [if test "$withval" = "no" || test "$withval" = "yes"; then \
AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
else \
GIT_CONF_APPEND_LINE(lib=$withval); \
[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[char buf[64];
if (sprintf(buf, "%lld%hhd%jd%zd%td", (long long int)1, (char)2, (intmax_t)3, (size_t)4, (ptrdiff_t)5) != 5)
- exit(1);
+ return 1;
else if (strcmp(buf, "12345"))
- exit(2);]])],
+ return 2;]])],
[ac_cv_c_c99_format=yes],
[ac_cv_c_c99_format=no])
])