@ -21,15 +21,46 @@ if not get_option('logind').disabled()
 
			
		
	
		
		
			
				
					
						 msg   + =   'You may need to pass "-Dlogind-provider=elogind" or "-Dlogind-provider=systemd" to ensure the correct library is detected.' 	 msg   + =   'You may need to pass "-Dlogind-provider=elogind" or "-Dlogind-provider=systemd" to ensure the correct library is detected.'  
			
		
	
		
		
			
				
					
					endif endif  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					logind   =   dependency ( 'lib'   +   get_option ( 'logind-provider' ) , logind_version   =   '>=237'  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					logind_found   =   false  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					if   get_option ( 'logind-provider' )   ==   'auto'  
			
		
	
		
		
			
				
					
						 if   not   get_option ( 'logind' ) . disabled ( )  
			
		
	
		
		
			
				
					
							 assert ( get_option ( 'auto_features' ) . auto ( ) ,   '-Dlogind-provider must be set to systemd or elogind since auto_features != auto' )  
			
		
	
		
		
			
				
					
							 logind   =   dependency ( 'libsystemd' ,  
			
		
	
		
		
			
				
					
								 required :   get_option ( 'logind' ) ,  
			
		
	
		
		
			
				
					
								 not_found_message :   'libsystemd not found, trying libelogind\n'   +   '\n' . join ( msg ) ,  
			
		
	
		
		
			
				
					
								 version :   logind_version ,  
			
		
	
		
		
			
				
					
							 )  
			
		
	
		
		
			
				
					
							 if   logind . found ( )  
			
		
	
		
		
			
				
					
								 conf_data . set10 ( 'WLR_HAS_SYSTEMD' ,   true )  
			
		
	
		
		
			
				
					
							 else  
			
		
	
		
		
			
				
					
								 logind   =   dependency ( 'libelogind' ,  
			
		
	
		
		
			
				
					
									 required :   get_option ( 'logind' ) ,  
			
		
	
		
		
			
				
					
									 not_found_message :   'libelogind not found\n'   +   '\n' . join ( msg ) ,  
			
		
	
		
		
			
				
					
									 version :   logind_version ,  
			
		
	
		
		
			
				
					
								 )  
			
		
	
		
		
			
				
					
								 if   logind . found ( )  
			
		
	
		
		
			
				
					
									 conf_data . set10 ( 'WLR_HAS_ELOGIND' ,   true )  
			
		
	
		
		
			
				
					
								 endif  
			
		
	
		
		
			
				
					
							 endif  
			
		
	
		
		
			
				
					
							 logind_found   =   logind . found ( )  
			
		
	
		
		
			
				
					
						 endif  
			
		
	
		
		
			
				
					
					else  
			
		
	
		
		
			
				
					
						 logind   =   dependency ( 'lib'   +   get_option ( 'logind-provider' ) ,  
			
		
	
		
		
			
				
					
							 required :   get_option ( 'logind' ) , 		 required :   get_option ( 'logind' ) ,  
			
		
	
		
		
			
				
					
							 not_found_message :   '\n' . join ( msg ) . format ( get_option ( 'logind-provider' ) ) , 		 not_found_message :   '\n' . join ( msg ) . format ( get_option ( 'logind-provider' ) ) ,  
			
		
	
		
		
			
				
					
						 version :   '>=237' , 		 version :   logind_version ,  
			
				
				
			
		
	
		
		
			
				
					
					) 	 )  
			
				
				
			
		
	
		
		
			
				
					
					if   logind . found ( ) 	 if   logind . found ( )  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
							 conf_data . set10 ( 'WLR_HAS_'   +   get_option ( 'logind-provider' ) . to_upper ( ) ,   true )  
			
		
	
		
		
			
				
					
							 logind_found   =   true  
			
		
	
		
		
			
				
					
						 endif  
			
		
	
		
		
			
				
					
					endif  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					if   logind_found  
			
		
	
		
		
			
				
					
						 wlr_files   + =   files ( 'logind.c' ) 	 wlr_files   + =   files ( 'logind.c' )  
			
		
	
		
		
			
				
					
						 wlr_deps   + =   logind 	 wlr_deps   + =   logind  
			
		
	
		
		
			
				
					
						 conf_data . set10 ( 'WLR_HAS_'   +   get_option ( 'logind-provider' ) . to_upper ( ) ,   true )  
			
		
	
		
		
			
				
					
					endif endif  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					# libcap # libcap