Handle platforms that don't support linking to a symlink
E.g. Darwin doesn't allow this.
This commit is contained in:
		
							parent
							
								
									fd63c8bfcd
								
							
						
					
					
						commit
						e98c029717
					
				
					 2 changed files with 19 additions and 2 deletions
				
			
		
							
								
								
									
										12
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								configure.ac
									
										
									
									
									
								
							|  | @ -120,6 +120,18 @@ AC_CHECK_HEADERS([sys/mount.h], [], [], | |||
| AC_CHECK_FUNCS([lutimes]) | ||||
| 
 | ||||
| 
 | ||||
| # Check whether the store optimiser can optimise symlinks. | ||||
| AC_MSG_CHECKING([whether it is possible to create a link to a symlink]) | ||||
| ln -s bla tmp_link | ||||
| if ln tmp_link tmp_link2 2> /dev/null; then | ||||
|     AC_MSG_RESULT(yes) | ||||
|     AC_DEFINE(CAN_LINK_SYMLINK, 1, [Whether link() works on symlinks.]) | ||||
| else | ||||
|     AC_MSG_RESULT(no) | ||||
| fi | ||||
| rm -f tmp_link tmp_link2 | ||||
| 
 | ||||
| 
 | ||||
| # Check for <locale>. | ||||
| AC_LANG_PUSH(C++) | ||||
| AC_CHECK_HEADERS([locale]) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue