mirror of
				https://github.com/rofl0r/proxychains-ng.git
				synced 2025-11-03 16:46:06 +00:00 
			
		
		
		
	configure: check for -pthread vs -lpthread (#379)
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@@ -30,7 +30,7 @@ GENH = src/version.h
 | 
			
		||||
CFLAGS  += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
 | 
			
		||||
NO_AS_NEEDED = -Wl,--no-as-needed
 | 
			
		||||
LIBDL   = -ldl
 | 
			
		||||
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
 | 
			
		||||
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) $(PTHREAD)
 | 
			
		||||
INC     = 
 | 
			
		||||
PIC     = -fPIC
 | 
			
		||||
AR      = $(CROSS_COMPILE)ar
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@@ -208,6 +208,15 @@ fi
 | 
			
		||||
echo "$LD_SONAME_FLAG"
 | 
			
		||||
echo "LD_SET_SONAME = -Wl,$LD_SONAME_FLAG," >> config.mak
 | 
			
		||||
 | 
			
		||||
if check_link "checking whether we can use -lpthread" "-lpthread" \
 | 
			
		||||
"int main(){return 0;}" ; then
 | 
			
		||||
echo "PTHREAD = -lpthread" >> config.mak
 | 
			
		||||
else
 | 
			
		||||
check_link "checking whether we can use -pthread" "-pthread" \
 | 
			
		||||
"int main(){return 0;}" || fail "no pthread support detected"
 | 
			
		||||
echo "PTHREAD = -pthread" >> config.mak
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
make_cmd=make
 | 
			
		||||
if ismac ; then
 | 
			
		||||
	echo LDSO_SUFFIX=dylib>>config.mak
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user