Makefile: -lpthread may still be necessary when libc has only pthread stubs
[gitweb.git] / Makefile
index da0cfda3e8a5b8b04012862e66b84da34af680a6..f6085a52400a2f440cc174cdd8ab980c3c7a644d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -294,6 +294,7 @@ RPMBUILD = rpmbuild
 TCL_PATH = tclsh
 TCLTK_PATH = wish
 PTHREAD_LIBS = -lpthread
+PTHREAD_CFLAGS =
 
 export TCL_PATH TCLTK_PATH
 
@@ -898,6 +899,8 @@ ifeq ($(uname_S),AIX)
        BASIC_CFLAGS += -D_LARGE_FILES
        ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
                NO_PTHREADS = YesPlease
+       else
+               PTHREAD_LIBS = -lpthread
        endif
 endif
 ifeq ($(uname_S),GNU)
@@ -1349,6 +1352,7 @@ endif
 ifdef NO_PTHREADS
        BASIC_CFLAGS += -DNO_PTHREADS
 else
+       BASIC_CFLAGS += $(PTHREAD_CFLAGS)
        EXTLIBS += $(PTHREAD_LIBS)
        LIB_OBJS += thread-utils.o
 endif