Makefile: add NEEDS_LIBGEN to optionally add -lgen to compile arguments

Commit 003b33a8 recently added a call to basename().  On IRIX 6.5, this
function resides in libgen and -lgen is required for the linker.

Update configure.ac too.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey
2009-07-10 12:10:45 -05:00
committed by Junio C Hamano
parent 9398b85994
commit ecc395c112
2 changed files with 11 additions and 0 deletions

View File

@ -485,6 +485,12 @@ AC_CHECK_LIB([resolv], [hstrerror],
AC_SUBST(NEEDS_RESOLV)
test -n "$NEEDS_RESOLV" && LIBS="$LIBS -lresolv"
AC_CHECK_LIB([gen], [basename],
[NEEDS_LIBGEN=],
[NEEDS_LIBGEN=YesPlease])
AC_SUBST(NEEDS_LIBGEN)
test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"
## Checks for header files.
AC_MSG_NOTICE([CHECKS for header files])
#