Makefile: add NEEDS_LIBGEN to optionally add -lgen to compile arguments
[gitweb.git] / Makefile
index 4be508e877cafc0eff363c8d342d7e1c7a9af6c7..6d1a38fde1ff85d48d167e34250222cdebc4b8eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,8 @@ all::
 #
 # Define NO_LIBGEN_H if you don't have libgen.h.
 #
+# Define NEEDS_LIBGEN if your libgen needs -lgen when linking
+#
 # Define NO_SYS_SELECT_H if you don't have sys/select.h.
 #
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
@@ -1019,6 +1021,9 @@ ifdef NEEDS_LIBICONV
        endif
        EXTLIBS += $(ICONV_LINK) -liconv
 endif
+ifdef NEEDS_LIBGEN
+       EXTLIBS += -lgen
+endif
 ifdef NEEDS_SOCKET
        EXTLIBS += -lsocket
 endif