You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12400 lines
411 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. dnl
  2. dnl This file contains local autoconf functions.
  3. dnl
  4. dnl -------------------------------------------------------------------------
  5. dnl Output stylize macros for configure (help/runtime)
  6. dnl -------------------------------------------------------------------------
  7. dnl
  8. dnl PHP_HELP_SEPARATOR(title)
  9. dnl
  10. dnl Adds separator title into the configure --help display.
  11. dnl
  12. AC_DEFUN([PHP_HELP_SEPARATOR],[
  13. AC_ARG_ENABLE([],[
  14. $1
  15. ],[])
  16. ])
  17. dnl
  18. dnl PHP_CONFIGURE_PART(title)
  19. dnl
  20. dnl Adds separator title configure output (idea borrowed from mm)
  21. dnl
  22. AC_DEFUN([PHP_CONFIGURE_PART],[
  23. AC_MSG_RESULT()
  24. AC_MSG_RESULT([${T_MD}$1${T_ME}])
  25. ])
  26. dnl -------------------------------------------------------------------------
  27. dnl Build system helper macros
  28. dnl -------------------------------------------------------------------------
  29. dnl
  30. dnl PHP_DEF_HAVE(what)
  31. dnl
  32. dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
  33. dnl
  34. AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
  35. dnl
  36. dnl PHP_RUN_ONCE(namespace, variable, code)
  37. dnl
  38. dnl execute code, if variable is not set in namespace
  39. dnl
  40. AC_DEFUN([PHP_RUN_ONCE],[
  41. changequote({,})
  42. unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
  43. changequote([,])
  44. cmd="echo $ac_n \"\$$1$unique$ac_c\""
  45. if test -n "$unique" && test "`eval $cmd`" = "" ; then
  46. eval "$1$unique=set"
  47. $3
  48. fi
  49. ])
  50. dnl
  51. dnl PHP_EXPAND_PATH(path, variable)
  52. dnl
  53. dnl expands path to an absolute path and assigns it to variable
  54. dnl
  55. AC_DEFUN([PHP_EXPAND_PATH],[
  56. if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
  57. $2=$1
  58. else
  59. changequote({,})
  60. ep_dir=`echo $1|$SED 's%/*[^/][^/]*/*$%%'`
  61. changequote([,])
  62. ep_realdir=`(cd "$ep_dir" && pwd)`
  63. $2="$ep_realdir"/`basename "$1"`
  64. fi
  65. ])
  66. dnl
  67. dnl PHP_DEFINE(WHAT [, value[, directory]])
  68. dnl
  69. dnl Creates builddir/include/what.h and in there #define WHAT value
  70. dnl
  71. AC_DEFUN([PHP_DEFINE],[
  72. [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
  73. ])
  74. dnl
  75. dnl PHP_SUBST(varname)
  76. dnl
  77. dnl Adds variable with it's value into Makefile, e.g.:
  78. dnl CC = gcc
  79. dnl
  80. AC_DEFUN([PHP_SUBST],[
  81. PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
  82. ])
  83. dnl
  84. dnl PHP_SUBST_OLD(varname)
  85. dnl
  86. dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
  87. dnl instances in every file passed to AC_OUTPUT
  88. dnl
  89. AC_DEFUN([PHP_SUBST_OLD],[
  90. PHP_SUBST($1)
  91. AC_SUBST($1)
  92. ])
  93. dnl
  94. dnl PHP_OUTPUT(file)
  95. dnl
  96. dnl Adds "file" to the list of files generated by AC_OUTPUT
  97. dnl This macro can be used several times.
  98. dnl
  99. AC_DEFUN([PHP_OUTPUT],[
  100. PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
  101. ])
  102. dnl -------------------------------------------------------------------------
  103. dnl Build system base macros
  104. dnl -------------------------------------------------------------------------
  105. dnl
  106. dnl PHP_CANONICAL_HOST_TARGET
  107. dnl
  108. AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
  109. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  110. AC_REQUIRE([AC_CANONICAL_TARGET])dnl
  111. dnl Make sure we do not continue if host_alias is empty.
  112. if test -z "$host_alias" && test -n "$host"; then
  113. host_alias=$host
  114. fi
  115. if test -z "$host_alias"; then
  116. AC_MSG_ERROR([host_alias is not set!])
  117. fi
  118. ])
  119. dnl
  120. dnl PHP_INIT_BUILD_SYSTEM
  121. dnl
  122. AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
  123. AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
  124. test -d include || $php_shtool mkdir include
  125. > Makefile.objects
  126. > Makefile.fragments
  127. dnl We need to play tricks here to avoid matching the grep line itself
  128. pattern=define
  129. $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
  130. ])
  131. dnl
  132. dnl PHP_GEN_GLOBAL_MAKEFILE
  133. dnl
  134. dnl Generates the global makefile.
  135. dnl
  136. AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
  137. cat >Makefile <<EOF
  138. srcdir = $abs_srcdir
  139. builddir = $abs_builddir
  140. top_srcdir = $abs_srcdir
  141. top_builddir = $abs_builddir
  142. EOF
  143. for i in $PHP_VAR_SUBST; do
  144. eval echo "$i = \$$i" >> Makefile
  145. done
  146. cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
  147. ])
  148. dnl
  149. dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
  150. dnl
  151. dnl Processes a file called Makefile.frag in the source directory
  152. dnl of the most recently added extension. $(srcdir) and $(builddir)
  153. dnl are substituted with the proper paths. Can be used to supply
  154. dnl custom rules and/or additional targets.
  155. dnl
  156. AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
  157. ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
  158. ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
  159. ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
  160. test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
  161. ])
  162. dnl
  163. dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
  164. dnl
  165. dnl Adds sources which are located relative to source-path to the
  166. dnl array of type type. Sources are processed with optional
  167. dnl special-flags which are passed to the compiler. Sources
  168. dnl can be either written in C or C++ (filenames shall end in .c
  169. dnl or .cpp, respectively).
  170. dnl
  171. dnl Note: If source-path begins with a "/", the "/" is removed and
  172. dnl the path is interpreted relative to the top build-directory.
  173. dnl
  174. dnl which array to append to?
  175. AC_DEFUN([PHP_ADD_SOURCES],[
  176. PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))
  177. ])
  178. dnl
  179. dnl _PHP_ASSIGN_BUILD_VARS(type)
  180. dnl internal, don't use
  181. AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
  182. ifelse($1,shared,[
  183. b_c_pre=$shared_c_pre
  184. b_cxx_pre=$shared_cxx_pre
  185. b_c_meta=$shared_c_meta
  186. b_cxx_meta=$shared_cxx_meta
  187. b_c_post=$shared_c_post
  188. b_cxx_post=$shared_cxx_post
  189. ],[
  190. b_c_pre=$php_c_pre
  191. b_cxx_pre=$php_cxx_pre
  192. b_c_meta=$php_c_meta
  193. b_cxx_meta=$php_cxx_meta
  194. b_c_post=$php_c_post
  195. b_cxx_post=$php_cxx_post
  196. ])dnl
  197. b_lo=[$]$1_lo
  198. ])
  199. dnl
  200. dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
  201. dnl
  202. dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
  203. dnl name of the array target-var directly, as well as whether
  204. dnl shared objects will be built from the sources.
  205. dnl
  206. dnl Should not be used directly.
  207. dnl
  208. AC_DEFUN([PHP_ADD_SOURCES_X],[
  209. dnl relative to source- or build-directory?
  210. dnl ac_srcdir/ac_bdir include trailing slash
  211. case $1 in
  212. ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
  213. /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
  214. *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
  215. esac
  216. dnl how to build .. shared or static?
  217. ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
  218. dnl iterate over the sources
  219. old_IFS=[$]IFS
  220. for ac_src in $2; do
  221. dnl remove the suffix
  222. IFS=.
  223. set $ac_src
  224. ac_obj=[$]1
  225. IFS=$old_IFS
  226. dnl append to the array which has been dynamically chosen at m4 time
  227. $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
  228. dnl choose the right compiler/flags/etc. for the source-file
  229. case $ac_src in
  230. *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  231. *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  232. *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
  233. *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
  234. esac
  235. dnl create a rule for the object/source combo
  236. cat >>Makefile.objects<<EOF
  237. $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
  238. $ac_comp
  239. EOF
  240. done
  241. ])
  242. dnl -------------------------------------------------------------------------
  243. dnl Compiler characteristics checks
  244. dnl -------------------------------------------------------------------------
  245. dnl
  246. dnl PHP_TARGET_RDYNAMIC
  247. dnl
  248. dnl Checks whether -rdynamic is supported by the compiler. This
  249. dnl is necessary for some targets to populate the global symbol
  250. dnl table. Otherwise, dynamic modules would not be able to resolve
  251. dnl PHP-related symbols.
  252. dnl
  253. dnl If successful, adds -rdynamic to PHP_LDFLAGS.
  254. dnl
  255. AC_DEFUN([PHP_TARGET_RDYNAMIC],[
  256. if test -n "$GCC"; then
  257. PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
  258. if test "$gcc_rdynamic" = "yes"; then
  259. PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
  260. fi
  261. fi
  262. ])
  263. dnl
  264. dnl PHP_RUNPATH_SWITCH
  265. dnl
  266. dnl Checks for -R, etc. switch
  267. dnl
  268. AC_DEFUN([PHP_RUNPATH_SWITCH],[
  269. AC_MSG_CHECKING([if compiler supports -R])
  270. AC_CACHE_VAL(php_cv_cc_dashr,[
  271. SAVE_LIBS=$LIBS
  272. LIBS="-R /usr/$PHP_LIBDIR $LIBS"
  273. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])
  274. LIBS=$SAVE_LIBS])
  275. AC_MSG_RESULT([$php_cv_cc_dashr])
  276. if test $php_cv_cc_dashr = "yes"; then
  277. ld_runpath_switch=-R
  278. else
  279. AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
  280. AC_CACHE_VAL(php_cv_cc_rpath,[
  281. SAVE_LIBS=$LIBS
  282. LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
  283. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])
  284. LIBS=$SAVE_LIBS])
  285. AC_MSG_RESULT([$php_cv_cc_rpath])
  286. if test $php_cv_cc_rpath = "yes"; then
  287. ld_runpath_switch=-Wl,-rpath,
  288. else
  289. dnl something innocuous
  290. ld_runpath_switch=-L
  291. fi
  292. fi
  293. if test "$PHP_RPATH" = "no"; then
  294. ld_runpath_switch=
  295. fi
  296. ])
  297. dnl
  298. dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
  299. dnl
  300. AC_DEFUN([PHP_CHECK_GCC_ARG],[
  301. gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
  302. AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
  303. echo 'void somefunc() { };' > conftest.c
  304. cmd='$CC $1 -c conftest.c'
  305. if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
  306. ac_result=no
  307. else
  308. ac_result=yes
  309. fi
  310. eval $gcc_arg_name=$ac_result
  311. rm -f conftest.*
  312. ])
  313. if eval test "\$$gcc_arg_name" = "yes"; then
  314. $2
  315. else
  316. :
  317. $3
  318. fi
  319. ])
  320. dnl
  321. dnl PHP_LIBGCC_LIBPATH(gcc)
  322. dnl
  323. dnl Stores the location of libgcc in libgcc_libpath
  324. dnl
  325. AC_DEFUN([PHP_LIBGCC_LIBPATH],[
  326. changequote({,})
  327. libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
  328. changequote([,])
  329. ])
  330. dnl -------------------------------------------------------------------------
  331. dnl Macros to modify LIBS, INCLUDES, etc. variables
  332. dnl -------------------------------------------------------------------------
  333. dnl
  334. dnl PHP_REMOVE_USR_LIB(NAME)
  335. dnl
  336. dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
  337. dnl
  338. AC_DEFUN([PHP_REMOVE_USR_LIB],[
  339. unset ac_new_flags
  340. for i in [$]$1; do
  341. case [$]i in
  342. -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
  343. *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
  344. esac
  345. done
  346. $1=[$]ac_new_flags
  347. ])
  348. dnl
  349. dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
  350. dnl
  351. dnl Use this macro, if you need to add libraries and or library search
  352. dnl paths to the PHP build system which are only given in compiler
  353. dnl notation.
  354. dnl
  355. AC_DEFUN([PHP_EVAL_LIBLINE],[
  356. for ac_i in $1; do
  357. case $ac_i in
  358. -pthread[)]
  359. if test "$ext_shared" = "yes"; then
  360. $2="[$]$2 -pthread"
  361. else
  362. PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
  363. PHP_RUN_ONCE(EXTRA_LDFLAGS_PROGRAM, [$ac_i],
  364. [EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"])
  365. fi
  366. ;;
  367. -l*[)]
  368. ac_ii=`echo $ac_i|cut -c 3-`
  369. PHP_ADD_LIBRARY($ac_ii,1,$2)
  370. ;;
  371. -L*[)]
  372. ac_ii=`echo $ac_i|cut -c 3-`
  373. PHP_ADD_LIBPATH($ac_ii,$2)
  374. ;;
  375. esac
  376. done
  377. ])
  378. dnl
  379. dnl PHP_EVAL_INCLINE(headerline)
  380. dnl
  381. dnl Use this macro, if you need to add header search paths to the PHP
  382. dnl build system which are only given in compiler notation.
  383. dnl
  384. AC_DEFUN([PHP_EVAL_INCLINE],[
  385. for ac_i in $1; do
  386. case $ac_i in
  387. -I*[)]
  388. ac_ii=`echo $ac_i|cut -c 3-`
  389. PHP_ADD_INCLUDE($ac_ii)
  390. ;;
  391. esac
  392. done
  393. ])
  394. dnl internal, don't use
  395. AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
  396. PHP_RUN_ONCE(LIBPATH, $1, [
  397. test "x$PHP_RPATH" != "xno" &&
  398. test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
  399. LDFLAGS="$LDFLAGS -L$1"
  400. PHP_RPATHS="$PHP_RPATHS $1"
  401. ])
  402. ])dnl
  403. dnl
  404. dnl
  405. dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
  406. dnl
  407. dnl Adds a path to linkpath/runpath (LDFLAGS)
  408. dnl
  409. AC_DEFUN([PHP_ADD_LIBPATH],[
  410. if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
  411. PHP_EXPAND_PATH($1, ai_p)
  412. ifelse([$2],,[
  413. _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
  414. ],[
  415. if test "$ext_shared" = "yes"; then
  416. $2="-L$ai_p [$]$2"
  417. test "x$PHP_RPATH" != "xno" && \
  418. test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
  419. else
  420. _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
  421. fi
  422. ])
  423. fi
  424. ])
  425. dnl
  426. dnl PHP_UTILIZE_RPATHS()
  427. dnl
  428. dnl builds RPATHS/LDFLAGS from PHP_RPATHS
  429. dnl
  430. AC_DEFUN([PHP_UTILIZE_RPATHS],[
  431. OLD_RPATHS=$PHP_RPATHS
  432. unset PHP_RPATHS
  433. for i in $OLD_RPATHS; do
  434. dnl Can be passed to native cc/libtool
  435. PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
  436. dnl Libtool-specific
  437. PHP_RPATHS="$PHP_RPATHS -R $i"
  438. dnl cc-specific
  439. NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
  440. done
  441. if test "$PHP_RPATH" = "no"; then
  442. unset PHP_RPATHS
  443. unset NATIVE_RPATHS
  444. fi
  445. ])
  446. dnl
  447. dnl PHP_ADD_INCLUDE(path [,before])
  448. dnl
  449. dnl add an include path.
  450. dnl if before is 1, add in the beginning of INCLUDES.
  451. dnl
  452. AC_DEFUN([PHP_ADD_INCLUDE],[
  453. if test "$1" != "/usr/include"; then
  454. PHP_EXPAND_PATH($1, ai_p)
  455. PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
  456. if test "$2"; then
  457. INCLUDES="-I$ai_p $INCLUDES"
  458. else
  459. INCLUDES="$INCLUDES -I$ai_p"
  460. fi
  461. ])
  462. fi
  463. ])
  464. dnl internal, don't use
  465. AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
  466. ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
  467. ])dnl
  468. dnl
  469. dnl internal, don't use
  470. AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
  471. case $1 in
  472. c|c_r|pthread*[)] ;;
  473. *[)] ifelse($3,,[
  474. _PHP_X_ADD_LIBRARY($1,$2,$5)
  475. ],[
  476. if test "$ext_shared" = "yes"; then
  477. _PHP_X_ADD_LIBRARY($1,$2,$3)
  478. else
  479. $4($1,$2)
  480. fi
  481. ]) ;;
  482. esac
  483. ])dnl
  484. dnl
  485. dnl
  486. dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
  487. dnl
  488. dnl add a library to the link line
  489. dnl
  490. AC_DEFUN([PHP_ADD_LIBRARY],[
  491. _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
  492. ])
  493. dnl
  494. dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
  495. dnl
  496. dnl add a library to the link line (deferred, not used during configure)
  497. dnl
  498. AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
  499. _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
  500. ])
  501. dnl
  502. dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
  503. dnl
  504. dnl add a library to the link line and path to linkpath/runpath.
  505. dnl if shared-libadd is not empty and $ext_shared is yes,
  506. dnl shared-libadd will be assigned the library information
  507. dnl
  508. AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
  509. ifelse($3,,[
  510. if test -n "$2"; then
  511. PHP_ADD_LIBPATH($2)
  512. fi
  513. PHP_ADD_LIBRARY($1)
  514. ],[
  515. if test "$ext_shared" = "yes"; then
  516. $3="-l$1 [$]$3"
  517. if test -n "$2"; then
  518. PHP_ADD_LIBPATH($2,$3)
  519. fi
  520. else
  521. PHP_ADD_LIBRARY_WITH_PATH($1,$2)
  522. fi
  523. ])
  524. ])
  525. dnl
  526. dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
  527. dnl
  528. dnl add a library to the link line (deferred)
  529. dnl and path to linkpath/runpath (not deferred)
  530. dnl if shared-libadd is not empty and $ext_shared is yes,
  531. dnl shared-libadd will be assigned the library information
  532. dnl
  533. AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
  534. ifelse($3,,[
  535. if test -n "$2"; then
  536. PHP_ADD_LIBPATH($2)
  537. fi
  538. PHP_ADD_LIBRARY_DEFER($1)
  539. ],[
  540. if test "$ext_shared" = "yes"; then
  541. $3="-l$1 [$]$3"
  542. if test -n "$2"; then
  543. PHP_ADD_LIBPATH($2,$3)
  544. fi
  545. else
  546. PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
  547. fi
  548. ])
  549. ])
  550. dnl
  551. dnl PHP_ADD_FRAMEWORK(framework [,before])
  552. dnl
  553. dnl add a (Darwin / Mac OS X) framework to the link
  554. dnl line. if before is 1, the framework is added
  555. dnl to the beginning of the line.
  556. dnl
  557. AC_DEFUN([PHP_ADD_FRAMEWORK], [
  558. PHP_RUN_ONCE(FRAMEWORKS, $1, [
  559. if test "$2"; then
  560. PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
  561. else
  562. PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
  563. fi
  564. ])
  565. ])
  566. dnl
  567. dnl PHP_ADD_FRAMEWORKPATH(path [,before])
  568. dnl
  569. dnl add a (Darwin / Mac OS X) framework path to the link
  570. dnl and include lines. default paths include (but are
  571. dnl not limited to) /Local/Library/Frameworks and
  572. dnl /System/Library/Frameworks, so these don't need
  573. dnl to be specifically added. if before is 1, the
  574. dnl framework path is added to the beginning of the
  575. dnl relevant lines.
  576. dnl
  577. AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
  578. PHP_EXPAND_PATH($1, ai_p)
  579. PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
  580. if test "$2"; then
  581. PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
  582. else
  583. PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
  584. fi
  585. ])
  586. ])
  587. dnl
  588. dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
  589. dnl
  590. dnl Adds a (Darwin / Mac OS X) framework path and the
  591. dnl framework itself to the link and include lines.
  592. dnl
  593. AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
  594. PHP_ADD_FRAMEWORKPATH($2)
  595. PHP_ADD_FRAMEWORK($1)
  596. ])
  597. dnl
  598. dnl PHP_SET_LIBTOOL_VARIABLE(var)
  599. dnl
  600. dnl Set libtool variable
  601. dnl
  602. AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
  603. if test -z "$LIBTOOL"; then
  604. LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
  605. else
  606. LIBTOOL="$LIBTOOL $1"
  607. fi
  608. ])
  609. dnl -------------------------------------------------------------------------
  610. dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
  611. dnl -------------------------------------------------------------------------
  612. dnl PHP_ARG_ANALYZE_EX
  613. dnl internal
  614. AC_DEFUN([PHP_ARG_ANALYZE_EX],[
  615. ext_output="yes, shared"
  616. ext_shared=yes
  617. case [$]$1 in
  618. shared,*[)]
  619. $1=`echo "[$]$1"|$SED 's/^shared,//'`
  620. ;;
  621. shared[)]
  622. $1=yes
  623. ;;
  624. no[)]
  625. ext_output=no
  626. ext_shared=no
  627. ;;
  628. *[)]
  629. ext_output=yes
  630. ext_shared=no
  631. ;;
  632. esac
  633. PHP_ALWAYS_SHARED([$1])
  634. ])
  635. dnl PHP_ARG_ANALYZE
  636. dnl internal
  637. AC_DEFUN([PHP_ARG_ANALYZE],[
  638. ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
  639. ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
  640. ])
  641. dnl
  642. dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
  643. dnl Sets PHP_ARG_NAME either to the user value or to the default value.
  644. dnl default-val defaults to no. This will also set the variable ext_shared,
  645. dnl and will overwrite any previous variable of that name.
  646. dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
  647. dnl the PHP_ARG_ANALYZE_EX.
  648. dnl
  649. AC_DEFUN([PHP_ARG_WITH],[
  650. php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
  651. PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
  652. ])
  653. dnl PHP_REAL_ARG_WITH
  654. dnl internal
  655. AC_DEFUN([PHP_REAL_ARG_WITH],[
  656. ifelse([$2],,,[AC_MSG_CHECKING([$2])])
  657. AC_ARG_WITH($1,[$3],$5=[$]withval,
  658. [
  659. $5=ifelse($4,,no,$4)
  660. ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
  661. ])
  662. PHP_ARG_ANALYZE($5,[$2],$6)
  663. ])
  664. dnl
  665. dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
  666. dnl Sets PHP_ARG_NAME either to the user value or to the default value.
  667. dnl default-val defaults to no. This will also set the variable ext_shared,
  668. dnl and will overwrite any previous variable of that name.
  669. dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
  670. dnl the PHP_ARG_ANALYZE_EX.
  671. dnl
  672. AC_DEFUN([PHP_ARG_ENABLE],[
  673. php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
  674. PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
  675. ])
  676. dnl PHP_REAL_ARG_ENABLE
  677. dnl internal
  678. AC_DEFUN([PHP_REAL_ARG_ENABLE],[
  679. ifelse([$2],,,[AC_MSG_CHECKING([$2])])
  680. AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
  681. [
  682. $5=ifelse($4,,no,$4)
  683. ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
  684. ])
  685. PHP_ARG_ANALYZE($5,[$2],$6)
  686. ])
  687. dnl -------------------------------------------------------------------------
  688. dnl Build macros
  689. dnl -------------------------------------------------------------------------
  690. dnl
  691. dnl PHP_BUILD_THREAD_SAFE
  692. dnl
  693. AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
  694. enable_maintainer_zts=yes
  695. if test "$pthreads_working" != "yes"; then
  696. AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
  697. fi
  698. ])
  699. dnl
  700. dnl PHP_REQUIRE_CXX
  701. dnl
  702. AC_DEFUN([PHP_REQUIRE_CXX],[
  703. if test -z "$php_cxx_done"; then
  704. AC_PROG_CXX
  705. AC_PROG_CXXCPP
  706. PHP_ADD_LIBRARY(stdc++)
  707. php_cxx_done=yes
  708. fi
  709. ])
  710. dnl
  711. dnl PHP_BUILD_SHARED
  712. dnl
  713. AC_DEFUN([PHP_BUILD_SHARED],[
  714. PHP_BUILD_PROGRAM
  715. OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
  716. php_sapi_module=shared
  717. php_c_pre=$shared_c_pre
  718. php_c_meta=$shared_c_meta
  719. php_c_post=$shared_c_post
  720. php_cxx_pre=$shared_cxx_pre
  721. php_cxx_meta=$shared_cxx_meta
  722. php_cxx_post=$shared_cxx_post
  723. php_lo=$shared_lo
  724. ])
  725. dnl
  726. dnl PHP_BUILD_STATIC
  727. dnl
  728. AC_DEFUN([PHP_BUILD_STATIC],[
  729. PHP_BUILD_PROGRAM
  730. OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
  731. php_sapi_module=static
  732. ])
  733. dnl
  734. dnl PHP_BUILD_BUNDLE
  735. dnl
  736. AC_DEFUN([PHP_BUILD_BUNDLE],[
  737. PHP_BUILD_PROGRAM
  738. OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
  739. php_sapi_module=static
  740. ])
  741. dnl
  742. dnl PHP_BUILD_PROGRAM
  743. dnl
  744. AC_DEFUN([PHP_BUILD_PROGRAM],[
  745. php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
  746. php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
  747. php_c_post=
  748. php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
  749. php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
  750. php_cxx_post=
  751. php_lo=lo
  752. case $with_pic in
  753. yes) pic_setting='-prefer-pic';;
  754. no) pic_setting='-prefer-non-pic';;
  755. esac
  756. shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
  757. shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
  758. shared_c_post=
  759. shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
  760. shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
  761. shared_cxx_post=
  762. shared_lo=lo
  763. ])
  764. dnl
  765. dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
  766. dnl
  767. dnl Basically sets up the link-stage for building module-name
  768. dnl from object_var in build-dir.
  769. dnl
  770. AC_DEFUN([PHP_SHARED_MODULE],[
  771. install_modules="install-modules"
  772. suffix=la
  773. case $host_alias in
  774. *aix*[)]
  775. additional_flags="-Wl,-G"
  776. ;;
  777. esac
  778. if test "x$5" = "xyes"; then
  779. PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
  780. else
  781. PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
  782. fi
  783. PHP_SUBST($2)
  784. cat >>Makefile.objects<<EOF
  785. \$(phplibdir)/$1.$suffix: $3/$1.$suffix
  786. \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
  787. $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
  788. \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
  789. EOF
  790. ])
  791. dnl
  792. dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
  793. dnl
  794. dnl Selects the SAPI name and type (static, shared, bundle, program)
  795. dnl and optionally also the source-files for the SAPI-specific
  796. dnl objects.
  797. dnl
  798. AC_DEFUN([PHP_SELECT_SAPI],[
  799. if test "$2" = "program"; then
  800. PHP_BINARIES="$PHP_BINARIES $1"
  801. elif test "$PHP_SAPI" != "none"; then
  802. AC_MSG_ERROR([
  803. +--------------------------------------------------------------------+
  804. | *** ATTENTION *** |
  805. | |
  806. | You've configured multiple SAPIs to be build. You can build only |
  807. | one SAPI module plus CGI, CLI and FPM binaries at the same time. |
  808. +--------------------------------------------------------------------+
  809. ])
  810. else
  811. PHP_SAPI=$1
  812. fi
  813. PHP_ADD_BUILD_DIR([sapi/$1])
  814. PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS $1"
  815. ifelse($2,program,[
  816. PHP_BUILD_PROGRAM
  817. install_binaries="install-binaries"
  818. install_binary_targets="$install_binary_targets install-$1"
  819. PHP_SUBST(PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)
  820. ifelse($3,,,[PHP_ADD_SOURCES_X([sapi/$1],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)])
  821. ],[
  822. case "$2" in
  823. static[)] PHP_BUILD_STATIC;;
  824. shared[)] PHP_BUILD_SHARED;;
  825. bundle[)] PHP_BUILD_BUNDLE;;
  826. esac
  827. install_sapi="install-sapi"
  828. ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
  829. ])
  830. ])
  831. dnl deprecated
  832. AC_DEFUN([PHP_EXTENSION],[
  833. sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
  834. PHP_NEW_EXTENSION($1, $sources, $2, $3)
  835. if test -r "$ext_srcdir/Makefile.frag"; then
  836. PHP_ADD_MAKEFILE_FRAGMENT
  837. fi
  838. ])
  839. AC_DEFUN([PHP_ADD_BUILD_DIR],[
  840. ifelse($2,,[
  841. BUILD_DIR="$BUILD_DIR $1"
  842. ], [
  843. $php_shtool mkdir -p $1
  844. ])
  845. ])
  846. AC_DEFUN([PHP_GEN_BUILD_DIRS],[
  847. $php_shtool mkdir -p $BUILD_DIR
  848. ])
  849. dnl
  850. dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
  851. dnl
  852. dnl Includes an extension in the build.
  853. dnl
  854. dnl "extname" is the name of the extension.
  855. dnl "sources" is a list of files relative to the subdir which are used
  856. dnl to build the extension.
  857. dnl "shared" can be set to "shared" or "yes" to build the extension as
  858. dnl a dynamically loadable library. Optional parameter "sapi_class" can
  859. dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
  860. dnl "extra-cflags" are passed to the compiler, with
  861. dnl @ext_srcdir@ and @ext_builddir@ being substituted.
  862. dnl "cxx" can be used to indicate that a C++ shared module is desired.
  863. dnl "zend_ext" indicates a zend extension.
  864. AC_DEFUN([PHP_NEW_EXTENSION],[
  865. ext_builddir=[]PHP_EXT_BUILDDIR($1)
  866. ext_srcdir=[]PHP_EXT_SRCDIR($1)
  867. ext_dir=[]PHP_EXT_DIR($1)
  868. ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
  869. if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
  870. dnl ---------------------------------------------- Static module
  871. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
  872. PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
  873. EXT_STATIC="$EXT_STATIC $1;$ext_dir"
  874. if test "$3" != "nocli"; then
  875. EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
  876. fi
  877. else
  878. if test "$3" = "shared" || test "$3" = "yes"; then
  879. dnl ---------------------------------------------- Shared module
  880. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
  881. PHP_ADD_SOURCES_X($ext_dir,$2,$ac_extra,shared_objects_$1,yes)
  882. PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
  883. AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
  884. fi
  885. fi
  886. if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
  887. dnl ---------------------------------------------- CLI static module
  888. [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
  889. case "$PHP_SAPI" in
  890. cgi|embed|phpdbg[)]
  891. PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
  892. EXT_STATIC="$EXT_STATIC $1;$ext_dir"
  893. ;;
  894. *[)]
  895. PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,cli)
  896. ;;
  897. esac
  898. EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
  899. fi
  900. PHP_ADD_BUILD_DIR($ext_builddir)
  901. dnl Set for phpize builds only
  902. dnl ---------------------------
  903. if test "$ext_builddir" = "."; then
  904. PHP_PECL_EXTENSION=$1
  905. PHP_SUBST(PHP_PECL_EXTENSION)
  906. fi
  907. ])
  908. dnl
  909. dnl PHP_WITH_SHARED
  910. dnl
  911. dnl Checks whether $withval is "shared" or starts with "shared,XXX"
  912. dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
  913. dnl from $withval.
  914. dnl
  915. AC_DEFUN([PHP_WITH_SHARED],[
  916. PHP_ARG_ANALYZE_EX(withval)
  917. shared=$ext_shared
  918. unset ext_shared ext_output
  919. ])
  920. dnl
  921. dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
  922. dnl
  923. dnl This macro is scanned by genif.sh when it builds the internal functions
  924. dnl list, so that modules can be init'd in the correct order
  925. dnl $1 = name of extension, $2 = extension upon which it depends
  926. dnl $3 = optional: if true, it's ok for $2 to have not been configured
  927. dnl default is false and should halt the build.
  928. dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
  929. dnl The extension on which it depends must also have been configured.
  930. dnl See ADD_EXTENSION_DEP in win32 build
  931. dnl
  932. AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
  933. am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
  934. is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
  935. is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
  936. if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
  937. AC_MSG_ERROR([
  938. You've configured extension $1 to build statically, but it
  939. depends on extension $2, which you've configured to build shared.
  940. You either need to build $1 shared or build $2 statically for the
  941. build to be successful.
  942. ])
  943. fi
  944. if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
  945. AC_MSG_ERROR([
  946. You've configured extension $1, which depends on extension $2,
  947. but you've either not enabled $2, or have disabled it.
  948. ])
  949. fi
  950. dnl Some systems require that we link $2 to $1 when building
  951. ])
  952. dnl -------------------------------------------------------------------------
  953. dnl Checks for structures, typedefs, broken functions, etc.
  954. dnl -------------------------------------------------------------------------
  955. dnl Internal helper macros
  956. dnl
  957. dnl _PHP_DEF_HAVE_FILE(what, filename)
  958. AC_DEFUN([_PHP_DEF_HAVE_FILE], [
  959. php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
  960. echo "#define $php_def_have_what 1" >> $2
  961. ])
  962. dnl
  963. dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
  964. dnl
  965. AC_DEFUN([_PHP_CHECK_SIZEOF], [
  966. php_cache_value=php_cv_sizeof_[]$1
  967. AC_CACHE_VAL(php_cv_sizeof_[]$1, [
  968. old_LIBS=$LIBS
  969. LIBS=
  970. old_LDFLAGS=$LDFLAGS
  971. LDFLAGS=
  972. AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
  973. #if STDC_HEADERS
  974. #include <stdlib.h>
  975. #include <stddef.h>
  976. #endif
  977. #ifdef HAVE_INTTYPES_H
  978. #include <inttypes.h>
  979. #endif
  980. #ifdef HAVE_UNISTD_H
  981. #include <unistd.h>
  982. #endif
  983. $3
  984. int main()
  985. {
  986. FILE *fp = fopen("conftestval", "w");
  987. if (!fp) return(1);
  988. fprintf(fp, "%d\n", sizeof($1));
  989. return(0);
  990. }
  991. ]])], [
  992. eval $php_cache_value=`cat conftestval`
  993. ], [
  994. eval $php_cache_value=0
  995. ], [
  996. ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
  997. ])
  998. LDFLAGS=$old_LDFLAGS
  999. LIBS=$old_LIBS
  1000. ])
  1001. if eval test "\$$php_cache_value" != "0"; then
  1002. ifelse([$4],[],:,[$4])
  1003. ifelse([$5],[],,[else $5])
  1004. fi
  1005. ])
  1006. dnl
  1007. dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
  1008. dnl
  1009. AC_DEFUN([PHP_CHECK_SIZEOF], [
  1010. AC_MSG_CHECKING([size of $1])
  1011. _PHP_CHECK_SIZEOF($1, $2, $3, [
  1012. AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
  1013. AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
  1014. ])
  1015. AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
  1016. ])
  1017. dnl
  1018. dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
  1019. dnl
  1020. AC_DEFUN([PHP_CHECK_TYPES], [
  1021. for php_typename in $1; do
  1022. AC_MSG_CHECKING([whether $php_typename exists])
  1023. _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
  1024. _PHP_DEF_HAVE_FILE($php_typename, $2)
  1025. AC_MSG_RESULT([yes])
  1026. ], [
  1027. AC_MSG_RESULT([no])
  1028. ])
  1029. done
  1030. ])
  1031. dnl
  1032. dnl PHP_CHECK_IN_ADDR_T
  1033. dnl
  1034. AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
  1035. dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
  1036. AC_MSG_CHECKING([for in_addr_t])
  1037. AC_CACHE_VAL(ac_cv_type_in_addr_t,
  1038. [AC_EGREP_CPP(dnl
  1039. changequote(<<,>>)dnl
  1040. <<in_addr_t[^a-zA-Z_0-9]>>dnl
  1041. changequote([,]), [#include <sys/types.h>
  1042. #if STDC_HEADERS
  1043. #include <stdlib.h>
  1044. #include <stddef.h>
  1045. #endif
  1046. #ifdef HAVE_NETINET_IN_H
  1047. #include <netinet/in.h>
  1048. #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
  1049. AC_MSG_RESULT([$ac_cv_type_in_addr_t])
  1050. if test $ac_cv_type_in_addr_t = no; then
  1051. AC_DEFINE(in_addr_t, u_int, [ ])
  1052. fi
  1053. ])
  1054. dnl
  1055. dnl PHP_TIME_R_TYPE
  1056. dnl
  1057. dnl Check type of reentrant time-related functions
  1058. dnl Type can be: irix, hpux or POSIX
  1059. dnl
  1060. AC_DEFUN([PHP_TIME_R_TYPE],[
  1061. AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
  1062. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1063. #include <time.h>
  1064. main() {
  1065. char buf[27];
  1066. struct tm t;
  1067. time_t old = 0;
  1068. int r, s;
  1069. s = gmtime_r(&old, &t);
  1070. r = (int) asctime_r(&t, buf, 26);
  1071. if (r == s && s == 0) return (0);
  1072. return (1);
  1073. }
  1074. ]])],[
  1075. ac_cv_time_r_type=hpux
  1076. ],[
  1077. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1078. #include <time.h>
  1079. main() {
  1080. struct tm t, *s;
  1081. time_t old = 0;
  1082. char buf[27], *p;
  1083. s = gmtime_r(&old, &t);
  1084. p = asctime_r(&t, buf, 26);
  1085. if (p == buf && s == &t) return (0);
  1086. return (1);
  1087. }
  1088. ]])],[
  1089. ac_cv_time_r_type=irix
  1090. ],[
  1091. ac_cv_time_r_type=POSIX
  1092. ],[
  1093. ac_cv_time_r_type=POSIX
  1094. ])
  1095. ],[
  1096. ac_cv_time_r_type=POSIX
  1097. ])
  1098. ])
  1099. case $ac_cv_time_r_type in
  1100. hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
  1101. irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
  1102. esac
  1103. ])
  1104. dnl
  1105. dnl PHP_DOES_PWRITE_WORK
  1106. dnl internal
  1107. AC_DEFUN([PHP_DOES_PWRITE_WORK],[
  1108. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1109. #include <sys/types.h>
  1110. #include <sys/stat.h>
  1111. #include <fcntl.h>
  1112. #include <unistd.h>
  1113. #include <errno.h>
  1114. $1
  1115. main() {
  1116. int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
  1117. if (fd < 0) exit(1);
  1118. if (pwrite(fd, "text", 4, 0) != 4) exit(1);
  1119. /* Linux glibc breakage until 2.2.5 */
  1120. if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
  1121. exit(0);
  1122. }
  1123. ]])],[
  1124. ac_cv_pwrite=yes
  1125. ],[
  1126. ac_cv_pwrite=no
  1127. ],[
  1128. ac_cv_pwrite=no
  1129. ])
  1130. ])
  1131. dnl PHP_DOES_PREAD_WORK
  1132. dnl internal
  1133. AC_DEFUN([PHP_DOES_PREAD_WORK],[
  1134. echo test > conftest_in
  1135. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1136. #include <sys/types.h>
  1137. #include <sys/stat.h>
  1138. #include <fcntl.h>
  1139. #include <unistd.h>
  1140. #include <errno.h>
  1141. $1
  1142. main() {
  1143. char buf[3];
  1144. int fd = open("conftest_in", O_RDONLY);
  1145. if (fd < 0) exit(1);
  1146. if (pread(fd, buf, 2, 0) != 2) exit(1);
  1147. /* Linux glibc breakage until 2.2.5 */
  1148. if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
  1149. exit(0);
  1150. }
  1151. ]])],[
  1152. ac_cv_pread=yes
  1153. ],[
  1154. ac_cv_pread=no
  1155. ],[
  1156. ac_cv_pread=no
  1157. ])
  1158. rm -f conftest_in
  1159. ])
  1160. dnl
  1161. dnl PHP_PWRITE_TEST
  1162. dnl
  1163. AC_DEFUN([PHP_PWRITE_TEST],[
  1164. AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
  1165. PHP_DOES_PWRITE_WORK
  1166. if test "$ac_cv_pwrite" = "no"; then
  1167. PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
  1168. if test "$ac_cv_pwrite" = "yes"; then
  1169. ac_cv_pwrite=64
  1170. fi
  1171. fi
  1172. ])
  1173. if test "$ac_cv_pwrite" != "no"; then
  1174. AC_DEFINE(HAVE_PWRITE, 1, [ ])
  1175. if test "$ac_cv_pwrite" = "64"; then
  1176. AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
  1177. fi
  1178. fi
  1179. ])
  1180. dnl
  1181. dnl PHP_PREAD_TEST
  1182. dnl
  1183. AC_DEFUN([PHP_PREAD_TEST],[
  1184. AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
  1185. PHP_DOES_PREAD_WORK
  1186. if test "$ac_cv_pread" = "no"; then
  1187. PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
  1188. if test "$ac_cv_pread" = "yes"; then
  1189. ac_cv_pread=64
  1190. fi
  1191. fi
  1192. ])
  1193. if test "$ac_cv_pread" != "no"; then
  1194. AC_DEFINE(HAVE_PREAD, 1, [ ])
  1195. if test "$ac_cv_pread" = "64"; then
  1196. AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
  1197. fi
  1198. fi
  1199. ])
  1200. dnl
  1201. dnl PHP_MISSING_TIME_R_DECL
  1202. dnl
  1203. AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
  1204. AC_MSG_CHECKING([for missing declarations of reentrant functions])
  1205. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)() = localtime_r]])],[
  1206. :
  1207. ],[
  1208. AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
  1209. ])
  1210. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)() = gmtime_r]])],[
  1211. :
  1212. ],[
  1213. AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
  1214. ])
  1215. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)() = asctime_r]])],[
  1216. :
  1217. ],[
  1218. AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
  1219. ])
  1220. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)() = ctime_r]])],[
  1221. :
  1222. ],[
  1223. AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
  1224. ])
  1225. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[char *(*func)() = strtok_r]])],[
  1226. :
  1227. ],[
  1228. AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
  1229. ])
  1230. AC_MSG_RESULT([done])
  1231. ])
  1232. dnl
  1233. dnl PHP_READDIR_R_TYPE
  1234. dnl
  1235. AC_DEFUN([PHP_READDIR_R_TYPE],[
  1236. dnl HAVE_READDIR_R is also defined by libmysql
  1237. AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
  1238. if test "$ac_cv_func_readdir_r" = "yes"; then
  1239. AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
  1240. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1241. #define _REENTRANT
  1242. #include <sys/types.h>
  1243. #include <dirent.h>
  1244. #ifndef PATH_MAX
  1245. #define PATH_MAX 1024
  1246. #endif
  1247. main() {
  1248. DIR *dir;
  1249. char entry[sizeof(struct dirent)+PATH_MAX];
  1250. struct dirent *pentry = (struct dirent *) &entry;
  1251. dir = opendir("/");
  1252. if (!dir)
  1253. exit(1);
  1254. if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) {
  1255. close(dir);
  1256. exit(0);
  1257. }
  1258. close(dir);
  1259. exit(1);
  1260. }
  1261. ]])],[
  1262. ac_cv_what_readdir_r=POSIX
  1263. ],[
  1264. AC_PREPROC_IFELSE([
  1265. AC_LANG_SOURCE([[
  1266. #define _REENTRANT
  1267. #include <sys/types.h>
  1268. #include <dirent.h>
  1269. int readdir_r(DIR *, struct dirent *);
  1270. ]])],[
  1271. ac_cv_what_readdir_r=old-style
  1272. ],[
  1273. ac_cv_what_readdir_r=none
  1274. ])
  1275. ],[
  1276. ac_cv_what_readdir_r=none
  1277. ])
  1278. ])
  1279. case $ac_cv_what_readdir_r in
  1280. POSIX)
  1281. AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
  1282. old-style)
  1283. AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
  1284. esac
  1285. fi
  1286. ])
  1287. dnl
  1288. dnl PHP_TM_GMTOFF
  1289. dnl
  1290. AC_DEFUN([PHP_TM_GMTOFF],[
  1291. AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
  1292. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  1293. #include <$ac_cv_struct_tm>]], [[struct tm tm; tm.tm_gmtoff;]])],
  1294. [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no])])
  1295. if test "$ac_cv_struct_tm_gmtoff" = yes; then
  1296. AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
  1297. fi
  1298. ])
  1299. dnl
  1300. dnl PHP_STRUCT_FLOCK
  1301. dnl
  1302. AC_DEFUN([PHP_STRUCT_FLOCK],[
  1303. AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
  1304. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1305. #include <unistd.h>
  1306. #include <fcntl.h>
  1307. ]], [[struct flock x;]])],[
  1308. ac_cv_struct_flock=yes
  1309. ],[
  1310. ac_cv_struct_flock=no
  1311. ])
  1312. )
  1313. if test "$ac_cv_struct_flock" = "yes" ; then
  1314. AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
  1315. fi
  1316. ])
  1317. dnl
  1318. dnl PHP_SOCKLEN_T
  1319. dnl
  1320. AC_DEFUN([PHP_SOCKLEN_T],[
  1321. AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
  1322. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1323. #include <sys/types.h>
  1324. #include <sys/socket.h>
  1325. ]],[[
  1326. socklen_t x;
  1327. ]])],[
  1328. ac_cv_socklen_t=yes
  1329. ],[
  1330. ac_cv_socklen_t=no
  1331. ]))
  1332. if test "$ac_cv_socklen_t" = "yes"; then
  1333. AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
  1334. fi
  1335. ])
  1336. dnl
  1337. dnl PHP_MISSING_FCLOSE_DECL
  1338. dnl
  1339. dnl See if we have broken header files like SunOS has.
  1340. dnl
  1341. AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
  1342. AC_MSG_CHECKING([for fclose declaration])
  1343. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[int (*func)() = fclose]])],[
  1344. AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
  1345. AC_MSG_RESULT([ok])
  1346. ],[
  1347. AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
  1348. AC_MSG_RESULT([missing])
  1349. ])
  1350. ])
  1351. dnl
  1352. dnl PHP_AC_BROKEN_SPRINTF
  1353. dnl
  1354. dnl Check for broken sprintf(), C99 conformance
  1355. dnl
  1356. AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
  1357. AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
  1358. AC_RUN_IFELSE([AC_LANG_SOURCE([[main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }]])],[
  1359. ac_cv_broken_sprintf=no
  1360. ],[
  1361. ac_cv_broken_sprintf=yes
  1362. ],[
  1363. ac_cv_broken_sprintf=no
  1364. ])
  1365. ])
  1366. if test "$ac_cv_broken_sprintf" = "yes"; then
  1367. AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
  1368. else
  1369. AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
  1370. fi
  1371. ])
  1372. dnl
  1373. dnl PHP_AC_BROKEN_SNPRINTF
  1374. dnl
  1375. dnl Check for broken snprintf(), C99 conformance
  1376. dnl
  1377. AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
  1378. AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
  1379. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1380. #define NULL (0L)
  1381. main() {
  1382. char buf[20];
  1383. int res = 0;
  1384. res = res || (snprintf(buf, 2, "marcus") != 6);
  1385. res = res || (buf[1] != '\0');
  1386. /* Implementations may consider this as an encoding error */
  1387. snprintf(buf, 0, "boerger");
  1388. /* However, they MUST ignore the pointer */
  1389. res = res || (buf[0] != 'm');
  1390. res = res || (snprintf(NULL, 0, "boerger") != 7);
  1391. res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
  1392. exit(res);
  1393. }
  1394. ]])],[
  1395. ac_cv_broken_snprintf=no
  1396. ],[
  1397. ac_cv_broken_snprintf=yes
  1398. ],[
  1399. ac_cv_broken_snprintf=no
  1400. ])
  1401. ])
  1402. if test "$ac_cv_broken_snprintf" = "yes"; then
  1403. AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
  1404. else
  1405. AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
  1406. fi
  1407. ])
  1408. dnl
  1409. dnl PHP_SOLARIS_PIC_WEIRDNESS
  1410. dnl
  1411. dnl Solaris requires main code to be position independent in order
  1412. dnl to let shared objects find symbols. Weird. Ugly.
  1413. dnl
  1414. dnl Must be run after all --with-NN options that let the user
  1415. dnl choose dynamic extensions, and after the gcc test.
  1416. dnl
  1417. AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
  1418. AC_MSG_CHECKING([whether -fPIC is required])
  1419. if test -n "$EXT_SHARED"; then
  1420. os=`uname -sr 2>/dev/null`
  1421. case $os in
  1422. "SunOS 5.6"|"SunOS 5.7"[)]
  1423. case $CC in
  1424. gcc*|egcs*)
  1425. CFLAGS="$CFLAGS -fPIC";;
  1426. *[)]
  1427. CFLAGS="$CFLAGS -fpic";;
  1428. esac
  1429. AC_MSG_RESULT([yes]);;
  1430. *[)]
  1431. AC_MSG_RESULT([no]);;
  1432. esac
  1433. else
  1434. AC_MSG_RESULT([no])
  1435. fi
  1436. ])
  1437. dnl
  1438. dnl PHP_SYS_LFS
  1439. dnl
  1440. dnl The problem is that the default compilation flags in Solaris 2.6 won't
  1441. dnl let programs access large files; you need to tell the compiler that
  1442. dnl you actually want your programs to work on large files. For more
  1443. dnl details about this brain damage please see:
  1444. dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
  1445. dnl
  1446. dnl Written by Paul Eggert <eggert@twinsun.com>.
  1447. dnl
  1448. AC_DEFUN([PHP_SYS_LFS],
  1449. [dnl
  1450. # If available, prefer support for large files unless the user specified
  1451. # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
  1452. AC_MSG_CHECKING([whether large file support needs explicit enabling])
  1453. ac_getconfs=''
  1454. ac_result=yes
  1455. ac_set=''
  1456. ac_shellvars='CPPFLAGS LDFLAGS LIBS'
  1457. for ac_shellvar in $ac_shellvars; do
  1458. case $ac_shellvar in
  1459. CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
  1460. *[)] ac_lfsvar=LFS_$ac_shellvar ;;
  1461. esac
  1462. eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
  1463. (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
  1464. ac_getconf=`getconf $ac_lfsvar`
  1465. ac_getconfs=$ac_getconfs$ac_getconf
  1466. eval ac_test_$ac_shellvar=\$ac_getconf
  1467. done
  1468. case "$ac_result$ac_getconfs" in
  1469. yes[)] ac_result=no ;;
  1470. esac
  1471. case "$ac_result$ac_set" in
  1472. yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
  1473. esac
  1474. AC_MSG_RESULT([$ac_result])
  1475. case $ac_result in
  1476. yes[)]
  1477. for ac_shellvar in $ac_shellvars; do
  1478. eval $ac_shellvar=\$ac_test_$ac_shellvar
  1479. done ;;
  1480. esac
  1481. ])
  1482. dnl
  1483. dnl PHP_SOCKADDR_CHECKS
  1484. dnl
  1485. AC_DEFUN([PHP_SOCKADDR_CHECKS], [
  1486. dnl Check for struct sockaddr_storage exists
  1487. AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
  1488. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  1489. #include <sys/socket.h>]],
  1490. [[struct sockaddr_storage s; s]])],
  1491. [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
  1492. ])
  1493. if test "$ac_cv_sockaddr_storage" = "yes"; then
  1494. AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
  1495. fi
  1496. dnl Check if field sa_len exists in struct sockaddr
  1497. AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
  1498. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  1499. #include <sys/socket.h>]], [[static struct sockaddr sa; int n = (int) sa.sa_len; return n;]])],
  1500. [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
  1501. ])
  1502. if test "$ac_cv_sockaddr_sa_len" = "yes"; then
  1503. AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
  1504. fi
  1505. ])
  1506. dnl
  1507. dnl PHP_DECLARED_TIMEZONE
  1508. dnl
  1509. AC_DEFUN([PHP_DECLARED_TIMEZONE],[
  1510. AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
  1511. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1512. #include <sys/types.h>
  1513. #include <time.h>
  1514. #ifdef HAVE_SYS_TIME_H
  1515. #include <sys/time.h>
  1516. #endif
  1517. ]],[[
  1518. time_t foo = (time_t) timezone;
  1519. ]])],[
  1520. ac_cv_declared_timezone=yes
  1521. ],[
  1522. ac_cv_declared_timezone=no
  1523. ])])
  1524. if test "$ac_cv_declared_timezone" = "yes"; then
  1525. AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
  1526. fi
  1527. ])
  1528. dnl
  1529. dnl PHP_EBCDIC
  1530. dnl
  1531. AC_DEFUN([PHP_EBCDIC], [
  1532. AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
  1533. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1534. int main(void) {
  1535. return (unsigned char)'A' != (unsigned char)0xC1;
  1536. }
  1537. ]])],[
  1538. ac_cv_ebcdic=yes
  1539. ],[
  1540. ac_cv_ebcdic=no
  1541. ],[
  1542. ac_cv_ebcdic=no
  1543. ])])
  1544. if test "$ac_cv_ebcdic" = "yes"; then
  1545. AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
  1546. fi
  1547. ])
  1548. dnl
  1549. dnl PHP_BROKEN_GETCWD
  1550. dnl
  1551. dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
  1552. dnl component of the path has execute but not read permissions
  1553. dnl
  1554. AC_DEFUN([PHP_BROKEN_GETCWD],[
  1555. AC_MSG_CHECKING([for broken getcwd])
  1556. os=`uname -sr 2>/dev/null`
  1557. case $os in
  1558. SunOS*[)]
  1559. AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
  1560. AC_MSG_RESULT([yes]);;
  1561. *[)]
  1562. AC_MSG_RESULT([no]);;
  1563. esac
  1564. ])
  1565. dnl
  1566. dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
  1567. dnl
  1568. AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
  1569. AC_MSG_CHECKING([for broken libc stdio])
  1570. AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
  1571. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1572. #include <stdio.h>
  1573. int main(int argc, char *argv[])
  1574. {
  1575. FILE *fp;
  1576. long position;
  1577. char *filename = tmpnam(NULL);
  1578. fp = fopen(filename, "w");
  1579. if (fp == NULL) {
  1580. perror("fopen");
  1581. exit(2);
  1582. }
  1583. fputs("foobar", fp);
  1584. fclose(fp);
  1585. fp = fopen(filename, "a+");
  1586. position = ftell(fp);
  1587. fclose(fp);
  1588. unlink(filename);
  1589. if (position == 0)
  1590. return 1;
  1591. return 0;
  1592. }
  1593. ]])],
  1594. [_cv_have_broken_glibc_fopen_append=no],
  1595. [_cv_have_broken_glibc_fopen_append=yes],
  1596. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1597. #include <features.h>
  1598. ]], [[
  1599. #if !__GLIBC_PREREQ(2,2)
  1600. choke me
  1601. #endif
  1602. ]])],
  1603. [_cv_have_broken_glibc_fopen_append=yes],
  1604. [_cv_have_broken_glibc_fopen_append=no])
  1605. ])])
  1606. if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
  1607. AC_MSG_RESULT(yes)
  1608. AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
  1609. else
  1610. AC_MSG_RESULT(no)
  1611. fi
  1612. ])
  1613. dnl
  1614. dnl PHP_BROKEN_GCC_STRLEN_OPT
  1615. dnl
  1616. dnl Early releases of GCC 8 shipped with a strlen() optimization bug, so they
  1617. dnl didn't properly handle the `char val[1]` struct hack. See bug #76510.
  1618. dnl
  1619. AC_DEFUN([PHP_BROKEN_GCC_STRLEN_OPT], [
  1620. AC_CACHE_CHECK([for broken gcc optimize-strlen],ac_cv_have_broken_gcc_strlen_opt,[
  1621. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1622. #include <stdlib.h>
  1623. #include <string.h>
  1624. #include <stdio.h>
  1625. struct s
  1626. {
  1627. int i;
  1628. char c[1];
  1629. };
  1630. int main()
  1631. {
  1632. struct s *s = malloc(sizeof(struct s) + 3);
  1633. s->i = 3;
  1634. strcpy(s->c, "foo");
  1635. return strlen(s->c+1) == 2;
  1636. }
  1637. ]])],[
  1638. ac_cv_have_broken_gcc_strlen_opt=yes
  1639. ],[
  1640. ac_cv_have_broken_gcc_strlen_opt=no
  1641. ],[
  1642. ac_cv_have_broken_gcc_strlen_opt=no
  1643. ])])
  1644. if test "$ac_cv_have_broken_gcc_strlen_opt" = "yes"; then
  1645. CFLAGS="$CFLAGS -fno-optimize-strlen"
  1646. fi
  1647. ])
  1648. dnl
  1649. dnl PHP_FOPENCOOKIE
  1650. dnl
  1651. AC_DEFUN([PHP_FOPENCOOKIE], [
  1652. AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
  1653. if test "$have_glibc_fopencookie" = "yes"; then
  1654. dnl this comes in two flavors:
  1655. dnl newer glibcs (since 2.1.2 ? )
  1656. dnl have a type called cookie_io_functions_t
  1657. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1658. #define _GNU_SOURCE
  1659. #include <stdio.h>
  1660. ]], [[cookie_io_functions_t cookie;]])],[have_cookie_io_functions_t=yes],[])
  1661. if test "$have_cookie_io_functions_t" = "yes"; then
  1662. cookie_io_functions_t=cookie_io_functions_t
  1663. have_fopen_cookie=yes
  1664. dnl even newer glibcs have a different seeker definition...
  1665. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1666. #define _GNU_SOURCE
  1667. #include <stdio.h>
  1668. struct cookiedata {
  1669. __off64_t pos;
  1670. };
  1671. __ssize_t reader(void *cookie, char *buffer, size_t size)
  1672. { return size; }
  1673. __ssize_t writer(void *cookie, const char *buffer, size_t size)
  1674. { return size; }
  1675. int closer(void *cookie)
  1676. { return 0; }
  1677. int seeker(void *cookie, __off64_t *position, int whence)
  1678. { ((struct cookiedata*)cookie)->pos = *position; return 0; }
  1679. cookie_io_functions_t funcs = {reader, writer, seeker, closer};
  1680. main() {
  1681. struct cookiedata g = { 0 };
  1682. FILE *fp = fopencookie(&g, "r", funcs);
  1683. if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
  1684. exit(0);
  1685. exit(1);
  1686. }
  1687. ]])], [
  1688. cookie_io_functions_use_off64_t=yes
  1689. ], [
  1690. cookie_io_functions_use_off64_t=no
  1691. ], [
  1692. cookie_io_functions_use_off64_t=no
  1693. ])
  1694. else
  1695. dnl older glibc versions (up to 2.1.2 ?)
  1696. dnl call it _IO_cookie_io_functions_t
  1697. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  1698. #define _GNU_SOURCE
  1699. #include <stdio.h>
  1700. ]], [[_IO_cookie_io_functions_t cookie;]])], [have_IO_cookie_io_functions_t=yes], [])
  1701. if test "$have_cookie_io_functions_t" = "yes" ; then
  1702. cookie_io_functions_t=_IO_cookie_io_functions_t
  1703. have_fopen_cookie=yes
  1704. fi
  1705. fi
  1706. if test "$have_fopen_cookie" = "yes" ; then
  1707. AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
  1708. AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
  1709. if test "$cookie_io_functions_use_off64_t" = "yes" ; then
  1710. AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
  1711. fi
  1712. fi
  1713. fi
  1714. ])
  1715. dnl -------------------------------------------------------------------------
  1716. dnl Library/function existence and build sanity checks
  1717. dnl -------------------------------------------------------------------------
  1718. dnl
  1719. dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
  1720. dnl
  1721. dnl Wrapper for AC_CHECK_LIB
  1722. dnl
  1723. AC_DEFUN([PHP_CHECK_LIBRARY], [
  1724. save_old_LDFLAGS=$LDFLAGS
  1725. ac_stuff="$5"
  1726. save_ext_shared=$ext_shared
  1727. ext_shared=yes
  1728. PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
  1729. AC_CHECK_LIB([$1],[$2],[
  1730. LDFLAGS=$save_old_LDFLAGS
  1731. ext_shared=$save_ext_shared
  1732. $3
  1733. ],[
  1734. LDFLAGS=$save_old_LDFLAGS
  1735. ext_shared=$save_ext_shared
  1736. unset ac_cv_lib_$1[]_$2
  1737. $4
  1738. ])dnl
  1739. ])
  1740. dnl
  1741. dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
  1742. dnl
  1743. dnl El cheapo wrapper for AC_CHECK_LIB
  1744. dnl
  1745. AC_DEFUN([PHP_CHECK_FRAMEWORK], [
  1746. save_old_LDFLAGS=$LDFLAGS
  1747. LDFLAGS="-framework $1 $LDFLAGS"
  1748. dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
  1749. dnl rewriting AC_CHECK_LIB is overkill and this only affects
  1750. dnl the "checking.." output anyway.
  1751. AC_CHECK_LIB(c,[$2],[
  1752. LDFLAGS=$save_old_LDFLAGS
  1753. $3
  1754. ],[
  1755. LDFLAGS=$save_old_LDFLAGS
  1756. $4
  1757. ])
  1758. ])
  1759. dnl
  1760. dnl PHP_CHECK_FUNC_LIB(func, libs)
  1761. dnl
  1762. dnl This macro checks whether 'func' or '__func' exists
  1763. dnl in the specified library.
  1764. dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
  1765. dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
  1766. dnl
  1767. dnl
  1768. dnl autoconf undefines the builtin "shift" :-(
  1769. dnl If possible, we use the builtin shift anyway, otherwise we use
  1770. dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
  1771. ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
  1772. define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
  1773. ])
  1774. dnl
  1775. AC_DEFUN([PHP_CHECK_FUNC_LIB],[
  1776. ifelse($2,,:,[
  1777. unset ac_cv_lib_$2[]_$1
  1778. unset ac_cv_lib_$2[]___$1
  1779. unset found
  1780. AC_CHECK_LIB($2, $1, [found=yes], [
  1781. AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
  1782. ])
  1783. if test "$found" = "yes"; then
  1784. ac_libs=$LIBS
  1785. LIBS="$LIBS -l$2"
  1786. AC_RUN_IFELSE([AC_LANG_SOURCE([[main() { return (0); }]])],[found=yes],[found=no],[found=no])
  1787. LIBS=$ac_libs
  1788. fi
  1789. if test "$found" = "yes"; then
  1790. PHP_ADD_LIBRARY($2)
  1791. PHP_DEF_HAVE($1)
  1792. PHP_DEF_HAVE(lib$2)
  1793. ac_cv_func_$1=yes
  1794. else
  1795. PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
  1796. fi
  1797. ])
  1798. ])
  1799. dnl
  1800. dnl PHP_CHECK_FUNC(func, ...)
  1801. dnl
  1802. dnl This macro checks whether 'func' or '__func' exists
  1803. dnl in the default libraries and as a fall back in the specified library.
  1804. dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
  1805. dnl
  1806. AC_DEFUN([PHP_CHECK_FUNC],[
  1807. unset ac_cv_func_$1
  1808. unset ac_cv_func___$1
  1809. unset found
  1810. AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
  1811. case $found in
  1812. yes[)]
  1813. PHP_DEF_HAVE($1)
  1814. ac_cv_func_$1=yes
  1815. ;;
  1816. ifelse($#,1,,[
  1817. *[)] PHP_CHECK_FUNC_LIB($@) ;;
  1818. ])
  1819. esac
  1820. ])
  1821. dnl
  1822. dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
  1823. dnl
  1824. dnl This macro checks whether build works and given function exists.
  1825. dnl
  1826. AC_DEFUN([PHP_TEST_BUILD], [
  1827. old_LIBS=$LIBS
  1828. LIBS="$4 $LIBS"
  1829. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1830. $5
  1831. char $1();
  1832. int main() {
  1833. $1();
  1834. return 0;
  1835. }
  1836. ]])],[
  1837. LIBS=$old_LIBS
  1838. $2
  1839. ],[
  1840. LIBS=$old_LIBS
  1841. $3
  1842. ],[
  1843. LIBS=$old_LIBS
  1844. ])
  1845. ])
  1846. dnl -------------------------------------------------------------------------
  1847. dnl Platform characteristics checks
  1848. dnl -------------------------------------------------------------------------
  1849. dnl
  1850. dnl PHP_SHLIB_SUFFIX_NAMES
  1851. dnl
  1852. dnl Determines link library suffix SHLIB_SUFFIX_NAME
  1853. dnl which can be: .so, .sl or .dylib
  1854. dnl
  1855. dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
  1856. dnl suffix can be: .so or .sl
  1857. dnl
  1858. AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
  1859. AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
  1860. PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
  1861. PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
  1862. SHLIB_SUFFIX_NAME=so
  1863. SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
  1864. case $host_alias in
  1865. *hpux*[)]
  1866. SHLIB_SUFFIX_NAME=sl
  1867. SHLIB_DL_SUFFIX_NAME=sl
  1868. ;;
  1869. *darwin*[)]
  1870. SHLIB_SUFFIX_NAME=dylib
  1871. SHLIB_DL_SUFFIX_NAME=so
  1872. ;;
  1873. esac
  1874. ])
  1875. dnl
  1876. dnl PHP_CHECK_64BIT([do if 32], [do if 64])
  1877. dnl
  1878. dnl This macro is used to detect if we're at 64-bit platform or not.
  1879. dnl It could be useful for those external libs, that have different precompiled
  1880. dnl versions in different directories.
  1881. dnl
  1882. AC_DEFUN([PHP_CHECK_64BIT],[
  1883. AC_CHECK_SIZEOF(long int, 4)
  1884. AC_MSG_CHECKING([checking if we're at 64-bit platform])
  1885. if test "$ac_cv_sizeof_long_int" = "4" ; then
  1886. AC_MSG_RESULT([no])
  1887. $1
  1888. else
  1889. AC_MSG_RESULT([yes])
  1890. $2
  1891. fi
  1892. ])
  1893. dnl
  1894. dnl PHP_C_BIGENDIAN
  1895. dnl
  1896. dnl Replacement macro for AC_C_BIGENDIAN
  1897. dnl
  1898. AC_DEFUN([PHP_C_BIGENDIAN],
  1899. [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
  1900. [
  1901. ac_cv_c_bigendian_php=unknown
  1902. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1903. int main(void)
  1904. {
  1905. short one = 1;
  1906. char *cp = (char *)&one;
  1907. if (*cp == 0) {
  1908. return(0);
  1909. } else {
  1910. return(1);
  1911. }
  1912. }
  1913. ]])], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
  1914. ])
  1915. if test $ac_cv_c_bigendian_php = yes; then
  1916. AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
  1917. fi
  1918. ])
  1919. dnl -------------------------------------------------------------------------
  1920. dnl Checks for programs: PHP_PROG_<program>
  1921. dnl -------------------------------------------------------------------------
  1922. dnl
  1923. dnl PHP_PROG_SENDMAIL
  1924. dnl
  1925. dnl Search for the sendmail binary
  1926. dnl
  1927. AC_DEFUN([PHP_PROG_SENDMAIL], [
  1928. PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
  1929. AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
  1930. PHP_SUBST(PROG_SENDMAIL)
  1931. ])
  1932. dnl
  1933. dnl PHP_PROG_AWK
  1934. dnl
  1935. dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
  1936. dnl
  1937. AC_DEFUN([PHP_PROG_AWK], [
  1938. AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
  1939. case "$AWK" in
  1940. *mawk)
  1941. AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
  1942. ;;
  1943. *gawk)
  1944. ;;
  1945. bork)
  1946. AC_MSG_ERROR([Could not find awk; Install GNU awk])
  1947. ;;
  1948. *)
  1949. AC_MSG_CHECKING([if $AWK is broken])
  1950. if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
  1951. AC_MSG_RESULT([yes])
  1952. AC_MSG_ERROR([You should install GNU awk])
  1953. else
  1954. AC_MSG_RESULT([no])
  1955. fi
  1956. ;;
  1957. esac
  1958. PHP_SUBST(AWK)
  1959. ])
  1960. dnl
  1961. dnl PHP_PROG_BISON
  1962. dnl
  1963. dnl Search for bison and check it's version
  1964. dnl
  1965. AC_DEFUN([PHP_PROG_BISON], [
  1966. AC_PROG_YACC
  1967. LIBZEND_BISON_CHECK
  1968. PHP_SUBST(YACC)
  1969. ])
  1970. dnl
  1971. dnl PHP_PROG_RE2C
  1972. dnl
  1973. dnl Search for the re2c binary and check the version
  1974. dnl
  1975. AC_DEFUN([PHP_PROG_RE2C],[
  1976. AC_CHECK_PROG(RE2C, re2c, re2c)
  1977. if test -n "$RE2C"; then
  1978. AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
  1979. re2c_vernum=`$RE2C --vernum 2>/dev/null`
  1980. if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
  1981. php_cv_re2c_version=invalid
  1982. else
  1983. php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
  1984. fi
  1985. ])
  1986. fi
  1987. case $php_cv_re2c_version in
  1988. ""|invalid[)]
  1989. AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
  1990. RE2C="exit 0;"
  1991. ;;
  1992. esac
  1993. PHP_SUBST(RE2C)
  1994. ])
  1995. dnl -------------------------------------------------------------------------
  1996. dnl Common setup macros: PHP_SETUP_<what>
  1997. dnl -------------------------------------------------------------------------
  1998. dnl
  1999. dnl PHP_SETUP_ICU([shared-add])
  2000. dnl
  2001. dnl Common setup macro for ICU
  2002. dnl
  2003. AC_DEFUN([PHP_SETUP_ICU],[
  2004. PHP_ARG_WITH(icu-dir,,
  2005. [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
  2006. if test "$PHP_ICU_DIR" = "no"; then
  2007. PHP_ICU_DIR=DEFAULT
  2008. fi
  2009. AC_MSG_CHECKING([for location of ICU headers and libraries])
  2010. found_icu=no
  2011. dnl First try to find pkg-config
  2012. if test -z "$PKG_CONFIG"; then
  2013. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  2014. fi
  2015. dnl If pkg-config is found try using it
  2016. if test "$PHP_ICU_DIR" = "DEFAULT" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists icu-uc icu-io icu-i18n; then
  2017. if $PKG_CONFIG --atleast-version=4.0 icu-uc; then
  2018. found_icu=yes
  2019. icu_version_full=`$PKG_CONFIG --modversion icu-uc`
  2020. ac_IFS=$IFS
  2021. IFS="."
  2022. set $icu_version_full
  2023. IFS=$ac_IFS
  2024. icu_version=`expr [$]1 \* 1000 + [$]2`
  2025. AC_MSG_RESULT([found $icu_version_full])
  2026. ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n`
  2027. ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n`
  2028. ICU_CXXFLAGS=`$PKG_CONFIG --variable=CXXFLAGS icu-uc`
  2029. ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
  2030. AC_MSG_RESULT([found $ICU_VERSION])
  2031. PHP_EVAL_LIBLINE($ICU_LIBS, $1)
  2032. PHP_EVAL_INCLINE($ICU_INCS)
  2033. else
  2034. AC_MSG_ERROR([ICU version 4.0 or later required.])
  2035. fi
  2036. fi
  2037. dnl If pkg-config fails for some reason, revert to the old method
  2038. if test "$found_icu" = "no"; then
  2039. if test "$PHP_ICU_DIR" = "DEFAULT"; then
  2040. dnl Try to find icu-config
  2041. AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
  2042. else
  2043. ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
  2044. fi
  2045. dnl Trust icu-config to know better what the install prefix is..
  2046. icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
  2047. if test "$?" != "0" || test -z "$icu_install_prefix"; then
  2048. AC_MSG_RESULT([not found])
  2049. AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
  2050. else
  2051. AC_MSG_RESULT([$icu_install_prefix])
  2052. dnl Check ICU version
  2053. AC_MSG_CHECKING([for ICU 4.0 or greater])
  2054. icu_version_full=`$ICU_CONFIG --version`
  2055. ac_IFS=$IFS
  2056. IFS="."
  2057. set $icu_version_full
  2058. IFS=$ac_IFS
  2059. icu_version=`expr [$]1 \* 1000 + [$]2`
  2060. AC_MSG_RESULT([found $icu_version_full])
  2061. if test "$icu_version" -lt "4000"; then
  2062. AC_MSG_ERROR([ICU version 4.0 or later is required])
  2063. fi
  2064. ICU_VERSION=$icu_version
  2065. ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
  2066. ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
  2067. PHP_EVAL_INCLINE($ICU_INCS)
  2068. PHP_EVAL_LIBLINE($ICU_LIBS, $1)
  2069. ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
  2070. if test "$icu_version" -ge "49000"; then
  2071. ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
  2072. ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
  2073. fi
  2074. if test "$icu_version" -ge "60000"; then
  2075. ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
  2076. fi
  2077. fi
  2078. fi
  2079. ])
  2080. dnl
  2081. dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
  2082. dnl
  2083. dnl Common setup macro for kerberos
  2084. dnl
  2085. AC_DEFUN([PHP_SETUP_KERBEROS],[
  2086. found_kerberos=no
  2087. unset KERBEROS_CFLAGS
  2088. unset KERBEROS_LIBS
  2089. dnl First try to find krb5-config
  2090. if test -z "$KRB5_CONFIG"; then
  2091. AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
  2092. fi
  2093. dnl If krb5-config is found try using it
  2094. if test "$PHP_KERBEROS" != "no" && test -x "$KRB5_CONFIG"; then
  2095. KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
  2096. KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
  2097. if test -n "$KERBEROS_LIBS"; then
  2098. found_kerberos=yes
  2099. PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
  2100. PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
  2101. fi
  2102. fi
  2103. dnl If still not found use old skool method
  2104. if test "$found_kerberos" = "no"; then
  2105. if test "$PHP_KERBEROS" = "yes"; then
  2106. PHP_KERBEROS="/usr/kerberos /usr/local /usr"
  2107. fi
  2108. for i in $PHP_KERBEROS; do
  2109. if test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/$DEB_HOST_MULTIARCH/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libkrb5.a; then
  2110. PHP_KERBEROS_DIR=$i
  2111. break
  2112. fi
  2113. done
  2114. if test "$PHP_KERBEROS_DIR"; then
  2115. found_kerberos=yes
  2116. PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
  2117. PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
  2118. PHP_ADD_LIBRARY(krb5, 1, $1)
  2119. PHP_ADD_LIBRARY(k5crypto, 1, $1)
  2120. PHP_ADD_LIBRARY(com_err, 1, $1)
  2121. PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
  2122. fi
  2123. fi
  2124. if test "$found_kerberos" = "yes"; then
  2125. ifelse([$2],[],:,[$2])
  2126. ifelse([$3],[],,[else $3])
  2127. fi
  2128. ])
  2129. dnl
  2130. dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
  2131. dnl
  2132. dnl Common setup macro for openssl
  2133. dnl
  2134. AC_DEFUN([PHP_SETUP_OPENSSL],[
  2135. found_openssl=no
  2136. unset OPENSSL_INCDIR
  2137. unset OPENSSL_LIBDIR
  2138. dnl Empty variable means 'no'
  2139. test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
  2140. test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
  2141. dnl Fallbacks for different configure options
  2142. if test "$PHP_OPENSSL" != "no"; then
  2143. PHP_OPENSSL_DIR=$PHP_OPENSSL
  2144. elif test "$PHP_IMAP_SSL" != "no"; then
  2145. PHP_OPENSSL_DIR=$PHP_IMAP_SSL
  2146. fi
  2147. dnl First try to find pkg-config
  2148. if test -z "$PKG_CONFIG"; then
  2149. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  2150. fi
  2151. dnl If pkg-config is found try using it
  2152. if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
  2153. if $PKG_CONFIG --atleast-version=1.0.1 openssl; then
  2154. found_openssl=yes
  2155. OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
  2156. OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
  2157. OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
  2158. else
  2159. AC_MSG_ERROR([OpenSSL version 1.0.1 or greater required.])
  2160. fi
  2161. if test -n "$OPENSSL_LIBS"; then
  2162. PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
  2163. fi
  2164. if test -n "$OPENSSL_INCS"; then
  2165. PHP_EVAL_INCLINE($OPENSSL_INCS)
  2166. fi
  2167. fi
  2168. dnl If pkg-config fails for some reason, revert to the old method
  2169. if test "$found_openssl" = "no"; then
  2170. if test "$PHP_OPENSSL_DIR" = "yes"; then
  2171. PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
  2172. fi
  2173. for i in $PHP_OPENSSL_DIR; do
  2174. if test -r $i/include/openssl/evp.h; then
  2175. OPENSSL_INCDIR=$i/include
  2176. fi
  2177. if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/$DEB_HOST_MULTIARCH/libssl.$SHLIB_SUFFIX_NAME -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
  2178. OPENSSL_LIBDIR=$i/$PHP_LIBDIR
  2179. fi
  2180. test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
  2181. done
  2182. if test -z "$OPENSSL_INCDIR"; then
  2183. AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
  2184. fi
  2185. if test -z "$OPENSSL_LIBDIR"; then
  2186. AC_MSG_ERROR([Cannot find OpenSSL's libraries])
  2187. fi
  2188. old_CPPFLAGS=$CPPFLAGS
  2189. CPPFLAGS=-I$OPENSSL_INCDIR
  2190. AC_MSG_CHECKING([for OpenSSL version])
  2191. AC_EGREP_CPP(yes,[
  2192. #include <openssl/opensslv.h>
  2193. #if OPENSSL_VERSION_NUMBER >= 0x10001001L
  2194. yes
  2195. #endif
  2196. ],[
  2197. AC_MSG_RESULT([>= 1.0.1])
  2198. ],[
  2199. AC_MSG_ERROR([OpenSSL version 1.0.1 or greater required.])
  2200. ])
  2201. CPPFLAGS=$old_CPPFLAGS
  2202. PHP_ADD_INCLUDE($OPENSSL_INCDIR)
  2203. PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [:],[
  2204. AC_MSG_ERROR([libcrypto not found!])
  2205. ],[
  2206. -L$OPENSSL_LIBDIR
  2207. ])
  2208. old_LIBS=$LIBS
  2209. LIBS="$LIBS -lcrypto"
  2210. PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
  2211. found_openssl=yes
  2212. ],[
  2213. AC_MSG_ERROR([libssl not found!])
  2214. ],[
  2215. -L$OPENSSL_LIBDIR
  2216. ])
  2217. LIBS=$old_LIBS
  2218. PHP_ADD_LIBRARY(ssl,,$1)
  2219. PHP_ADD_LIBRARY(crypto,,$1)
  2220. PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
  2221. fi
  2222. if test "$found_openssl" = "yes"; then
  2223. dnl For apache 1.3.x static build
  2224. OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
  2225. AC_SUBST(OPENSSL_INCDIR_OPT)
  2226. ifelse([$2],[],:,[$2])
  2227. ifelse([$3],[],,[else $3])
  2228. fi
  2229. ])
  2230. dnl
  2231. dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
  2232. dnl
  2233. dnl Common setup macro for iconv
  2234. dnl
  2235. AC_DEFUN([PHP_SETUP_ICONV], [
  2236. found_iconv=no
  2237. unset ICONV_DIR
  2238. # Create the directories for a VPATH build:
  2239. $php_shtool mkdir -p ext/iconv
  2240. echo > ext/iconv/php_have_bsd_iconv.h
  2241. echo > ext/iconv/php_have_ibm_iconv.h
  2242. echo > ext/iconv/php_have_glibc_iconv.h
  2243. echo > ext/iconv/php_have_libiconv.h
  2244. echo > ext/iconv/php_have_iconv.h
  2245. echo > ext/iconv/php_php_iconv_impl.h
  2246. echo > ext/iconv/php_iconv_aliased_libiconv.h
  2247. echo > ext/iconv/php_php_iconv_h_path.h
  2248. echo > ext/iconv/php_iconv_supports_errno.h
  2249. dnl
  2250. dnl Check libc first if no path is provided in --with-iconv
  2251. dnl
  2252. if test "$PHP_ICONV" = "yes"; then
  2253. dnl Reset LIBS temporarily as it may have already been included
  2254. dnl -liconv in.
  2255. LIBS_save="$LIBS"
  2256. LIBS=
  2257. AC_CHECK_FUNC(iconv, [
  2258. found_iconv=yes
  2259. ],[
  2260. AC_CHECK_FUNC(libiconv,[
  2261. PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
  2262. AC_DEFINE(HAVE_LIBICONV, 1, [ ])
  2263. found_iconv=yes
  2264. ])
  2265. ])
  2266. LIBS="$LIBS_save"
  2267. fi
  2268. dnl
  2269. dnl Check external libs for iconv funcs
  2270. dnl
  2271. if test "$found_iconv" = "no"; then
  2272. for i in $PHP_ICONV /usr/local /usr; do
  2273. if test -r $i/include/giconv.h; then
  2274. AC_DEFINE(HAVE_GICONV_H, 1, [ ])
  2275. ICONV_DIR=$i
  2276. iconv_lib_name=giconv
  2277. break
  2278. elif test -r $i/include/iconv.h; then
  2279. ICONV_DIR=$i
  2280. iconv_lib_name=iconv
  2281. break
  2282. fi
  2283. done
  2284. if test -z "$ICONV_DIR"; then
  2285. AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
  2286. fi
  2287. if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
  2288. test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
  2289. then
  2290. PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
  2291. found_iconv=yes
  2292. PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
  2293. AC_DEFINE(HAVE_LIBICONV,1,[ ])
  2294. PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
  2295. AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
  2296. ], [
  2297. PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
  2298. found_iconv=yes
  2299. ], [], [
  2300. -L$ICONV_DIR/$PHP_LIBDIR
  2301. ])
  2302. ], [
  2303. -L$ICONV_DIR/$PHP_LIBDIR
  2304. ])
  2305. fi
  2306. fi
  2307. if test "$found_iconv" = "yes"; then
  2308. PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
  2309. AC_DEFINE(HAVE_ICONV,1,[ ])
  2310. if test -n "$ICONV_DIR"; then
  2311. PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
  2312. PHP_ADD_INCLUDE($ICONV_DIR/include)
  2313. fi
  2314. $2
  2315. ifelse([$3],[],,[else $3])
  2316. fi
  2317. ])
  2318. dnl
  2319. dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
  2320. dnl
  2321. dnl Common setup macro for libxml
  2322. dnl
  2323. AC_DEFUN([PHP_SETUP_LIBXML], [
  2324. found_libxml=no
  2325. dnl First try to find xml2-config
  2326. AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
  2327. [
  2328. for i in $PHP_LIBXML_DIR /usr/local /usr; do
  2329. if test -x "$i/bin/xml2-config"; then
  2330. ac_cv_php_xml2_config_path="$i/bin/xml2-config"
  2331. break
  2332. fi
  2333. done
  2334. ])
  2335. if test -x "$ac_cv_php_xml2_config_path"; then
  2336. XML2_CONFIG="$ac_cv_php_xml2_config_path"
  2337. libxml_full_version=`$XML2_CONFIG --version`
  2338. ac_IFS=$IFS
  2339. IFS="."
  2340. set $libxml_full_version
  2341. IFS=$ac_IFS
  2342. LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
  2343. if test "$LIBXML_VERSION" -ge "2006011"; then
  2344. found_libxml=yes
  2345. LIBXML_LIBS=`$XML2_CONFIG --libs`
  2346. LIBXML_INCS=`$XML2_CONFIG --cflags`
  2347. else
  2348. AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
  2349. fi
  2350. fi
  2351. dnl If xml2-config fails, try pkg-config
  2352. if test "$found_libxml" = "no"; then
  2353. if test -z "$PKG_CONFIG"; then
  2354. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  2355. fi
  2356. dnl If pkg-config is found try using it
  2357. if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libxml-2.0; then
  2358. if $PKG_CONFIG --atleast-version=2.6.11 libxml-2.0; then
  2359. found_libxml=yes
  2360. LIBXML_LIBS=`$PKG_CONFIG --libs libxml-2.0`
  2361. LIBXML_INCS=`$PKG_CONFIG --cflags-only-I libxml-2.0`
  2362. else
  2363. AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
  2364. fi
  2365. fi
  2366. fi
  2367. if test "$found_libxml" = "yes"; then
  2368. PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
  2369. PHP_EVAL_INCLINE($LIBXML_INCS)
  2370. dnl Check that build works with given libs
  2371. AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
  2372. PHP_TEST_BUILD(xmlInitParser,
  2373. [
  2374. php_cv_libxml_build_works=yes
  2375. ], [
  2376. AC_MSG_RESULT(no)
  2377. AC_MSG_ERROR([build test failed. Please check the config.log for details.])
  2378. ], [
  2379. [$]$1
  2380. ])
  2381. ])
  2382. if test "$php_cv_libxml_build_works" = "yes"; then
  2383. AC_DEFINE(HAVE_LIBXML, 1, [ ])
  2384. fi
  2385. $2
  2386. ifelse([$3],[],,[else $3])
  2387. fi
  2388. ])
  2389. dnl -------------------------------------------------------------------------
  2390. dnl Misc. macros
  2391. dnl -------------------------------------------------------------------------
  2392. dnl
  2393. dnl PHP_INSTALL_HEADERS(path [, file ...])
  2394. dnl
  2395. dnl PHP header files to be installed
  2396. dnl
  2397. AC_DEFUN([PHP_INSTALL_HEADERS],[
  2398. ifelse([$2],[],[
  2399. for header_file in $1; do
  2400. PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
  2401. INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
  2402. ])
  2403. done
  2404. ], [
  2405. header_path=$1
  2406. for header_file in $2; do
  2407. hp_hf="$header_path/$header_file"
  2408. PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
  2409. INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
  2410. ])
  2411. done
  2412. ])
  2413. ])
  2414. dnl
  2415. dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
  2416. dnl
  2417. dnl This macro is used to get a comparable
  2418. dnl version for apache1/2.
  2419. dnl
  2420. AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
  2421. ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
  2422. ac_IFS=$IFS
  2423. IFS="- /.
  2424. "
  2425. set $ac_output
  2426. IFS=$ac_IFS
  2427. APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
  2428. ])
  2429. dnl
  2430. dnl PHP_DEBUG_MACRO(filename)
  2431. dnl
  2432. AC_DEFUN([PHP_DEBUG_MACRO],[
  2433. DEBUG_LOG=$1
  2434. cat >$1 <<X
  2435. CONFIGURE: $CONFIGURE_COMMAND
  2436. CC: $CC
  2437. CFLAGS: $CFLAGS
  2438. CPPFLAGS: $CPPFLAGS
  2439. CXX: $CXX
  2440. CXXFLAGS: $CXXFLAGS
  2441. INCLUDES: $INCLUDES
  2442. LDFLAGS: $LDFLAGS
  2443. LIBS: $LIBS
  2444. DLIBS: $DLIBS
  2445. SAPI: $PHP_SAPI
  2446. PHP_RPATHS: $PHP_RPATHS
  2447. uname -a: `uname -a`
  2448. X
  2449. cat >conftest.$ac_ext <<X
  2450. main()
  2451. {
  2452. exit(0);
  2453. }
  2454. X
  2455. (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
  2456. rm -fr conftest*
  2457. ])
  2458. dnl
  2459. dnl PHP_CONFIG_NICE(filename)
  2460. dnl
  2461. dnl Generates the config.nice file
  2462. dnl
  2463. AC_DEFUN([PHP_CONFIG_NICE],[
  2464. AC_REQUIRE([AC_PROG_EGREP])
  2465. AC_REQUIRE([LT_AC_PROG_SED])
  2466. PHP_SUBST_OLD(EGREP)
  2467. PHP_SUBST_OLD(SED)
  2468. test -f $1 && mv $1 $1.old
  2469. rm -f $1.old
  2470. cat >$1<<EOF
  2471. #! /bin/sh
  2472. #
  2473. # Created by configure
  2474. EOF
  2475. clean_configure_args=$ac_configure_args
  2476. for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
  2477. eval val=\$$var
  2478. if test -n "$val"; then
  2479. echo "$var='$val' \\" >> $1
  2480. if test `expr "X$ac_configure_args" : ".*${var}.*"` != 0; then
  2481. clean_configure_args=$(echo $clean_configure_args | sed -e "s#'$var=$val'##")
  2482. fi
  2483. fi
  2484. done
  2485. echo "'[$]0' \\" >> $1
  2486. if test `expr " [$]0" : " '.*"` = 0; then
  2487. CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
  2488. else
  2489. CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
  2490. fi
  2491. CONFIGURE_ARGS="$clean_configure_args"
  2492. while test "X$CONFIGURE_ARGS" != "X";
  2493. do
  2494. if CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\('[[^']]*'\)"`
  2495. then
  2496. CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *'[[^']]*' \(.*\)"`
  2497. elif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\([[^ ]]*\)"`
  2498. then
  2499. CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *[[^ ]]* \(.*\)"`
  2500. CURRENT_ARG="'$CURRENT_ARG'"
  2501. else
  2502. break
  2503. fi
  2504. $as_echo "$CURRENT_ARG \\" >>$1
  2505. CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
  2506. done
  2507. echo '"[$]@"' >> $1
  2508. chmod +x $1
  2509. CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
  2510. PHP_SUBST_OLD(CONFIGURE_COMMAND)
  2511. PHP_SUBST_OLD(CONFIGURE_OPTIONS)
  2512. ])
  2513. dnl
  2514. dnl PHP_CHECK_CONFIGURE_OPTIONS
  2515. dnl
  2516. AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
  2517. for arg in $ac_configure_args; do
  2518. case $arg in
  2519. --with-*[)]
  2520. arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
  2521. ;;
  2522. --without-*[)]
  2523. arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
  2524. ;;
  2525. --enable-*[)]
  2526. arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
  2527. ;;
  2528. --disable-*[)]
  2529. arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
  2530. ;;
  2531. *[)]
  2532. continue
  2533. ;;
  2534. esac
  2535. case $arg_name in
  2536. # Allow --disable-all / --enable-all
  2537. enable-all[)];;
  2538. # Allow certain libtool options
  2539. enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
  2540. # Allow certain TSRM options
  2541. with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads [)];;
  2542. # Allow certain Zend options
  2543. with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
  2544. # All the rest must be set using the PHP_ARG_* macros
  2545. # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
  2546. *[)]
  2547. # Options that exist before PHP 6
  2548. if test "$PHP_MAJOR_VERSION" -lt "6"; then
  2549. case $arg_name in
  2550. enable-zend-multibyte[)] continue;;
  2551. esac
  2552. fi
  2553. is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
  2554. if eval test "x\$$is_arg_set" = "x"; then
  2555. PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
  2556. [$]arg"
  2557. fi
  2558. ;;
  2559. esac
  2560. done
  2561. ])
  2562. dnl
  2563. dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
  2564. dnl
  2565. AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
  2566. AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
  2567. AC_MSG_CHECKING([for PDO includes])
  2568. if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
  2569. pdo_cv_inc_path=$abs_srcdir/ext
  2570. elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
  2571. pdo_cv_inc_path=$abs_srcdir/ext
  2572. elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
  2573. pdo_cv_inc_path=$phpincludedir/ext
  2574. fi
  2575. ])
  2576. if test -n "$pdo_cv_inc_path"; then
  2577. ifelse([$1],[],:,[$1])
  2578. else
  2579. ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
  2580. fi
  2581. ])
  2582. dnl
  2583. dnl PHP_DETECT_ICC
  2584. dnl Detect Intel C++ Compiler and unset $GCC if ICC found
  2585. AC_DEFUN([PHP_DETECT_ICC],
  2586. [
  2587. ICC="no"
  2588. AC_MSG_CHECKING([for icc])
  2589. AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
  2590. ICC="no"
  2591. AC_MSG_RESULT([no]),
  2592. ICC="yes"
  2593. GCC="no"
  2594. AC_MSG_RESULT([yes])
  2595. )
  2596. ])
  2597. dnl PHP_DETECT_SUNCC
  2598. dnl Detect if the systems default compiler is suncc.
  2599. dnl We also set some useful CFLAGS if the user didn't set any
  2600. AC_DEFUN([PHP_DETECT_SUNCC],[
  2601. SUNCC="no"
  2602. AC_MSG_CHECKING([for suncc])
  2603. AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
  2604. SUNCC="no"
  2605. AC_MSG_RESULT([no]),
  2606. SUNCC="yes"
  2607. GCC="no"
  2608. test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
  2609. GCC=""
  2610. AC_MSG_RESULT([yes])
  2611. )
  2612. ])
  2613. dnl
  2614. dnl PHP_CRYPT_R_STYLE
  2615. dnl detect the style of crypt_r() is any is available
  2616. dnl see APR_CHECK_CRYPT_R_STYLE() for original version
  2617. dnl
  2618. AC_DEFUN([PHP_CRYPT_R_STYLE],
  2619. [
  2620. AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
  2621. php_cv_crypt_r_style=none
  2622. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  2623. #define _REENTRANT 1
  2624. #include <crypt.h>
  2625. ]], [[
  2626. CRYPTD buffer;
  2627. crypt_r("passwd", "hash", &buffer);
  2628. ]])],[php_cv_crypt_r_style=cryptd],[])
  2629. if test "$php_cv_crypt_r_style" = "none"; then
  2630. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  2631. #define _REENTRANT 1
  2632. #include <crypt.h>
  2633. ]],[[
  2634. struct crypt_data buffer;
  2635. crypt_r("passwd", "hash", &buffer);
  2636. ]])],[php_cv_crypt_r_style=struct_crypt_data],[])
  2637. fi
  2638. if test "$php_cv_crypt_r_style" = "none"; then
  2639. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  2640. #define _REENTRANT 1
  2641. #define _GNU_SOURCE
  2642. #include <crypt.h>
  2643. ]],[[
  2644. struct crypt_data buffer;
  2645. crypt_r("passwd", "hash", &buffer);
  2646. ]])],[php_cv_crypt_r_style=struct_crypt_data_gnu_source],[])
  2647. fi
  2648. ])
  2649. if test "$php_cv_crypt_r_style" = "cryptd"; then
  2650. AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
  2651. fi
  2652. if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
  2653. AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
  2654. fi
  2655. if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
  2656. AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
  2657. fi
  2658. if test "$php_cv_crypt_r_style" = "none"; then
  2659. AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
  2660. fi
  2661. ])
  2662. dnl
  2663. dnl PHP_TEST_WRITE_STDOUT
  2664. dnl
  2665. AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
  2666. AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
  2667. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  2668. #ifdef HAVE_UNISTD_H
  2669. #include <unistd.h>
  2670. #endif
  2671. #define TEXT "This is the test message -- "
  2672. main()
  2673. {
  2674. int n;
  2675. n = write(1, TEXT, sizeof(TEXT)-1);
  2676. return (!(n == sizeof(TEXT)-1));
  2677. }
  2678. ]])],[
  2679. ac_cv_write_stdout=yes
  2680. ],[
  2681. ac_cv_write_stdout=no
  2682. ],[
  2683. ac_cv_write_stdout=no
  2684. ])
  2685. ])
  2686. if test "$ac_cv_write_stdout" = "yes"; then
  2687. AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
  2688. fi
  2689. ])
  2690. dnl
  2691. dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
  2692. dnl
  2693. AC_DEFUN([PHP_INIT_DTRACE],[
  2694. dnl Set paths properly when called from extension
  2695. case "$4" in
  2696. ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;;
  2697. /*[)] ac_srcdir=`echo "$4"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;;
  2698. *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$4/";;
  2699. esac
  2700. dnl providerdesc
  2701. ac_provsrc=$1
  2702. old_IFS=[$]IFS
  2703. IFS=.
  2704. set $ac_provsrc
  2705. ac_provobj=[$]1
  2706. IFS=$old_IFS
  2707. dnl header-file
  2708. ac_hdrobj=$2
  2709. dnl Add providerdesc.o or .lo into global objects when needed
  2710. case $host_alias in
  2711. *freebsd*)
  2712. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
  2713. PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
  2714. ;;
  2715. *solaris*)
  2716. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
  2717. ;;
  2718. *linux*)
  2719. PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
  2720. ;;
  2721. esac
  2722. dnl DTrace objects
  2723. old_IFS=[$]IFS
  2724. for ac_src in $3; do
  2725. IFS=.
  2726. set $ac_src
  2727. ac_obj=[$]1
  2728. IFS=$old_IFS
  2729. PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
  2730. done;
  2731. case [$]php_sapi_module in
  2732. shared[)]
  2733. for ac_lo in $PHP_DTRACE_OBJS; do
  2734. dtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
  2735. done;
  2736. ;;
  2737. *[)]
  2738. dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
  2739. ;;
  2740. esac
  2741. dnl Generate Makefile.objects entries
  2742. dnl The empty $ac_provsrc command stops an implicit circular dependency
  2743. dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
  2744. cat>>Makefile.objects<<EOF
  2745. $abs_srcdir/$ac_provsrc:;
  2746. $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
  2747. CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
  2748. \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
  2749. EOF
  2750. case $host_alias in
  2751. *solaris*|*linux*)
  2752. dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"
  2753. dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#'`/.libs"
  2754. dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#'`.o"
  2755. dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
  2756. for ac_lo in $PHP_DTRACE_OBJS; do
  2757. dtrace_lib_objs="[$]dtrace_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
  2758. done;
  2759. dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)
  2760. cat>>Makefile.objects<<EOF
  2761. $ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
  2762. echo "[#] Generated by Makefile for libtool" > \$[]@
  2763. @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
  2764. if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
  2765. echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
  2766. else [\\]
  2767. echo "pic_object='none'" >> \$[]@ [;\\]
  2768. fi
  2769. if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
  2770. echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
  2771. else [\\]
  2772. echo "non_pic_object='none'" >> \$[]@ [;\\]
  2773. fi
  2774. EOF
  2775. ;;
  2776. *)
  2777. cat>>Makefile.objects<<EOF
  2778. $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
  2779. CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
  2780. EOF
  2781. ;;
  2782. esac
  2783. ])
  2784. dnl
  2785. dnl PHP_CHECK_STDINT_TYPES
  2786. dnl
  2787. AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
  2788. AC_CHECK_SIZEOF([short], 2)
  2789. AC_CHECK_SIZEOF([int], 4)
  2790. AC_CHECK_SIZEOF([long], 4)
  2791. AC_CHECK_SIZEOF([long long], 8)
  2792. AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [
  2793. #if HAVE_STDINT_H
  2794. # include <stdint.h>
  2795. #endif
  2796. #if HAVE_SYS_TYPES_H
  2797. # include <sys/types.h>
  2798. #endif
  2799. ])
  2800. AC_DEFINE([PHP_HAVE_STDINT_TYPES], [1], [Checked for stdint types])
  2801. ])
  2802. dnl PHP_CHECK_BUILTIN_EXPECT
  2803. AC_DEFUN([PHP_CHECK_BUILTIN_EXPECT], [
  2804. AC_MSG_CHECKING([for __builtin_expect])
  2805. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2806. return __builtin_expect(1,1) ? 1 : 0;
  2807. ]])], [
  2808. have_builtin_expect=1
  2809. AC_MSG_RESULT([yes])
  2810. ], [
  2811. have_builtin_expect=0
  2812. AC_MSG_RESULT([no])
  2813. ])
  2814. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_EXPECT], [$have_builtin_expect], [Whether the compiler supports __builtin_expect])
  2815. ])
  2816. dnl PHP_CHECK_BUILTIN_CLZ
  2817. AC_DEFUN([PHP_CHECK_BUILTIN_CLZ], [
  2818. AC_MSG_CHECKING([for __builtin_clz])
  2819. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2820. return __builtin_clz(1) ? 1 : 0;
  2821. ]])], [
  2822. have_builtin_clz=1
  2823. AC_MSG_RESULT([yes])
  2824. ], [
  2825. have_builtin_clz=0
  2826. AC_MSG_RESULT([no])
  2827. ])
  2828. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CLZ], [$have_builtin_clz], [Whether the compiler supports __builtin_clz])
  2829. ])
  2830. dnl PHP_CHECK_BUILTIN_CTZL
  2831. AC_DEFUN([PHP_CHECK_BUILTIN_CTZL], [
  2832. AC_MSG_CHECKING([for __builtin_ctzl])
  2833. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2834. return __builtin_ctzl(2L) ? 1 : 0;
  2835. ]])], [
  2836. have_builtin_ctzl=1
  2837. AC_MSG_RESULT([yes])
  2838. ], [
  2839. have_builtin_ctzl=0
  2840. AC_MSG_RESULT([no])
  2841. ])
  2842. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZL], [$have_builtin_ctzl], [Whether the compiler supports __builtin_ctzl])
  2843. ])
  2844. dnl PHP_CHECK_BUILTIN_CTZLL
  2845. AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
  2846. AC_MSG_CHECKING([for __builtin_ctzll])
  2847. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2848. return __builtin_ctzll(2LL) ? 1 : 0;
  2849. ]])], [
  2850. have_builtin_ctzll=1
  2851. AC_MSG_RESULT([yes])
  2852. ], [
  2853. have_builtin_ctzll=0
  2854. AC_MSG_RESULT([no])
  2855. ])
  2856. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])
  2857. ])
  2858. dnl PHP_CHECK_BUILTIN_SMULL_OVERFLOW
  2859. AC_DEFUN([PHP_CHECK_BUILTIN_SMULL_OVERFLOW], [
  2860. AC_MSG_CHECKING([for __builtin_smull_overflow])
  2861. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2862. long tmpvar;
  2863. return __builtin_smull_overflow(3, 7, &tmpvar);
  2864. ]])], [
  2865. have_builtin_smull_overflow=1
  2866. AC_MSG_RESULT([yes])
  2867. ], [
  2868. have_builtin_smull_overflow=0
  2869. AC_MSG_RESULT([no])
  2870. ])
  2871. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULL_OVERFLOW],
  2872. [$have_builtin_smull_overflow], [Whether the compiler supports __builtin_smull_overflow])
  2873. ])
  2874. dnl PHP_CHECK_BUILTIN_SMULLL_OVERFLOW
  2875. AC_DEFUN([PHP_CHECK_BUILTIN_SMULLL_OVERFLOW], [
  2876. AC_MSG_CHECKING([for __builtin_smulll_overflow])
  2877. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2878. long long tmpvar;
  2879. return __builtin_smulll_overflow(3, 7, &tmpvar);
  2880. ]])], [
  2881. have_builtin_smulll_overflow=1
  2882. AC_MSG_RESULT([yes])
  2883. ], [
  2884. have_builtin_smulll_overflow=0
  2885. AC_MSG_RESULT([no])
  2886. ])
  2887. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SMULLL_OVERFLOW],
  2888. [$have_builtin_smulll_overflow], [Whether the compiler supports __builtin_smulll_overflow])
  2889. ])
  2890. dnl PHP_CHECK_BUILTIN_SADDL_OVERFLOW
  2891. AC_DEFUN([PHP_CHECK_BUILTIN_SADDL_OVERFLOW], [
  2892. AC_MSG_CHECKING([for __builtin_saddl_overflow])
  2893. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2894. long tmpvar;
  2895. return __builtin_saddl_overflow(3, 7, &tmpvar);
  2896. ]])], [
  2897. have_builtin_saddl_overflow=1
  2898. AC_MSG_RESULT([yes])
  2899. ], [
  2900. have_builtin_saddl_overflow=0
  2901. AC_MSG_RESULT([no])
  2902. ])
  2903. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDL_OVERFLOW],
  2904. [$have_builtin_saddl_overflow], [Whether the compiler supports __builtin_saddl_overflow])
  2905. ])
  2906. dnl PHP_CHECK_BUILTIN_SADDLL_OVERFLOW
  2907. AC_DEFUN([PHP_CHECK_BUILTIN_SADDLL_OVERFLOW], [
  2908. AC_MSG_CHECKING([for __builtin_saddll_overflow])
  2909. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2910. long long tmpvar;
  2911. return __builtin_saddll_overflow(3, 7, &tmpvar);
  2912. ]])], [
  2913. have_builtin_saddll_overflow=1
  2914. AC_MSG_RESULT([yes])
  2915. ], [
  2916. have_builtin_saddll_overflow=0
  2917. AC_MSG_RESULT([no])
  2918. ])
  2919. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SADDLL_OVERFLOW],
  2920. [$have_builtin_saddll_overflow], [Whether the compiler supports __builtin_saddll_overflow])
  2921. ])
  2922. dnl PHP_CHECK_BUILTIN_SSUBL_OVERFLOW
  2923. AC_DEFUN([PHP_CHECK_BUILTIN_SSUBL_OVERFLOW], [
  2924. AC_MSG_CHECKING([for __builtin_ssubl_overflow])
  2925. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2926. long tmpvar;
  2927. return __builtin_ssubl_overflow(3, 7, &tmpvar);
  2928. ]])], [
  2929. have_builtin_ssubl_overflow=1
  2930. AC_MSG_RESULT([yes])
  2931. ], [
  2932. have_builtin_ssubl_overflow=0
  2933. AC_MSG_RESULT([no])
  2934. ])
  2935. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBL_OVERFLOW],
  2936. [$have_builtin_ssubl_overflow], [Whether the compiler supports __builtin_ssubl_overflow])
  2937. ])
  2938. dnl PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW
  2939. AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [
  2940. AC_MSG_CHECKING([for __builtin_ssubll_overflow])
  2941. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2942. long long tmpvar;
  2943. return __builtin_ssubll_overflow(3, 7, &tmpvar);
  2944. ]])], [
  2945. have_builtin_ssubll_overflow=1
  2946. AC_MSG_RESULT([yes])
  2947. ], [
  2948. have_builtin_ssubll_overflow=0
  2949. AC_MSG_RESULT([no])
  2950. ])
  2951. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_SSUBLL_OVERFLOW],
  2952. [$have_builtin_ssubll_overflow], [Whether the compiler supports __builtin_ssubll_overflow])
  2953. ])
  2954. dnl PHP_CHECK_BUILTIN_CPU_INIT
  2955. AC_DEFUN([PHP_CHECK_BUILTIN_CPU_INIT], [
  2956. AC_MSG_CHECKING([for __builtin_cpu_init])
  2957. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2958. return __builtin_cpu_init()? 1 : 0;
  2959. ]])], [
  2960. have_builtin_cpu_init=1
  2961. AC_MSG_RESULT([yes])
  2962. ], [
  2963. have_builtin_cpu_init=0
  2964. AC_MSG_RESULT([no])
  2965. ])
  2966. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_INIT],
  2967. [$have_builtin_cpu_init], [Whether the compiler supports __builtin_cpu_init])
  2968. ])
  2969. dnl PHP_CHECK_BUILTIN_CPU_SUPPORTS
  2970. AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [
  2971. AC_MSG_CHECKING([for __builtin_cpu_supports])
  2972. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[
  2973. return __builtin_cpu_supports("sse")? 1 : 0;
  2974. ]])], [
  2975. have_builtin_cpu_supports=1
  2976. AC_MSG_RESULT([yes])
  2977. ], [
  2978. have_builtin_cpu_supports=0
  2979. AC_MSG_RESULT([no])
  2980. ])
  2981. AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CPU_SUPPORTS],
  2982. [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports])
  2983. ])
  2984. dnl PHP_CHECK_CPU_SUPPORTS
  2985. AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [
  2986. AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT])
  2987. AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS])
  2988. have_ext_instructions=0
  2989. if test $have_builtin_cpu_supports = 1; then
  2990. AC_MSG_CHECKING([for $1 instructions supports])
  2991. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  2992. int main() {
  2993. return __builtin_cpu_supports("$1")? 0 : 1;
  2994. }
  2995. ]])], [
  2996. have_ext_instructions=1
  2997. AC_MSG_RESULT([yes])
  2998. ], [
  2999. AC_MSG_RESULT([no])
  3000. ], [AC_MSG_RESULT([no])])
  3001. fi
  3002. AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]),
  3003. [$have_ext_instructions], [Whether the compiler supports $1 instructions])
  3004. ])
  3005. dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
  3006. m4_include([build/ax_check_compile_flag.m4])
  3007. m4_include([build/ax_gcc_func_attribute.m4])
  3008. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  3009. #
  3010. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  3011. # Written by Gordon Matzigkeit, 1996
  3012. #
  3013. # This file is free software; the Free Software Foundation gives
  3014. # unlimited permission to copy and/or distribute it, with or without
  3015. # modifications, as long as this notice is preserved.
  3016. m4_define([_LT_COPYING], [dnl
  3017. # Copyright (C) 2014 Free Software Foundation, Inc.
  3018. # This is free software; see the source for copying conditions. There is NO
  3019. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  3020. # GNU Libtool is free software; you can redistribute it and/or modify
  3021. # it under the terms of the GNU General Public License as published by
  3022. # the Free Software Foundation; either version 2 of of the License, or
  3023. # (at your option) any later version.
  3024. #
  3025. # As a special exception to the GNU General Public License, if you
  3026. # distribute this file as part of a program or library that is built
  3027. # using GNU Libtool, you may include this file under the same
  3028. # distribution terms that you use for the rest of that program.
  3029. #
  3030. # GNU Libtool is distributed in the hope that it will be useful, but
  3031. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3032. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3033. # GNU General Public License for more details.
  3034. #
  3035. # You should have received a copy of the GNU General Public License
  3036. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  3037. ])
  3038. # serial 58 LT_INIT
  3039. # LT_PREREQ(VERSION)
  3040. # ------------------
  3041. # Complain and exit if this libtool version is less that VERSION.
  3042. m4_defun([LT_PREREQ],
  3043. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  3044. [m4_default([$3],
  3045. [m4_fatal([Libtool version $1 or higher is required],
  3046. 63)])],
  3047. [$2])])
  3048. # _LT_CHECK_BUILDDIR
  3049. # ------------------
  3050. # Complain if the absolute build directory name contains unusual characters
  3051. m4_defun([_LT_CHECK_BUILDDIR],
  3052. [case `pwd` in
  3053. *\ * | *\ *)
  3054. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  3055. esac
  3056. ])
  3057. # LT_INIT([OPTIONS])
  3058. # ------------------
  3059. AC_DEFUN([LT_INIT],
  3060. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  3061. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  3062. AC_BEFORE([$0], [LT_LANG])dnl
  3063. AC_BEFORE([$0], [LT_OUTPUT])dnl
  3064. AC_BEFORE([$0], [LTDL_INIT])dnl
  3065. m4_require([_LT_CHECK_BUILDDIR])dnl
  3066. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  3067. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  3068. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  3069. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  3070. dnl unless we require an AC_DEFUNed macro:
  3071. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  3072. AC_REQUIRE([LTSUGAR_VERSION])dnl
  3073. AC_REQUIRE([LTVERSION_VERSION])dnl
  3074. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  3075. m4_require([_LT_PROG_LTMAIN])dnl
  3076. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  3077. dnl Parse OPTIONS
  3078. _LT_SET_OPTIONS([$0], [$1])
  3079. # This can be used to rebuild libtool when needed
  3080. LIBTOOL_DEPS=$ltmain
  3081. # Always use our own libtool.
  3082. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  3083. AC_SUBST(LIBTOOL)dnl
  3084. _LT_SETUP
  3085. # Only expand once:
  3086. m4_define([LT_INIT])
  3087. ])# LT_INIT
  3088. # Old names:
  3089. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  3090. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  3091. dnl aclocal-1.4 backwards compatibility:
  3092. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  3093. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  3094. # _LT_PREPARE_CC_BASENAME
  3095. # -----------------------
  3096. m4_defun([_LT_PREPARE_CC_BASENAME], [
  3097. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  3098. func_cc_basename ()
  3099. {
  3100. for cc_temp in @S|@*""; do
  3101. case $cc_temp in
  3102. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  3103. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  3104. \-*) ;;
  3105. *) break;;
  3106. esac
  3107. done
  3108. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  3109. }
  3110. ])# _LT_PREPARE_CC_BASENAME
  3111. # _LT_CC_BASENAME(CC)
  3112. # -------------------
  3113. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  3114. # but that macro is also expanded into generated libtool script, which
  3115. # arranges for $SED and $ECHO to be set by different means.
  3116. m4_defun([_LT_CC_BASENAME],
  3117. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  3118. AC_REQUIRE([_LT_DECL_SED])dnl
  3119. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  3120. func_cc_basename $1
  3121. cc_basename=$func_cc_basename_result
  3122. ])
  3123. # _LT_FILEUTILS_DEFAULTS
  3124. # ----------------------
  3125. # It is okay to use these file commands and assume they have been set
  3126. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  3127. m4_defun([_LT_FILEUTILS_DEFAULTS],
  3128. [: ${CP="cp -f"}
  3129. : ${MV="mv -f"}
  3130. : ${RM="rm -f"}
  3131. ])# _LT_FILEUTILS_DEFAULTS
  3132. # _LT_SETUP
  3133. # ---------
  3134. m4_defun([_LT_SETUP],
  3135. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3136. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3137. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  3138. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  3139. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  3140. dnl
  3141. _LT_DECL([], [host_alias], [0], [The host system])dnl
  3142. _LT_DECL([], [host], [0])dnl
  3143. _LT_DECL([], [host_os], [0])dnl
  3144. dnl
  3145. _LT_DECL([], [build_alias], [0], [The build system])dnl
  3146. _LT_DECL([], [build], [0])dnl
  3147. _LT_DECL([], [build_os], [0])dnl
  3148. dnl
  3149. AC_REQUIRE([AC_PROG_CC])dnl
  3150. AC_REQUIRE([LT_PATH_LD])dnl
  3151. AC_REQUIRE([LT_PATH_NM])dnl
  3152. dnl
  3153. AC_REQUIRE([AC_PROG_LN_S])dnl
  3154. test -z "$LN_S" && LN_S="ln -s"
  3155. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  3156. dnl
  3157. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  3158. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  3159. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  3160. dnl
  3161. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3162. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  3163. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  3164. m4_require([_LT_CMD_RELOAD])dnl
  3165. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  3166. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  3167. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  3168. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  3169. m4_require([_LT_WITH_SYSROOT])dnl
  3170. m4_require([_LT_CMD_TRUNCATE])dnl
  3171. _LT_CONFIG_LIBTOOL_INIT([
  3172. # See if we are running on zsh, and set the options that allow our
  3173. # commands through without removal of \ escapes INIT.
  3174. if test -n "\${ZSH_VERSION+set}"; then
  3175. setopt NO_GLOB_SUBST
  3176. fi
  3177. ])
  3178. if test -n "${ZSH_VERSION+set}"; then
  3179. setopt NO_GLOB_SUBST
  3180. fi
  3181. _LT_CHECK_OBJDIR
  3182. m4_require([_LT_TAG_COMPILER])dnl
  3183. case $host_os in
  3184. aix3*)
  3185. # AIX sometimes has problems with the GCC collect2 program. For some
  3186. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3187. # vanish in a puff of smoke.
  3188. if test set != "${COLLECT_NAMES+set}"; then
  3189. COLLECT_NAMES=
  3190. export COLLECT_NAMES
  3191. fi
  3192. ;;
  3193. esac
  3194. # Global variables:
  3195. ofile=libtool
  3196. can_build_shared=yes
  3197. # All known linkers require a '.a' archive for static linking (except MSVC,
  3198. # which needs '.lib').
  3199. libext=a
  3200. with_gnu_ld=$lt_cv_prog_gnu_ld
  3201. old_CC=$CC
  3202. old_CFLAGS=$CFLAGS
  3203. # Set sane defaults for various variables
  3204. test -z "$CC" && CC=cc
  3205. test -z "$LTCC" && LTCC=$CC
  3206. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  3207. test -z "$LD" && LD=ld
  3208. test -z "$ac_objext" && ac_objext=o
  3209. _LT_CC_BASENAME([$compiler])
  3210. # Only perform the check for file, if the check method requires it
  3211. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  3212. case $deplibs_check_method in
  3213. file_magic*)
  3214. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  3215. _LT_PATH_MAGIC
  3216. fi
  3217. ;;
  3218. esac
  3219. # Use C for the default configuration in the libtool script
  3220. LT_SUPPORTED_TAG([CC])
  3221. _LT_LANG_C_CONFIG
  3222. _LT_LANG_DEFAULT_CONFIG
  3223. _LT_CONFIG_COMMANDS
  3224. ])# _LT_SETUP
  3225. # _LT_PREPARE_SED_QUOTE_VARS
  3226. # --------------------------
  3227. # Define a few sed substitution that help us do robust quoting.
  3228. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  3229. [# Backslashify metacharacters that are still active within
  3230. # double-quoted strings.
  3231. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  3232. # Same as above, but do not quote variable references.
  3233. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  3234. # Sed substitution to delay expansion of an escaped shell variable in a
  3235. # double_quote_subst'ed string.
  3236. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  3237. # Sed substitution to delay expansion of an escaped single quote.
  3238. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  3239. # Sed substitution to avoid accidental globbing in evaled expressions
  3240. no_glob_subst='s/\*/\\\*/g'
  3241. ])
  3242. # _LT_PROG_LTMAIN
  3243. # ---------------
  3244. # Note that this code is called both from 'configure', and 'config.status'
  3245. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  3246. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  3247. # so we pass a copy along to make sure it has a sensible value anyway.
  3248. m4_defun([_LT_PROG_LTMAIN],
  3249. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  3250. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  3251. ltmain=$ac_aux_dir/ltmain.sh
  3252. ])# _LT_PROG_LTMAIN
  3253. ## ------------------------------------- ##
  3254. ## Accumulate code for creating libtool. ##
  3255. ## ------------------------------------- ##
  3256. # So that we can recreate a full libtool script including additional
  3257. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  3258. # in macros and then make a single call at the end using the 'libtool'
  3259. # label.
  3260. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  3261. # ----------------------------------------
  3262. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  3263. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  3264. [m4_ifval([$1],
  3265. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  3266. [$1
  3267. ])])])
  3268. # Initialize.
  3269. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  3270. # _LT_CONFIG_LIBTOOL([COMMANDS])
  3271. # ------------------------------
  3272. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  3273. m4_define([_LT_CONFIG_LIBTOOL],
  3274. [m4_ifval([$1],
  3275. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  3276. [$1
  3277. ])])])
  3278. # Initialize.
  3279. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  3280. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  3281. # -----------------------------------------------------
  3282. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  3283. [_LT_CONFIG_LIBTOOL([$1])
  3284. _LT_CONFIG_LIBTOOL_INIT([$2])
  3285. ])
  3286. # _LT_FORMAT_COMMENT([COMMENT])
  3287. # -----------------------------
  3288. # Add leading comment marks to the start of each line, and a trailing
  3289. # full-stop to the whole comment if one is not present already.
  3290. m4_define([_LT_FORMAT_COMMENT],
  3291. [m4_ifval([$1], [
  3292. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  3293. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  3294. )])
  3295. ## ------------------------ ##
  3296. ## FIXME: Eliminate VARNAME ##
  3297. ## ------------------------ ##
  3298. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  3299. # -------------------------------------------------------------------
  3300. # CONFIGNAME is the name given to the value in the libtool script.
  3301. # VARNAME is the (base) name used in the configure script.
  3302. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  3303. # VARNAME. Any other value will be used directly.
  3304. m4_define([_LT_DECL],
  3305. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  3306. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  3307. [m4_ifval([$1], [$1], [$2])])
  3308. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  3309. m4_ifval([$4],
  3310. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  3311. lt_dict_add_subkey([lt_decl_dict], [$2],
  3312. [tagged?], [m4_ifval([$5], [yes], [no])])])
  3313. ])
  3314. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  3315. # --------------------------------------------------------
  3316. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  3317. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  3318. # ------------------------------------------------
  3319. m4_define([lt_decl_tag_varnames],
  3320. [_lt_decl_filter([tagged?], [yes], $@)])
  3321. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  3322. # ---------------------------------------------------------
  3323. m4_define([_lt_decl_filter],
  3324. [m4_case([$#],
  3325. [0], [m4_fatal([$0: too few arguments: $#])],
  3326. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  3327. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  3328. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  3329. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  3330. ])
  3331. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  3332. # --------------------------------------------------
  3333. m4_define([lt_decl_quote_varnames],
  3334. [_lt_decl_filter([value], [1], $@)])
  3335. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  3336. # ---------------------------------------------------
  3337. m4_define([lt_decl_dquote_varnames],
  3338. [_lt_decl_filter([value], [2], $@)])
  3339. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  3340. # ---------------------------------------------------
  3341. m4_define([lt_decl_varnames_tagged],
  3342. [m4_assert([$# <= 2])dnl
  3343. _$0(m4_quote(m4_default([$1], [[, ]])),
  3344. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  3345. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  3346. m4_define([_lt_decl_varnames_tagged],
  3347. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  3348. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  3349. # ------------------------------------------------
  3350. m4_define([lt_decl_all_varnames],
  3351. [_$0(m4_quote(m4_default([$1], [[, ]])),
  3352. m4_if([$2], [],
  3353. m4_quote(lt_decl_varnames),
  3354. m4_quote(m4_shift($@))))[]dnl
  3355. ])
  3356. m4_define([_lt_decl_all_varnames],
  3357. [lt_join($@, lt_decl_varnames_tagged([$1],
  3358. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  3359. ])
  3360. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  3361. # ------------------------------------
  3362. # Quote a variable value, and forward it to 'config.status' so that its
  3363. # declaration there will have the same value as in 'configure'. VARNAME
  3364. # must have a single quote delimited value for this to work.
  3365. m4_define([_LT_CONFIG_STATUS_DECLARE],
  3366. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  3367. # _LT_CONFIG_STATUS_DECLARATIONS
  3368. # ------------------------------
  3369. # We delimit libtool config variables with single quotes, so when
  3370. # we write them to config.status, we have to be sure to quote all
  3371. # embedded single quotes properly. In configure, this macro expands
  3372. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  3373. #
  3374. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  3375. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  3376. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  3377. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  3378. # _LT_LIBTOOL_TAGS
  3379. # ----------------
  3380. # Output comment and list of tags supported by the script
  3381. m4_defun([_LT_LIBTOOL_TAGS],
  3382. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  3383. available_tags='_LT_TAGS'dnl
  3384. ])
  3385. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  3386. # -----------------------------------
  3387. # Extract the dictionary values for VARNAME (optionally with TAG) and
  3388. # expand to a commented shell variable setting:
  3389. #
  3390. # # Some comment about what VAR is for.
  3391. # visible_name=$lt_internal_name
  3392. m4_define([_LT_LIBTOOL_DECLARE],
  3393. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  3394. [description])))[]dnl
  3395. m4_pushdef([_libtool_name],
  3396. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  3397. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  3398. [0], [_libtool_name=[$]$1],
  3399. [1], [_libtool_name=$lt_[]$1],
  3400. [2], [_libtool_name=$lt_[]$1],
  3401. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  3402. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  3403. ])
  3404. # _LT_LIBTOOL_CONFIG_VARS
  3405. # -----------------------
  3406. # Produce commented declarations of non-tagged libtool config variables
  3407. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  3408. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  3409. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  3410. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  3411. [m4_foreach([_lt_var],
  3412. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  3413. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  3414. # _LT_LIBTOOL_TAG_VARS(TAG)
  3415. # -------------------------
  3416. m4_define([_LT_LIBTOOL_TAG_VARS],
  3417. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  3418. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  3419. # _LT_TAGVAR(VARNAME, [TAGNAME])
  3420. # ------------------------------
  3421. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  3422. # _LT_CONFIG_COMMANDS
  3423. # -------------------
  3424. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  3425. # variables for single and double quote escaping we saved from calls
  3426. # to _LT_DECL, we can put quote escaped variables declarations
  3427. # into 'config.status', and then the shell code to quote escape them in
  3428. # for loops in 'config.status'. Finally, any additional code accumulated
  3429. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  3430. m4_defun([_LT_CONFIG_COMMANDS],
  3431. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  3432. dnl If the libtool generation code has been placed in $CONFIG_LT,
  3433. dnl instead of duplicating it all over again into config.status,
  3434. dnl then we will have config.status run $CONFIG_LT later, so it
  3435. dnl needs to know what name is stored there:
  3436. [AC_CONFIG_COMMANDS([libtool],
  3437. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  3438. dnl If the libtool generation code is destined for config.status,
  3439. dnl expand the accumulated commands and init code now:
  3440. [AC_CONFIG_COMMANDS([libtool],
  3441. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  3442. ])#_LT_CONFIG_COMMANDS
  3443. # Initialize.
  3444. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  3445. [
  3446. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3447. # if CDPATH is set.
  3448. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3449. sed_quote_subst='$sed_quote_subst'
  3450. double_quote_subst='$double_quote_subst'
  3451. delay_variable_subst='$delay_variable_subst'
  3452. _LT_CONFIG_STATUS_DECLARATIONS
  3453. LTCC='$LTCC'
  3454. LTCFLAGS='$LTCFLAGS'
  3455. compiler='$compiler_DEFAULT'
  3456. # A function that is used when there is no print builtin or printf.
  3457. func_fallback_echo ()
  3458. {
  3459. eval 'cat <<_LTECHO_EOF
  3460. \$[]1
  3461. _LTECHO_EOF'
  3462. }
  3463. # Quote evaled strings.
  3464. for var in lt_decl_all_varnames([[ \
  3465. ]], lt_decl_quote_varnames); do
  3466. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  3467. *[[\\\\\\\`\\"\\\$]]*)
  3468. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  3469. ;;
  3470. *)
  3471. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  3472. ;;
  3473. esac
  3474. done
  3475. # Double-quote double-evaled strings.
  3476. for var in lt_decl_all_varnames([[ \
  3477. ]], lt_decl_dquote_varnames); do
  3478. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  3479. *[[\\\\\\\`\\"\\\$]]*)
  3480. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  3481. ;;
  3482. *)
  3483. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  3484. ;;
  3485. esac
  3486. done
  3487. _LT_OUTPUT_LIBTOOL_INIT
  3488. ])
  3489. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  3490. # ------------------------------------
  3491. # Generate a child script FILE with all initialization necessary to
  3492. # reuse the environment learned by the parent script, and make the
  3493. # file executable. If COMMENT is supplied, it is inserted after the
  3494. # '#!' sequence but before initialization text begins. After this
  3495. # macro, additional text can be appended to FILE to form the body of
  3496. # the child script. The macro ends with non-zero status if the
  3497. # file could not be fully written (such as if the disk is full).
  3498. m4_ifdef([AS_INIT_GENERATED],
  3499. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  3500. [m4_defun([_LT_GENERATED_FILE_INIT],
  3501. [m4_require([AS_PREPARE])]dnl
  3502. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  3503. [lt_write_fail=0
  3504. cat >$1 <<_ASEOF || lt_write_fail=1
  3505. #! $SHELL
  3506. # Generated by $as_me.
  3507. $2
  3508. SHELL=\${CONFIG_SHELL-$SHELL}
  3509. export SHELL
  3510. _ASEOF
  3511. cat >>$1 <<\_ASEOF || lt_write_fail=1
  3512. AS_SHELL_SANITIZE
  3513. _AS_PREPARE
  3514. exec AS_MESSAGE_FD>&1
  3515. _ASEOF
  3516. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  3517. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  3518. # LT_OUTPUT
  3519. # ---------
  3520. # This macro allows early generation of the libtool script (before
  3521. # AC_OUTPUT is called), incase it is used in configure for compilation
  3522. # tests.
  3523. AC_DEFUN([LT_OUTPUT],
  3524. [: ${CONFIG_LT=./config.lt}
  3525. AC_MSG_NOTICE([creating $CONFIG_LT])
  3526. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  3527. [# Run this file to recreate a libtool stub with the current configuration.])
  3528. cat >>"$CONFIG_LT" <<\_LTEOF
  3529. lt_cl_silent=false
  3530. exec AS_MESSAGE_LOG_FD>>config.log
  3531. {
  3532. echo
  3533. AS_BOX([Running $as_me.])
  3534. } >&AS_MESSAGE_LOG_FD
  3535. lt_cl_help="\
  3536. '$as_me' creates a local libtool stub from the current configuration,
  3537. for use in further configure time tests before the real libtool is
  3538. generated.
  3539. Usage: $[0] [[OPTIONS]]
  3540. -h, --help print this help, then exit
  3541. -V, --version print version number, then exit
  3542. -q, --quiet do not print progress messages
  3543. -d, --debug don't remove temporary files
  3544. Report bugs to <bug-libtool@gnu.org>."
  3545. lt_cl_version="\
  3546. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  3547. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  3548. configured by $[0], generated by m4_PACKAGE_STRING.
  3549. Copyright (C) 2011 Free Software Foundation, Inc.
  3550. This config.lt script is free software; the Free Software Foundation
  3551. gives unlimited permision to copy, distribute and modify it."
  3552. while test 0 != $[#]
  3553. do
  3554. case $[1] in
  3555. --version | --v* | -V )
  3556. echo "$lt_cl_version"; exit 0 ;;
  3557. --help | --h* | -h )
  3558. echo "$lt_cl_help"; exit 0 ;;
  3559. --debug | --d* | -d )
  3560. debug=: ;;
  3561. --quiet | --q* | --silent | --s* | -q )
  3562. lt_cl_silent=: ;;
  3563. -*) AC_MSG_ERROR([unrecognized option: $[1]
  3564. Try '$[0] --help' for more information.]) ;;
  3565. *) AC_MSG_ERROR([unrecognized argument: $[1]
  3566. Try '$[0] --help' for more information.]) ;;
  3567. esac
  3568. shift
  3569. done
  3570. if $lt_cl_silent; then
  3571. exec AS_MESSAGE_FD>/dev/null
  3572. fi
  3573. _LTEOF
  3574. cat >>"$CONFIG_LT" <<_LTEOF
  3575. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  3576. _LTEOF
  3577. cat >>"$CONFIG_LT" <<\_LTEOF
  3578. AC_MSG_NOTICE([creating $ofile])
  3579. _LT_OUTPUT_LIBTOOL_COMMANDS
  3580. AS_EXIT(0)
  3581. _LTEOF
  3582. chmod +x "$CONFIG_LT"
  3583. # configure is writing to config.log, but config.lt does its own redirection,
  3584. # appending to config.log, which fails on DOS, as config.log is still kept
  3585. # open by configure. Here we exec the FD to /dev/null, effectively closing
  3586. # config.log, so it can be properly (re)opened and appended to by config.lt.
  3587. lt_cl_success=:
  3588. test yes = "$silent" &&
  3589. lt_config_lt_args="$lt_config_lt_args --quiet"
  3590. exec AS_MESSAGE_LOG_FD>/dev/null
  3591. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  3592. exec AS_MESSAGE_LOG_FD>>config.log
  3593. $lt_cl_success || AS_EXIT(1)
  3594. ])# LT_OUTPUT
  3595. # _LT_CONFIG(TAG)
  3596. # ---------------
  3597. # If TAG is the built-in tag, create an initial libtool script with a
  3598. # default configuration from the untagged config vars. Otherwise add code
  3599. # to config.status for appending the configuration named by TAG from the
  3600. # matching tagged config vars.
  3601. m4_defun([_LT_CONFIG],
  3602. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3603. _LT_CONFIG_SAVE_COMMANDS([
  3604. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  3605. m4_if(_LT_TAG, [C], [
  3606. # See if we are running on zsh, and set the options that allow our
  3607. # commands through without removal of \ escapes.
  3608. if test -n "${ZSH_VERSION+set}"; then
  3609. setopt NO_GLOB_SUBST
  3610. fi
  3611. cfgfile=${ofile}T
  3612. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  3613. $RM "$cfgfile"
  3614. cat <<_LT_EOF >> "$cfgfile"
  3615. #! $SHELL
  3616. # Generated automatically by $as_me ($PACKAGE) $VERSION
  3617. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3618. # Provide generalized library-building support services.
  3619. # Written by Gordon Matzigkeit, 1996
  3620. _LT_COPYING
  3621. _LT_LIBTOOL_TAGS
  3622. # Configured defaults for sys_lib_dlsearch_path munging.
  3623. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  3624. # ### BEGIN LIBTOOL CONFIG
  3625. _LT_LIBTOOL_CONFIG_VARS
  3626. _LT_LIBTOOL_TAG_VARS
  3627. # ### END LIBTOOL CONFIG
  3628. _LT_EOF
  3629. cat <<'_LT_EOF' >> "$cfgfile"
  3630. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  3631. _LT_PREPARE_MUNGE_PATH_LIST
  3632. _LT_PREPARE_CC_BASENAME
  3633. # ### END FUNCTIONS SHARED WITH CONFIGURE
  3634. _LT_EOF
  3635. case $host_os in
  3636. aix3*)
  3637. cat <<\_LT_EOF >> "$cfgfile"
  3638. # AIX sometimes has problems with the GCC collect2 program. For some
  3639. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3640. # vanish in a puff of smoke.
  3641. if test set != "${COLLECT_NAMES+set}"; then
  3642. COLLECT_NAMES=
  3643. export COLLECT_NAMES
  3644. fi
  3645. _LT_EOF
  3646. ;;
  3647. esac
  3648. _LT_PROG_LTMAIN
  3649. # We use sed instead of cat because bash on DJGPP gets confused if
  3650. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3651. # text mode, it properly converts lines to CR/LF. This bash problem
  3652. # is reportedly fixed, but why not run on old versions too?
  3653. sed '$q' "$ltmain" >> "$cfgfile" \
  3654. || (rm -f "$cfgfile"; exit 1)
  3655. mv -f "$cfgfile" "$ofile" ||
  3656. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3657. chmod +x "$ofile"
  3658. ],
  3659. [cat <<_LT_EOF >> "$ofile"
  3660. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  3661. dnl in a comment (ie after a #).
  3662. # ### BEGIN LIBTOOL TAG CONFIG: $1
  3663. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  3664. # ### END LIBTOOL TAG CONFIG: $1
  3665. _LT_EOF
  3666. ])dnl /m4_if
  3667. ],
  3668. [m4_if([$1], [], [
  3669. PACKAGE='$PACKAGE'
  3670. VERSION='$VERSION'
  3671. RM='$RM'
  3672. ofile='$ofile'], [])
  3673. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  3674. ])# _LT_CONFIG
  3675. # LT_SUPPORTED_TAG(TAG)
  3676. # ---------------------
  3677. # Trace this macro to discover what tags are supported by the libtool
  3678. # --tag option, using:
  3679. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  3680. AC_DEFUN([LT_SUPPORTED_TAG], [])
  3681. # C support is built-in for now
  3682. m4_define([_LT_LANG_C_enabled], [])
  3683. m4_define([_LT_TAGS], [])
  3684. # LT_LANG(LANG)
  3685. # -------------
  3686. # Enable libtool support for the given language if not already enabled.
  3687. AC_DEFUN([LT_LANG],
  3688. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  3689. m4_case([$1],
  3690. [C], [_LT_LANG(C)],
  3691. [C++], [_LT_LANG(CXX)],
  3692. [Go], [_LT_LANG(GO)],
  3693. [Java], [_LT_LANG(GCJ)],
  3694. [Fortran 77], [_LT_LANG(F77)],
  3695. [Fortran], [_LT_LANG(FC)],
  3696. [Windows Resource], [_LT_LANG(RC)],
  3697. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  3698. [_LT_LANG($1)],
  3699. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  3700. ])# LT_LANG
  3701. # _LT_LANG(LANGNAME)
  3702. # ------------------
  3703. m4_defun([_LT_LANG],
  3704. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  3705. [LT_SUPPORTED_TAG([$1])dnl
  3706. m4_append([_LT_TAGS], [$1 ])dnl
  3707. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  3708. _LT_LANG_$1_CONFIG($1)])dnl
  3709. ])# _LT_LANG
  3710. m4_ifndef([AC_PROG_GO], [
  3711. ############################################################
  3712. # NOTE: This macro has been submitted for inclusion into #
  3713. # GNU Autoconf as AC_PROG_GO. When it is available in #
  3714. # a released version of Autoconf we should remove this #
  3715. # macro and use it instead. #
  3716. ############################################################
  3717. m4_defun([AC_PROG_GO],
  3718. [AC_LANG_PUSH(Go)dnl
  3719. AC_ARG_VAR([GOC], [Go compiler command])dnl
  3720. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  3721. _AC_ARG_VAR_LDFLAGS()dnl
  3722. AC_CHECK_TOOL(GOC, gccgo)
  3723. if test -z "$GOC"; then
  3724. if test -n "$ac_tool_prefix"; then
  3725. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  3726. fi
  3727. fi
  3728. if test -z "$GOC"; then
  3729. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  3730. fi
  3731. ])#m4_defun
  3732. ])#m4_ifndef
  3733. # _LT_LANG_DEFAULT_CONFIG
  3734. # -----------------------
  3735. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  3736. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  3737. [LT_LANG(CXX)],
  3738. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  3739. AC_PROVIDE_IFELSE([AC_PROG_F77],
  3740. [LT_LANG(F77)],
  3741. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  3742. AC_PROVIDE_IFELSE([AC_PROG_FC],
  3743. [LT_LANG(FC)],
  3744. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  3745. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  3746. dnl pulling things in needlessly.
  3747. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  3748. [LT_LANG(GCJ)],
  3749. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  3750. [LT_LANG(GCJ)],
  3751. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  3752. [LT_LANG(GCJ)],
  3753. [m4_ifdef([AC_PROG_GCJ],
  3754. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  3755. m4_ifdef([A][M_PROG_GCJ],
  3756. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  3757. m4_ifdef([LT_PROG_GCJ],
  3758. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  3759. AC_PROVIDE_IFELSE([AC_PROG_GO],
  3760. [LT_LANG(GO)],
  3761. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  3762. AC_PROVIDE_IFELSE([LT_PROG_RC],
  3763. [LT_LANG(RC)],
  3764. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  3765. ])# _LT_LANG_DEFAULT_CONFIG
  3766. # Obsolete macros:
  3767. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  3768. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  3769. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  3770. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  3771. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  3772. dnl aclocal-1.4 backwards compatibility:
  3773. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  3774. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  3775. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  3776. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  3777. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  3778. # _LT_TAG_COMPILER
  3779. # ----------------
  3780. m4_defun([_LT_TAG_COMPILER],
  3781. [AC_REQUIRE([AC_PROG_CC])dnl
  3782. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  3783. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  3784. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  3785. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  3786. # If no C compiler was specified, use CC.
  3787. LTCC=${LTCC-"$CC"}
  3788. # If no C compiler flags were specified, use CFLAGS.
  3789. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  3790. # Allow CC to be a program name with arguments.
  3791. compiler=$CC
  3792. ])# _LT_TAG_COMPILER
  3793. # _LT_COMPILER_BOILERPLATE
  3794. # ------------------------
  3795. # Check for compiler boilerplate output or warnings with
  3796. # the simple compiler test code.
  3797. m4_defun([_LT_COMPILER_BOILERPLATE],
  3798. [m4_require([_LT_DECL_SED])dnl
  3799. ac_outfile=conftest.$ac_objext
  3800. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  3801. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3802. _lt_compiler_boilerplate=`cat conftest.err`
  3803. $RM conftest*
  3804. ])# _LT_COMPILER_BOILERPLATE
  3805. # _LT_LINKER_BOILERPLATE
  3806. # ----------------------
  3807. # Check for linker boilerplate output or warnings with
  3808. # the simple link test code.
  3809. m4_defun([_LT_LINKER_BOILERPLATE],
  3810. [m4_require([_LT_DECL_SED])dnl
  3811. ac_outfile=conftest.$ac_objext
  3812. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  3813. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3814. _lt_linker_boilerplate=`cat conftest.err`
  3815. $RM -r conftest*
  3816. ])# _LT_LINKER_BOILERPLATE
  3817. # _LT_REQUIRED_DARWIN_CHECKS
  3818. # -------------------------
  3819. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  3820. case $host_os in
  3821. rhapsody* | darwin*)
  3822. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  3823. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  3824. AC_CHECK_TOOL([LIPO], [lipo], [:])
  3825. AC_CHECK_TOOL([OTOOL], [otool], [:])
  3826. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  3827. _LT_DECL([], [DSYMUTIL], [1],
  3828. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  3829. _LT_DECL([], [NMEDIT], [1],
  3830. [Tool to change global to local symbols on Mac OS X])
  3831. _LT_DECL([], [LIPO], [1],
  3832. [Tool to manipulate fat objects and archives on Mac OS X])
  3833. _LT_DECL([], [OTOOL], [1],
  3834. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  3835. _LT_DECL([], [OTOOL64], [1],
  3836. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  3837. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  3838. [lt_cv_apple_cc_single_mod=no
  3839. if test -z "$LT_MULTI_MODULE"; then
  3840. # By default we will add the -single_module flag. You can override
  3841. # by either setting the environment variable LT_MULTI_MODULE
  3842. # non-empty at configure time, or by adding -multi_module to the
  3843. # link flags.
  3844. rm -rf libconftest.dylib*
  3845. echo "int foo(void){return 1;}" > conftest.c
  3846. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3847. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  3848. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3849. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  3850. _lt_result=$?
  3851. # If there is a non-empty error log, and "single_module"
  3852. # appears in it, assume the flag caused a linker warning
  3853. if test -s conftest.err && $GREP single_module conftest.err; then
  3854. cat conftest.err >&AS_MESSAGE_LOG_FD
  3855. # Otherwise, if the output was created with a 0 exit code from
  3856. # the compiler, it worked.
  3857. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  3858. lt_cv_apple_cc_single_mod=yes
  3859. else
  3860. cat conftest.err >&AS_MESSAGE_LOG_FD
  3861. fi
  3862. rm -rf libconftest.dylib*
  3863. rm -f conftest.*
  3864. fi])
  3865. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  3866. [lt_cv_ld_exported_symbols_list],
  3867. [lt_cv_ld_exported_symbols_list=no
  3868. save_LDFLAGS=$LDFLAGS
  3869. echo "_main" > conftest.sym
  3870. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  3871. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3872. [lt_cv_ld_exported_symbols_list=yes],
  3873. [lt_cv_ld_exported_symbols_list=no])
  3874. LDFLAGS=$save_LDFLAGS
  3875. ])
  3876. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  3877. [lt_cv_ld_force_load=no
  3878. cat > conftest.c << _LT_EOF
  3879. int forced_loaded() { return 2;}
  3880. _LT_EOF
  3881. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  3882. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  3883. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  3884. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  3885. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  3886. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  3887. cat > conftest.c << _LT_EOF
  3888. int main() { return 0;}
  3889. _LT_EOF
  3890. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  3891. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  3892. _lt_result=$?
  3893. if test -s conftest.err && $GREP force_load conftest.err; then
  3894. cat conftest.err >&AS_MESSAGE_LOG_FD
  3895. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  3896. lt_cv_ld_force_load=yes
  3897. else
  3898. cat conftest.err >&AS_MESSAGE_LOG_FD
  3899. fi
  3900. rm -f conftest.err libconftest.a conftest conftest.c
  3901. rm -rf conftest.dSYM
  3902. ])
  3903. case $host_os in
  3904. rhapsody* | darwin1.[[012]])
  3905. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  3906. darwin1.*)
  3907. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  3908. darwin*) # darwin 5.x on
  3909. # if running on 10.5 or later, the deployment target defaults
  3910. # to the OS version, if on x86, and 10.4, the deployment
  3911. # target defaults to 10.4. Don't you love it?
  3912. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  3913. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  3914. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  3915. 10.[[012]][[,.]]*)
  3916. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  3917. 10.*)
  3918. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  3919. esac
  3920. ;;
  3921. esac
  3922. if test yes = "$lt_cv_apple_cc_single_mod"; then
  3923. _lt_dar_single_mod='$single_module'
  3924. fi
  3925. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  3926. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  3927. else
  3928. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  3929. fi
  3930. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  3931. _lt_dsymutil='~$DSYMUTIL $lib || :'
  3932. else
  3933. _lt_dsymutil=
  3934. fi
  3935. ;;
  3936. esac
  3937. ])
  3938. # _LT_DARWIN_LINKER_FEATURES([TAG])
  3939. # ---------------------------------
  3940. # Checks for linker and compiler features on darwin
  3941. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  3942. [
  3943. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  3944. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  3945. _LT_TAGVAR(hardcode_direct, $1)=no
  3946. _LT_TAGVAR(hardcode_automatic, $1)=yes
  3947. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3948. if test yes = "$lt_cv_ld_force_load"; then
  3949. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  3950. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  3951. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  3952. else
  3953. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  3954. fi
  3955. _LT_TAGVAR(link_all_deplibs, $1)=yes
  3956. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  3957. case $cc_basename in
  3958. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  3959. *) _lt_dar_can_shared=$GCC ;;
  3960. esac
  3961. if test yes = "$_lt_dar_can_shared"; then
  3962. output_verbose_link_cmd=func_echo_all
  3963. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
  3964. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  3965. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
  3966. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
  3967. m4_if([$1], [CXX],
  3968. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  3969. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
  3970. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
  3971. fi
  3972. ],[])
  3973. else
  3974. _LT_TAGVAR(ld_shlibs, $1)=no
  3975. fi
  3976. ])
  3977. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  3978. # ----------------------------------
  3979. # Links a minimal program and checks the executable
  3980. # for the system default hardcoded library path. In most cases,
  3981. # this is /usr/lib:/lib, but when the MPI compilers are used
  3982. # the location of the communication and MPI libs are included too.
  3983. # If we don't find anything, use the default library path according
  3984. # to the aix ld manual.
  3985. # Store the results from the different compilers for each TAGNAME.
  3986. # Allow to override them for all tags through lt_cv_aix_libpath.
  3987. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  3988. [m4_require([_LT_DECL_SED])dnl
  3989. if test set = "${lt_cv_aix_libpath+set}"; then
  3990. aix_libpath=$lt_cv_aix_libpath
  3991. else
  3992. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  3993. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  3994. lt_aix_libpath_sed='[
  3995. /Import File Strings/,/^$/ {
  3996. /^0/ {
  3997. s/^0 *\([^ ]*\) *$/\1/
  3998. p
  3999. }
  4000. }]'
  4001. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  4002. # Check for a 64-bit object if we didn't find anything.
  4003. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  4004. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  4005. fi],[])
  4006. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  4007. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  4008. fi
  4009. ])
  4010. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  4011. fi
  4012. ])# _LT_SYS_MODULE_PATH_AIX
  4013. # _LT_SHELL_INIT(ARG)
  4014. # -------------------
  4015. m4_define([_LT_SHELL_INIT],
  4016. [m4_divert_text([M4SH-INIT], [$1
  4017. ])])# _LT_SHELL_INIT
  4018. # _LT_PROG_ECHO_BACKSLASH
  4019. # -----------------------
  4020. # Find how we can fake an echo command that does not interpret backslash.
  4021. # In particular, with Autoconf 2.60 or later we add some code to the start
  4022. # of the generated configure script that will find a shell with a builtin
  4023. # printf (that we can use as an echo command).
  4024. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  4025. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  4026. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  4027. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  4028. AC_MSG_CHECKING([how to print strings])
  4029. # Test print first, because it will be a builtin if present.
  4030. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  4031. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  4032. ECHO='print -r --'
  4033. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  4034. ECHO='printf %s\n'
  4035. else
  4036. # Use this function as a fallback that always works.
  4037. func_fallback_echo ()
  4038. {
  4039. eval 'cat <<_LTECHO_EOF
  4040. $[]1
  4041. _LTECHO_EOF'
  4042. }
  4043. ECHO='func_fallback_echo'
  4044. fi
  4045. # func_echo_all arg...
  4046. # Invoke $ECHO with all args, space-separated.
  4047. func_echo_all ()
  4048. {
  4049. $ECHO "$*"
  4050. }
  4051. case $ECHO in
  4052. printf*) AC_MSG_RESULT([printf]) ;;
  4053. print*) AC_MSG_RESULT([print -r]) ;;
  4054. *) AC_MSG_RESULT([cat]) ;;
  4055. esac
  4056. m4_ifdef([_AS_DETECT_SUGGESTED],
  4057. [_AS_DETECT_SUGGESTED([
  4058. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  4059. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  4060. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  4061. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  4062. PATH=/empty FPATH=/empty; export PATH FPATH
  4063. test "X`printf %s $ECHO`" = "X$ECHO" \
  4064. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  4065. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  4066. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  4067. ])# _LT_PROG_ECHO_BACKSLASH
  4068. # _LT_WITH_SYSROOT
  4069. # ----------------
  4070. AC_DEFUN([_LT_WITH_SYSROOT],
  4071. [AC_MSG_CHECKING([for sysroot])
  4072. AC_ARG_WITH([sysroot],
  4073. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  4074. [Search for dependent libraries within DIR (or the compiler's sysroot
  4075. if not specified).])],
  4076. [], [with_sysroot=no])
  4077. dnl lt_sysroot will always be passed unquoted. We quote it here
  4078. dnl in case the user passed a directory name.
  4079. lt_sysroot=
  4080. case $with_sysroot in #(
  4081. yes)
  4082. if test yes = "$GCC"; then
  4083. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  4084. fi
  4085. ;; #(
  4086. /*)
  4087. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  4088. ;; #(
  4089. no|'')
  4090. ;; #(
  4091. *)
  4092. AC_MSG_RESULT([$with_sysroot])
  4093. AC_MSG_ERROR([The sysroot must be an absolute path.])
  4094. ;;
  4095. esac
  4096. AC_MSG_RESULT([${lt_sysroot:-no}])
  4097. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  4098. [dependent libraries, and where our libraries should be installed.])])
  4099. # _LT_ENABLE_LOCK
  4100. # ---------------
  4101. m4_defun([_LT_ENABLE_LOCK],
  4102. [AC_ARG_ENABLE([libtool-lock],
  4103. [AS_HELP_STRING([--disable-libtool-lock],
  4104. [avoid locking (might break parallel builds)])])
  4105. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  4106. # Some flags need to be propagated to the compiler or linker for good
  4107. # libtool support.
  4108. case $host in
  4109. ia64-*-hpux*)
  4110. # Find out what ABI is being produced by ac_compile, and set mode
  4111. # options accordingly.
  4112. echo 'int i;' > conftest.$ac_ext
  4113. if AC_TRY_EVAL(ac_compile); then
  4114. case `/usr/bin/file conftest.$ac_objext` in
  4115. *ELF-32*)
  4116. HPUX_IA64_MODE=32
  4117. ;;
  4118. *ELF-64*)
  4119. HPUX_IA64_MODE=64
  4120. ;;
  4121. esac
  4122. fi
  4123. rm -rf conftest*
  4124. ;;
  4125. *-*-irix6*)
  4126. # Find out what ABI is being produced by ac_compile, and set linker
  4127. # options accordingly.
  4128. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  4129. if AC_TRY_EVAL(ac_compile); then
  4130. if test yes = "$lt_cv_prog_gnu_ld"; then
  4131. case `/usr/bin/file conftest.$ac_objext` in
  4132. *32-bit*)
  4133. LD="${LD-ld} -melf32bsmip"
  4134. ;;
  4135. *N32*)
  4136. LD="${LD-ld} -melf32bmipn32"
  4137. ;;
  4138. *64-bit*)
  4139. LD="${LD-ld} -melf64bmip"
  4140. ;;
  4141. esac
  4142. else
  4143. case `/usr/bin/file conftest.$ac_objext` in
  4144. *32-bit*)
  4145. LD="${LD-ld} -32"
  4146. ;;
  4147. *N32*)
  4148. LD="${LD-ld} -n32"
  4149. ;;
  4150. *64-bit*)
  4151. LD="${LD-ld} -64"
  4152. ;;
  4153. esac
  4154. fi
  4155. fi
  4156. rm -rf conftest*
  4157. ;;
  4158. mips64*-*linux*)
  4159. # Find out what ABI is being produced by ac_compile, and set linker
  4160. # options accordingly.
  4161. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  4162. if AC_TRY_EVAL(ac_compile); then
  4163. emul=elf
  4164. case `/usr/bin/file conftest.$ac_objext` in
  4165. *32-bit*)
  4166. emul="${emul}32"
  4167. ;;
  4168. *64-bit*)
  4169. emul="${emul}64"
  4170. ;;
  4171. esac
  4172. case `/usr/bin/file conftest.$ac_objext` in
  4173. *MSB*)
  4174. emul="${emul}btsmip"
  4175. ;;
  4176. *LSB*)
  4177. emul="${emul}ltsmip"
  4178. ;;
  4179. esac
  4180. case `/usr/bin/file conftest.$ac_objext` in
  4181. *N32*)
  4182. emul="${emul}n32"
  4183. ;;
  4184. esac
  4185. LD="${LD-ld} -m $emul"
  4186. fi
  4187. rm -rf conftest*
  4188. ;;
  4189. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  4190. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  4191. # Find out what ABI is being produced by ac_compile, and set linker
  4192. # options accordingly. Note that the listed cases only cover the
  4193. # situations where additional linker options are needed (such as when
  4194. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  4195. # vice versa); the common cases where no linker options are needed do
  4196. # not appear in the list.
  4197. echo 'int i;' > conftest.$ac_ext
  4198. if AC_TRY_EVAL(ac_compile); then
  4199. case `/usr/bin/file conftest.o` in
  4200. *32-bit*)
  4201. case $host in
  4202. x86_64-*kfreebsd*-gnu)
  4203. LD="${LD-ld} -m elf_i386_fbsd"
  4204. ;;
  4205. x86_64-*linux*)
  4206. case `/usr/bin/file conftest.o` in
  4207. *x86-64*)
  4208. LD="${LD-ld} -m elf32_x86_64"
  4209. ;;
  4210. *)
  4211. LD="${LD-ld} -m elf_i386"
  4212. ;;
  4213. esac
  4214. ;;
  4215. powerpc64le-*linux*)
  4216. LD="${LD-ld} -m elf32lppclinux"
  4217. ;;
  4218. powerpc64-*linux*)
  4219. LD="${LD-ld} -m elf32ppclinux"
  4220. ;;
  4221. s390x-*linux*)
  4222. LD="${LD-ld} -m elf_s390"
  4223. ;;
  4224. sparc64-*linux*)
  4225. LD="${LD-ld} -m elf32_sparc"
  4226. ;;
  4227. esac
  4228. ;;
  4229. *64-bit*)
  4230. case $host in
  4231. x86_64-*kfreebsd*-gnu)
  4232. LD="${LD-ld} -m elf_x86_64_fbsd"
  4233. ;;
  4234. x86_64-*linux*)
  4235. LD="${LD-ld} -m elf_x86_64"
  4236. ;;
  4237. powerpcle-*linux*)
  4238. LD="${LD-ld} -m elf64lppc"
  4239. ;;
  4240. powerpc-*linux*)
  4241. LD="${LD-ld} -m elf64ppc"
  4242. ;;
  4243. s390*-*linux*|s390*-*tpf*)
  4244. LD="${LD-ld} -m elf64_s390"
  4245. ;;
  4246. sparc*-*linux*)
  4247. LD="${LD-ld} -m elf64_sparc"
  4248. ;;
  4249. esac
  4250. ;;
  4251. esac
  4252. fi
  4253. rm -rf conftest*
  4254. ;;
  4255. *-*-sco3.2v5*)
  4256. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  4257. SAVE_CFLAGS=$CFLAGS
  4258. CFLAGS="$CFLAGS -belf"
  4259. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  4260. [AC_LANG_PUSH(C)
  4261. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  4262. AC_LANG_POP])
  4263. if test yes != "$lt_cv_cc_needs_belf"; then
  4264. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  4265. CFLAGS=$SAVE_CFLAGS
  4266. fi
  4267. ;;
  4268. *-*solaris*)
  4269. # Find out what ABI is being produced by ac_compile, and set linker
  4270. # options accordingly.
  4271. echo 'int i;' > conftest.$ac_ext
  4272. if AC_TRY_EVAL(ac_compile); then
  4273. case `/usr/bin/file conftest.o` in
  4274. *64-bit*)
  4275. case $lt_cv_prog_gnu_ld in
  4276. yes*)
  4277. case $host in
  4278. i?86-*-solaris*|x86_64-*-solaris*)
  4279. LD="${LD-ld} -m elf_x86_64"
  4280. ;;
  4281. sparc*-*-solaris*)
  4282. LD="${LD-ld} -m elf64_sparc"
  4283. ;;
  4284. esac
  4285. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  4286. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  4287. LD=${LD-ld}_sol2
  4288. fi
  4289. ;;
  4290. *)
  4291. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  4292. LD="${LD-ld} -64"
  4293. fi
  4294. ;;
  4295. esac
  4296. ;;
  4297. esac
  4298. fi
  4299. rm -rf conftest*
  4300. ;;
  4301. esac
  4302. need_locks=$enable_libtool_lock
  4303. ])# _LT_ENABLE_LOCK
  4304. # _LT_PROG_AR
  4305. # -----------
  4306. m4_defun([_LT_PROG_AR],
  4307. [AC_CHECK_TOOLS(AR, [ar], false)
  4308. : ${AR=ar}
  4309. : ${AR_FLAGS=cru}
  4310. _LT_DECL([], [AR], [1], [The archiver])
  4311. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  4312. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  4313. [lt_cv_ar_at_file=no
  4314. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  4315. [echo conftest.$ac_objext > conftest.lst
  4316. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  4317. AC_TRY_EVAL([lt_ar_try])
  4318. if test 0 -eq "$ac_status"; then
  4319. # Ensure the archiver fails upon bogus file names.
  4320. rm -f conftest.$ac_objext libconftest.a
  4321. AC_TRY_EVAL([lt_ar_try])
  4322. if test 0 -ne "$ac_status"; then
  4323. lt_cv_ar_at_file=@
  4324. fi
  4325. fi
  4326. rm -f conftest.* libconftest.a
  4327. ])
  4328. ])
  4329. if test no = "$lt_cv_ar_at_file"; then
  4330. archiver_list_spec=
  4331. else
  4332. archiver_list_spec=$lt_cv_ar_at_file
  4333. fi
  4334. _LT_DECL([], [archiver_list_spec], [1],
  4335. [How to feed a file listing to the archiver])
  4336. ])# _LT_PROG_AR
  4337. # _LT_CMD_OLD_ARCHIVE
  4338. # -------------------
  4339. m4_defun([_LT_CMD_OLD_ARCHIVE],
  4340. [_LT_PROG_AR
  4341. AC_CHECK_TOOL(STRIP, strip, :)
  4342. test -z "$STRIP" && STRIP=:
  4343. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  4344. AC_CHECK_TOOL(RANLIB, ranlib, :)
  4345. test -z "$RANLIB" && RANLIB=:
  4346. _LT_DECL([], [RANLIB], [1],
  4347. [Commands used to install an old-style archive])
  4348. # Determine commands to create old-style static archives.
  4349. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  4350. old_postinstall_cmds='chmod 644 $oldlib'
  4351. old_postuninstall_cmds=
  4352. if test -n "$RANLIB"; then
  4353. case $host_os in
  4354. bitrig* | openbsd*)
  4355. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  4356. ;;
  4357. *)
  4358. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  4359. ;;
  4360. esac
  4361. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  4362. fi
  4363. case $host_os in
  4364. darwin*)
  4365. lock_old_archive_extraction=yes ;;
  4366. *)
  4367. lock_old_archive_extraction=no ;;
  4368. esac
  4369. _LT_DECL([], [old_postinstall_cmds], [2])
  4370. _LT_DECL([], [old_postuninstall_cmds], [2])
  4371. _LT_TAGDECL([], [old_archive_cmds], [2],
  4372. [Commands used to build an old-style archive])
  4373. _LT_DECL([], [lock_old_archive_extraction], [0],
  4374. [Whether to use a lock for old archive extraction])
  4375. ])# _LT_CMD_OLD_ARCHIVE
  4376. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  4377. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  4378. # ----------------------------------------------------------------
  4379. # Check whether the given compiler option works
  4380. AC_DEFUN([_LT_COMPILER_OPTION],
  4381. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4382. m4_require([_LT_DECL_SED])dnl
  4383. AC_CACHE_CHECK([$1], [$2],
  4384. [$2=no
  4385. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  4386. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4387. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  4388. # Insert the option either (1) after the last *FLAGS variable, or
  4389. # (2) before a word containing "conftest.", or (3) at the end.
  4390. # Note that $ac_compile itself does not contain backslashes and begins
  4391. # with a dollar sign (not a hyphen), so the echo should work correctly.
  4392. # The option is referenced via a variable to avoid confusing sed.
  4393. lt_compile=`echo "$ac_compile" | $SED \
  4394. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  4395. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  4396. -e 's:$: $lt_compiler_flag:'`
  4397. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  4398. (eval "$lt_compile" 2>conftest.err)
  4399. ac_status=$?
  4400. cat conftest.err >&AS_MESSAGE_LOG_FD
  4401. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  4402. if (exit $ac_status) && test -s "$ac_outfile"; then
  4403. # The compiler can only warn and ignore the option if not recognized
  4404. # So say no if there are warnings other than the usual output.
  4405. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  4406. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  4407. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  4408. $2=yes
  4409. fi
  4410. fi
  4411. $RM conftest*
  4412. ])
  4413. if test yes = "[$]$2"; then
  4414. m4_if([$5], , :, [$5])
  4415. else
  4416. m4_if([$6], , :, [$6])
  4417. fi
  4418. ])# _LT_COMPILER_OPTION
  4419. # Old name:
  4420. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  4421. dnl aclocal-1.4 backwards compatibility:
  4422. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  4423. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  4424. # [ACTION-SUCCESS], [ACTION-FAILURE])
  4425. # ----------------------------------------------------
  4426. # Check whether the given linker option works
  4427. AC_DEFUN([_LT_LINKER_OPTION],
  4428. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4429. m4_require([_LT_DECL_SED])dnl
  4430. AC_CACHE_CHECK([$1], [$2],
  4431. [$2=no
  4432. save_LDFLAGS=$LDFLAGS
  4433. LDFLAGS="$LDFLAGS $3"
  4434. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  4435. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  4436. # The linker can only warn and ignore the option if not recognized
  4437. # So say no if there are warnings
  4438. if test -s conftest.err; then
  4439. # Append any errors to the config.log.
  4440. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  4441. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  4442. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  4443. if diff conftest.exp conftest.er2 >/dev/null; then
  4444. $2=yes
  4445. fi
  4446. else
  4447. $2=yes
  4448. fi
  4449. fi
  4450. $RM -r conftest*
  4451. LDFLAGS=$save_LDFLAGS
  4452. ])
  4453. if test yes = "[$]$2"; then
  4454. m4_if([$4], , :, [$4])
  4455. else
  4456. m4_if([$5], , :, [$5])
  4457. fi
  4458. ])# _LT_LINKER_OPTION
  4459. # Old name:
  4460. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  4461. dnl aclocal-1.4 backwards compatibility:
  4462. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  4463. # LT_CMD_MAX_LEN
  4464. #---------------
  4465. AC_DEFUN([LT_CMD_MAX_LEN],
  4466. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4467. # find the maximum length of command line arguments
  4468. AC_MSG_CHECKING([the maximum length of command line arguments])
  4469. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  4470. i=0
  4471. teststring=ABCD
  4472. case $build_os in
  4473. msdosdjgpp*)
  4474. # On DJGPP, this test can blow up pretty badly due to problems in libc
  4475. # (any single argument exceeding 2000 bytes causes a buffer overrun
  4476. # during glob expansion). Even if it were fixed, the result of this
  4477. # check would be larger than it should be.
  4478. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  4479. ;;
  4480. gnu*)
  4481. # Under GNU Hurd, this test is not required because there is
  4482. # no limit to the length of command line arguments.
  4483. # Libtool will interpret -1 as no limit whatsoever
  4484. lt_cv_sys_max_cmd_len=-1;
  4485. ;;
  4486. cygwin* | mingw* | cegcc*)
  4487. # On Win9x/ME, this test blows up -- it succeeds, but takes
  4488. # about 5 minutes as the teststring grows exponentially.
  4489. # Worse, since 9x/ME are not pre-emptively multitasking,
  4490. # you end up with a "frozen" computer, even though with patience
  4491. # the test eventually succeeds (with a max line length of 256k).
  4492. # Instead, let's just punt: use the minimum linelength reported by
  4493. # all of the supported platforms: 8192 (on NT/2K/XP).
  4494. lt_cv_sys_max_cmd_len=8192;
  4495. ;;
  4496. mint*)
  4497. # On MiNT this can take a long time and run out of memory.
  4498. lt_cv_sys_max_cmd_len=8192;
  4499. ;;
  4500. amigaos*)
  4501. # On AmigaOS with pdksh, this test takes hours, literally.
  4502. # So we just punt and use a minimum line length of 8192.
  4503. lt_cv_sys_max_cmd_len=8192;
  4504. ;;
  4505. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  4506. # This has been around since 386BSD, at least. Likely further.
  4507. if test -x /sbin/sysctl; then
  4508. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  4509. elif test -x /usr/sbin/sysctl; then
  4510. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  4511. else
  4512. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  4513. fi
  4514. # And add a safety zone
  4515. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  4516. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  4517. ;;
  4518. interix*)
  4519. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  4520. lt_cv_sys_max_cmd_len=196608
  4521. ;;
  4522. os2*)
  4523. # The test takes a long time on OS/2.
  4524. lt_cv_sys_max_cmd_len=8192
  4525. ;;
  4526. osf*)
  4527. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  4528. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  4529. # nice to cause kernel panics so lets avoid the loop below.
  4530. # First set a reasonable default.
  4531. lt_cv_sys_max_cmd_len=16384
  4532. #
  4533. if test -x /sbin/sysconfig; then
  4534. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  4535. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  4536. esac
  4537. fi
  4538. ;;
  4539. sco3.2v5*)
  4540. lt_cv_sys_max_cmd_len=102400
  4541. ;;
  4542. sysv5* | sco5v6* | sysv4.2uw2*)
  4543. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  4544. if test -n "$kargmax"; then
  4545. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  4546. else
  4547. lt_cv_sys_max_cmd_len=32768
  4548. fi
  4549. ;;
  4550. *)
  4551. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  4552. if test -n "$lt_cv_sys_max_cmd_len" && \
  4553. test undefined != "$lt_cv_sys_max_cmd_len"; then
  4554. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  4555. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  4556. else
  4557. # Make teststring a little bigger before we do anything with it.
  4558. # a 1K string should be a reasonable start.
  4559. for i in 1 2 3 4 5 6 7 8; do
  4560. teststring=$teststring$teststring
  4561. done
  4562. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  4563. # If test is not a shell built-in, we'll probably end up computing a
  4564. # maximum length that is only half of the actual maximum length, but
  4565. # we can't tell.
  4566. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  4567. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  4568. test 17 != "$i" # 1/2 MB should be enough
  4569. do
  4570. i=`expr $i + 1`
  4571. teststring=$teststring$teststring
  4572. done
  4573. # Only check the string length outside the loop.
  4574. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  4575. teststring=
  4576. # Add a significant safety factor because C++ compilers can tack on
  4577. # massive amounts of additional arguments before passing them to the
  4578. # linker. It appears as though 1/2 is a usable value.
  4579. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  4580. fi
  4581. ;;
  4582. esac
  4583. ])
  4584. if test -n "$lt_cv_sys_max_cmd_len"; then
  4585. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  4586. else
  4587. AC_MSG_RESULT(none)
  4588. fi
  4589. max_cmd_len=$lt_cv_sys_max_cmd_len
  4590. _LT_DECL([], [max_cmd_len], [0],
  4591. [What is the maximum length of a command?])
  4592. ])# LT_CMD_MAX_LEN
  4593. # Old name:
  4594. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  4595. dnl aclocal-1.4 backwards compatibility:
  4596. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  4597. # _LT_HEADER_DLFCN
  4598. # ----------------
  4599. m4_defun([_LT_HEADER_DLFCN],
  4600. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  4601. ])# _LT_HEADER_DLFCN
  4602. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  4603. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  4604. # ----------------------------------------------------------------
  4605. m4_defun([_LT_TRY_DLOPEN_SELF],
  4606. [m4_require([_LT_HEADER_DLFCN])dnl
  4607. if test yes = "$cross_compiling"; then :
  4608. [$4]
  4609. else
  4610. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  4611. lt_status=$lt_dlunknown
  4612. cat > conftest.$ac_ext <<_LT_EOF
  4613. [#line $LINENO "configure"
  4614. #include "confdefs.h"
  4615. #if HAVE_DLFCN_H
  4616. #include <dlfcn.h>
  4617. #endif
  4618. #include <stdio.h>
  4619. #ifdef RTLD_GLOBAL
  4620. # define LT_DLGLOBAL RTLD_GLOBAL
  4621. #else
  4622. # ifdef DL_GLOBAL
  4623. # define LT_DLGLOBAL DL_GLOBAL
  4624. # else
  4625. # define LT_DLGLOBAL 0
  4626. # endif
  4627. #endif
  4628. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  4629. find out it does not work in some platform. */
  4630. #ifndef LT_DLLAZY_OR_NOW
  4631. # ifdef RTLD_LAZY
  4632. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  4633. # else
  4634. # ifdef DL_LAZY
  4635. # define LT_DLLAZY_OR_NOW DL_LAZY
  4636. # else
  4637. # ifdef RTLD_NOW
  4638. # define LT_DLLAZY_OR_NOW RTLD_NOW
  4639. # else
  4640. # ifdef DL_NOW
  4641. # define LT_DLLAZY_OR_NOW DL_NOW
  4642. # else
  4643. # define LT_DLLAZY_OR_NOW 0
  4644. # endif
  4645. # endif
  4646. # endif
  4647. # endif
  4648. #endif
  4649. /* When -fvisibility=hidden is used, assume the code has been annotated
  4650. correspondingly for the symbols needed. */
  4651. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  4652. int fnord () __attribute__((visibility("default")));
  4653. #endif
  4654. int fnord () { return 42; }
  4655. int main ()
  4656. {
  4657. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  4658. int status = $lt_dlunknown;
  4659. if (self)
  4660. {
  4661. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  4662. else
  4663. {
  4664. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  4665. else puts (dlerror ());
  4666. }
  4667. /* dlclose (self); */
  4668. }
  4669. else
  4670. puts (dlerror ());
  4671. return status;
  4672. }]
  4673. _LT_EOF
  4674. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  4675. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  4676. lt_status=$?
  4677. case x$lt_status in
  4678. x$lt_dlno_uscore) $1 ;;
  4679. x$lt_dlneed_uscore) $2 ;;
  4680. x$lt_dlunknown|x*) $3 ;;
  4681. esac
  4682. else :
  4683. # compilation failed
  4684. $3
  4685. fi
  4686. fi
  4687. rm -fr conftest*
  4688. ])# _LT_TRY_DLOPEN_SELF
  4689. # LT_SYS_DLOPEN_SELF
  4690. # ------------------
  4691. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  4692. [m4_require([_LT_HEADER_DLFCN])dnl
  4693. if test yes != "$enable_dlopen"; then
  4694. enable_dlopen=unknown
  4695. enable_dlopen_self=unknown
  4696. enable_dlopen_self_static=unknown
  4697. else
  4698. lt_cv_dlopen=no
  4699. lt_cv_dlopen_libs=
  4700. case $host_os in
  4701. beos*)
  4702. lt_cv_dlopen=load_add_on
  4703. lt_cv_dlopen_libs=
  4704. lt_cv_dlopen_self=yes
  4705. ;;
  4706. mingw* | pw32* | cegcc*)
  4707. lt_cv_dlopen=LoadLibrary
  4708. lt_cv_dlopen_libs=
  4709. ;;
  4710. cygwin*)
  4711. lt_cv_dlopen=dlopen
  4712. lt_cv_dlopen_libs=
  4713. ;;
  4714. darwin*)
  4715. # if libdl is installed we need to link against it
  4716. AC_CHECK_LIB([dl], [dlopen],
  4717. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  4718. lt_cv_dlopen=dyld
  4719. lt_cv_dlopen_libs=
  4720. lt_cv_dlopen_self=yes
  4721. ])
  4722. ;;
  4723. tpf*)
  4724. # Don't try to run any link tests for TPF. We know it's impossible
  4725. # because TPF is a cross-compiler, and we know how we open DSOs.
  4726. lt_cv_dlopen=dlopen
  4727. lt_cv_dlopen_libs=
  4728. lt_cv_dlopen_self=no
  4729. ;;
  4730. *)
  4731. AC_CHECK_FUNC([shl_load],
  4732. [lt_cv_dlopen=shl_load],
  4733. [AC_CHECK_LIB([dld], [shl_load],
  4734. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  4735. [AC_CHECK_FUNC([dlopen],
  4736. [lt_cv_dlopen=dlopen],
  4737. [AC_CHECK_LIB([dl], [dlopen],
  4738. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  4739. [AC_CHECK_LIB([svld], [dlopen],
  4740. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  4741. [AC_CHECK_LIB([dld], [dld_link],
  4742. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  4743. ])
  4744. ])
  4745. ])
  4746. ])
  4747. ])
  4748. ;;
  4749. esac
  4750. if test no = "$lt_cv_dlopen"; then
  4751. enable_dlopen=no
  4752. else
  4753. enable_dlopen=yes
  4754. fi
  4755. case $lt_cv_dlopen in
  4756. dlopen)
  4757. save_CPPFLAGS=$CPPFLAGS
  4758. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  4759. save_LDFLAGS=$LDFLAGS
  4760. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  4761. save_LIBS=$LIBS
  4762. LIBS="$lt_cv_dlopen_libs $LIBS"
  4763. AC_CACHE_CHECK([whether a program can dlopen itself],
  4764. lt_cv_dlopen_self, [dnl
  4765. _LT_TRY_DLOPEN_SELF(
  4766. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  4767. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  4768. ])
  4769. if test yes = "$lt_cv_dlopen_self"; then
  4770. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  4771. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  4772. lt_cv_dlopen_self_static, [dnl
  4773. _LT_TRY_DLOPEN_SELF(
  4774. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  4775. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  4776. ])
  4777. fi
  4778. CPPFLAGS=$save_CPPFLAGS
  4779. LDFLAGS=$save_LDFLAGS
  4780. LIBS=$save_LIBS
  4781. ;;
  4782. esac
  4783. case $lt_cv_dlopen_self in
  4784. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  4785. *) enable_dlopen_self=unknown ;;
  4786. esac
  4787. case $lt_cv_dlopen_self_static in
  4788. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  4789. *) enable_dlopen_self_static=unknown ;;
  4790. esac
  4791. fi
  4792. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  4793. [Whether dlopen is supported])
  4794. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  4795. [Whether dlopen of programs is supported])
  4796. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  4797. [Whether dlopen of statically linked programs is supported])
  4798. ])# LT_SYS_DLOPEN_SELF
  4799. # Old name:
  4800. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  4801. dnl aclocal-1.4 backwards compatibility:
  4802. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  4803. # _LT_COMPILER_C_O([TAGNAME])
  4804. # ---------------------------
  4805. # Check to see if options -c and -o are simultaneously supported by compiler.
  4806. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  4807. m4_defun([_LT_COMPILER_C_O],
  4808. [m4_require([_LT_DECL_SED])dnl
  4809. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4810. m4_require([_LT_TAG_COMPILER])dnl
  4811. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  4812. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  4813. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  4814. $RM -r conftest 2>/dev/null
  4815. mkdir conftest
  4816. cd conftest
  4817. mkdir out
  4818. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4819. lt_compiler_flag="-o out/conftest2.$ac_objext"
  4820. # Insert the option either (1) after the last *FLAGS variable, or
  4821. # (2) before a word containing "conftest.", or (3) at the end.
  4822. # Note that $ac_compile itself does not contain backslashes and begins
  4823. # with a dollar sign (not a hyphen), so the echo should work correctly.
  4824. lt_compile=`echo "$ac_compile" | $SED \
  4825. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  4826. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  4827. -e 's:$: $lt_compiler_flag:'`
  4828. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  4829. (eval "$lt_compile" 2>out/conftest.err)
  4830. ac_status=$?
  4831. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  4832. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  4833. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  4834. then
  4835. # The compiler can only warn and ignore the option if not recognized
  4836. # So say no if there are warnings
  4837. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  4838. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  4839. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  4840. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  4841. fi
  4842. fi
  4843. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  4844. $RM conftest*
  4845. # SGI C++ compiler will create directory out/ii_files/ for
  4846. # template instantiation
  4847. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  4848. $RM out/* && rmdir out
  4849. cd ..
  4850. $RM -r conftest
  4851. $RM conftest*
  4852. ])
  4853. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  4854. [Does compiler simultaneously support -c and -o options?])
  4855. ])# _LT_COMPILER_C_O
  4856. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  4857. # ----------------------------------
  4858. # Check to see if we can do hard links to lock some files if needed
  4859. m4_defun([_LT_COMPILER_FILE_LOCKS],
  4860. [m4_require([_LT_ENABLE_LOCK])dnl
  4861. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4862. _LT_COMPILER_C_O([$1])
  4863. hard_links=nottested
  4864. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  4865. # do not overwrite the value of need_locks provided by the user
  4866. AC_MSG_CHECKING([if we can lock with hard links])
  4867. hard_links=yes
  4868. $RM conftest*
  4869. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4870. touch conftest.a
  4871. ln conftest.a conftest.b 2>&5 || hard_links=no
  4872. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4873. AC_MSG_RESULT([$hard_links])
  4874. if test no = "$hard_links"; then
  4875. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  4876. need_locks=warn
  4877. fi
  4878. else
  4879. need_locks=no
  4880. fi
  4881. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  4882. ])# _LT_COMPILER_FILE_LOCKS
  4883. # _LT_CHECK_OBJDIR
  4884. # ----------------
  4885. m4_defun([_LT_CHECK_OBJDIR],
  4886. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  4887. [rm -f .libs 2>/dev/null
  4888. mkdir .libs 2>/dev/null
  4889. if test -d .libs; then
  4890. lt_cv_objdir=.libs
  4891. else
  4892. # MS-DOS does not allow filenames that begin with a dot.
  4893. lt_cv_objdir=_libs
  4894. fi
  4895. rmdir .libs 2>/dev/null])
  4896. objdir=$lt_cv_objdir
  4897. _LT_DECL([], [objdir], [0],
  4898. [The name of the directory that contains temporary libtool files])dnl
  4899. m4_pattern_allow([LT_OBJDIR])dnl
  4900. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  4901. [Define to the sub-directory where libtool stores uninstalled libraries.])
  4902. ])# _LT_CHECK_OBJDIR
  4903. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  4904. # --------------------------------------
  4905. # Check hardcoding attributes.
  4906. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  4907. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  4908. _LT_TAGVAR(hardcode_action, $1)=
  4909. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  4910. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  4911. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  4912. # We can hardcode non-existent directories.
  4913. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  4914. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  4915. # have to relink, otherwise we might link with an installed library
  4916. # when we should be linking with a yet-to-be-installed one
  4917. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  4918. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  4919. # Linking always hardcodes the temporary library directory.
  4920. _LT_TAGVAR(hardcode_action, $1)=relink
  4921. else
  4922. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  4923. _LT_TAGVAR(hardcode_action, $1)=immediate
  4924. fi
  4925. else
  4926. # We cannot hardcode anything, or else we can only hardcode existing
  4927. # directories.
  4928. _LT_TAGVAR(hardcode_action, $1)=unsupported
  4929. fi
  4930. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  4931. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  4932. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  4933. # Fast installation is not supported
  4934. enable_fast_install=no
  4935. elif test yes = "$shlibpath_overrides_runpath" ||
  4936. test no = "$enable_shared"; then
  4937. # Fast installation is not necessary
  4938. enable_fast_install=needless
  4939. fi
  4940. _LT_TAGDECL([], [hardcode_action], [0],
  4941. [How to hardcode a shared library path into an executable])
  4942. ])# _LT_LINKER_HARDCODE_LIBPATH
  4943. # _LT_CMD_STRIPLIB
  4944. # ----------------
  4945. m4_defun([_LT_CMD_STRIPLIB],
  4946. [m4_require([_LT_DECL_EGREP])
  4947. striplib=
  4948. old_striplib=
  4949. AC_MSG_CHECKING([whether stripping libraries is possible])
  4950. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  4951. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  4952. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  4953. AC_MSG_RESULT([yes])
  4954. else
  4955. # FIXME - insert some real tests, host_os isn't really good enough
  4956. case $host_os in
  4957. darwin*)
  4958. if test -n "$STRIP"; then
  4959. striplib="$STRIP -x"
  4960. old_striplib="$STRIP -S"
  4961. AC_MSG_RESULT([yes])
  4962. else
  4963. AC_MSG_RESULT([no])
  4964. fi
  4965. ;;
  4966. *)
  4967. AC_MSG_RESULT([no])
  4968. ;;
  4969. esac
  4970. fi
  4971. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  4972. _LT_DECL([], [striplib], [1])
  4973. ])# _LT_CMD_STRIPLIB
  4974. # _LT_PREPARE_MUNGE_PATH_LIST
  4975. # ---------------------------
  4976. # Make sure func_munge_path_list() is defined correctly.
  4977. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  4978. [[# func_munge_path_list VARIABLE PATH
  4979. # -----------------------------------
  4980. # VARIABLE is name of variable containing _space_ separated list of
  4981. # directories to be munged by the contents of PATH, which is string
  4982. # having a format:
  4983. # "DIR[:DIR]:"
  4984. # string "DIR[ DIR]" will be prepended to VARIABLE
  4985. # ":DIR[:DIR]"
  4986. # string "DIR[ DIR]" will be appended to VARIABLE
  4987. # "DIRP[:DIRP]::[DIRA:]DIRA"
  4988. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  4989. # "DIRA[ DIRA]" will be appended to VARIABLE
  4990. # "DIR[:DIR]"
  4991. # VARIABLE will be replaced by "DIR[ DIR]"
  4992. func_munge_path_list ()
  4993. {
  4994. case x@S|@2 in
  4995. x)
  4996. ;;
  4997. *:)
  4998. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  4999. ;;
  5000. x:*)
  5001. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  5002. ;;
  5003. *::*)
  5004. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  5005. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  5006. ;;
  5007. *)
  5008. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  5009. ;;
  5010. esac
  5011. }
  5012. ]])# _LT_PREPARE_PATH_LIST
  5013. # _LT_SYS_DYNAMIC_LINKER([TAG])
  5014. # -----------------------------
  5015. # PORTME Fill in your ld.so characteristics
  5016. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  5017. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5018. m4_require([_LT_DECL_EGREP])dnl
  5019. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5020. m4_require([_LT_DECL_OBJDUMP])dnl
  5021. m4_require([_LT_DECL_SED])dnl
  5022. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  5023. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  5024. AC_MSG_CHECKING([dynamic linker characteristics])
  5025. m4_if([$1],
  5026. [], [
  5027. if test yes = "$GCC"; then
  5028. case $host_os in
  5029. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  5030. *) lt_awk_arg='/^libraries:/' ;;
  5031. esac
  5032. case $host_os in
  5033. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  5034. *) lt_sed_strip_eq='s|=/|/|g' ;;
  5035. esac
  5036. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  5037. case $lt_search_path_spec in
  5038. *\;*)
  5039. # if the path contains ";" then we assume it to be the separator
  5040. # otherwise default to the standard path separator (i.e. ":") - it is
  5041. # assumed that no part of a normal pathname contains ";" but that should
  5042. # okay in the real world where ";" in dirpaths is itself problematic.
  5043. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  5044. ;;
  5045. *)
  5046. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  5047. ;;
  5048. esac
  5049. # Ok, now we have the path, separated by spaces, we can step through it
  5050. # and add multilib dir if necessary...
  5051. lt_tmp_lt_search_path_spec=
  5052. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  5053. # ...but if some path component already ends with the multilib dir we assume
  5054. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  5055. case "$lt_multi_os_dir; $lt_search_path_spec " in
  5056. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  5057. lt_multi_os_dir=
  5058. ;;
  5059. esac
  5060. for lt_sys_path in $lt_search_path_spec; do
  5061. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  5062. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  5063. elif test -n "$lt_multi_os_dir"; then
  5064. test -d "$lt_sys_path" && \
  5065. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  5066. fi
  5067. done
  5068. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  5069. BEGIN {RS = " "; FS = "/|\n";} {
  5070. lt_foo = "";
  5071. lt_count = 0;
  5072. for (lt_i = NF; lt_i > 0; lt_i--) {
  5073. if ($lt_i != "" && $lt_i != ".") {
  5074. if ($lt_i == "..") {
  5075. lt_count++;
  5076. } else {
  5077. if (lt_count == 0) {
  5078. lt_foo = "/" $lt_i lt_foo;
  5079. } else {
  5080. lt_count--;
  5081. }
  5082. }
  5083. }
  5084. }
  5085. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  5086. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  5087. }'`
  5088. # AWK program above erroneously prepends '/' to C:/dos/paths
  5089. # for these hosts.
  5090. case $host_os in
  5091. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  5092. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  5093. esac
  5094. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  5095. else
  5096. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  5097. fi])
  5098. library_names_spec=
  5099. libname_spec='lib$name'
  5100. soname_spec=
  5101. shrext_cmds=.so
  5102. postinstall_cmds=
  5103. postuninstall_cmds=
  5104. finish_cmds=
  5105. finish_eval=
  5106. shlibpath_var=
  5107. shlibpath_overrides_runpath=unknown
  5108. version_type=none
  5109. dynamic_linker="$host_os ld.so"
  5110. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  5111. need_lib_prefix=unknown
  5112. hardcode_into_libs=no
  5113. # when you set need_version to no, make sure it does not cause -set_version
  5114. # flags to be left without arguments
  5115. need_version=unknown
  5116. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  5117. [User-defined run-time library search path.])
  5118. case $host_os in
  5119. aix3*)
  5120. version_type=linux # correct to gnu/linux during the next big refactor
  5121. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  5122. shlibpath_var=LIBPATH
  5123. # AIX 3 has no versioning support, so we append a major version to the name.
  5124. soname_spec='$libname$release$shared_ext$major'
  5125. ;;
  5126. aix[[4-9]]*)
  5127. version_type=linux # correct to gnu/linux during the next big refactor
  5128. need_lib_prefix=no
  5129. need_version=no
  5130. hardcode_into_libs=yes
  5131. if test ia64 = "$host_cpu"; then
  5132. # AIX 5 supports IA64
  5133. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  5134. shlibpath_var=LD_LIBRARY_PATH
  5135. else
  5136. # With GCC up to 2.95.x, collect2 would create an import file
  5137. # for dependence libraries. The import file would start with
  5138. # the line '#! .'. This would cause the generated library to
  5139. # depend on '.', always an invalid library. This was fixed in
  5140. # development snapshots of GCC prior to 3.0.
  5141. case $host_os in
  5142. aix4 | aix4.[[01]] | aix4.[[01]].*)
  5143. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  5144. echo ' yes '
  5145. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  5146. :
  5147. else
  5148. can_build_shared=no
  5149. fi
  5150. ;;
  5151. esac
  5152. # Using Import Files as archive members, it is possible to support
  5153. # filename-based versioning of shared library archives on AIX. While
  5154. # this would work for both with and without runtime linking, it will
  5155. # prevent static linking of such archives. So we do filename-based
  5156. # shared library versioning with .so extension only, which is used
  5157. # when both runtime linking and shared linking is enabled.
  5158. # Unfortunately, runtime linking may impact performance, so we do
  5159. # not want this to be the default eventually. Also, we use the
  5160. # versioned .so libs for executables only if there is the -brtl
  5161. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  5162. # To allow for filename-based versioning support, we need to create
  5163. # libNAME.so.V as an archive file, containing:
  5164. # *) an Import File, referring to the versioned filename of the
  5165. # archive as well as the shared archive member, telling the
  5166. # bitwidth (32 or 64) of that shared object, and providing the
  5167. # list of exported symbols of that shared object, eventually
  5168. # decorated with the 'weak' keyword
  5169. # *) the shared object with the F_LOADONLY flag set, to really avoid
  5170. # it being seen by the linker.
  5171. # At run time we better use the real file rather than another symlink,
  5172. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  5173. case $with_aix_soname,$aix_use_runtimelinking in
  5174. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  5175. # soname into executable. Probably we can add versioning support to
  5176. # collect2, so additional links can be useful in future.
  5177. aix,yes) # traditional libtool
  5178. dynamic_linker='AIX unversionable lib.so'
  5179. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  5180. # instead of lib<name>.a to let people know that these are not
  5181. # typical AIX shared libraries.
  5182. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5183. ;;
  5184. aix,no) # traditional AIX only
  5185. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  5186. # We preserve .a as extension for shared libraries through AIX4.2
  5187. # and later when we are not doing run time linking.
  5188. library_names_spec='$libname$release.a $libname.a'
  5189. soname_spec='$libname$release$shared_ext$major'
  5190. ;;
  5191. svr4,*) # full svr4 only
  5192. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  5193. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  5194. # We do not specify a path in Import Files, so LIBPATH fires.
  5195. shlibpath_overrides_runpath=yes
  5196. ;;
  5197. *,yes) # both, prefer svr4
  5198. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  5199. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  5200. # unpreferred sharedlib libNAME.a needs extra handling
  5201. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  5202. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  5203. # We do not specify a path in Import Files, so LIBPATH fires.
  5204. shlibpath_overrides_runpath=yes
  5205. ;;
  5206. *,no) # both, prefer aix
  5207. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  5208. library_names_spec='$libname$release.a $libname.a'
  5209. soname_spec='$libname$release$shared_ext$major'
  5210. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  5211. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  5212. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  5213. ;;
  5214. esac
  5215. shlibpath_var=LIBPATH
  5216. fi
  5217. ;;
  5218. amigaos*)
  5219. case $host_cpu in
  5220. powerpc)
  5221. # Since July 2007 AmigaOS4 officially supports .so libraries.
  5222. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  5223. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5224. ;;
  5225. m68k)
  5226. library_names_spec='$libname.ixlibrary $libname.a'
  5227. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  5228. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  5229. ;;
  5230. esac
  5231. ;;
  5232. beos*)
  5233. library_names_spec='$libname$shared_ext'
  5234. dynamic_linker="$host_os ld.so"
  5235. shlibpath_var=LIBRARY_PATH
  5236. ;;
  5237. bsdi[[45]]*)
  5238. version_type=linux # correct to gnu/linux during the next big refactor
  5239. need_version=no
  5240. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5241. soname_spec='$libname$release$shared_ext$major'
  5242. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  5243. shlibpath_var=LD_LIBRARY_PATH
  5244. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  5245. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  5246. # the default ld.so.conf also contains /usr/contrib/lib and
  5247. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  5248. # libtool to hard-code these into programs
  5249. ;;
  5250. cygwin* | mingw* | pw32* | cegcc*)
  5251. version_type=windows
  5252. shrext_cmds=.dll
  5253. need_version=no
  5254. need_lib_prefix=no
  5255. case $GCC,$cc_basename in
  5256. yes,*)
  5257. # gcc
  5258. library_names_spec='$libname.dll.a'
  5259. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  5260. postinstall_cmds='base_file=`basename \$file`~
  5261. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  5262. dldir=$destdir/`dirname \$dlpath`~
  5263. test -d \$dldir || mkdir -p \$dldir~
  5264. $install_prog $dir/$dlname \$dldir/$dlname~
  5265. chmod a+x \$dldir/$dlname~
  5266. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  5267. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  5268. fi'
  5269. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  5270. dlpath=$dir/\$dldll~
  5271. $RM \$dlpath'
  5272. shlibpath_overrides_runpath=yes
  5273. case $host_os in
  5274. cygwin*)
  5275. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  5276. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  5277. m4_if([$1], [],[
  5278. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  5279. ;;
  5280. mingw* | cegcc*)
  5281. # MinGW DLLs use traditional 'lib' prefix
  5282. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  5283. ;;
  5284. pw32*)
  5285. # pw32 DLLs use 'pw' prefix rather than 'lib'
  5286. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  5287. ;;
  5288. esac
  5289. dynamic_linker='Win32 ld.exe'
  5290. ;;
  5291. *,cl*)
  5292. # Native MSVC
  5293. libname_spec='$name'
  5294. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  5295. library_names_spec='$libname.dll.lib'
  5296. case $build_os in
  5297. mingw*)
  5298. sys_lib_search_path_spec=
  5299. lt_save_ifs=$IFS
  5300. IFS=';'
  5301. for lt_path in $LIB
  5302. do
  5303. IFS=$lt_save_ifs
  5304. # Let DOS variable expansion print the short 8.3 style file name.
  5305. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  5306. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  5307. done
  5308. IFS=$lt_save_ifs
  5309. # Convert to MSYS style.
  5310. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  5311. ;;
  5312. cygwin*)
  5313. # Convert to unix form, then to dos form, then back to unix form
  5314. # but this time dos style (no spaces!) so that the unix form looks
  5315. # like /cygdrive/c/PROGRA~1:/cygdr...
  5316. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  5317. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  5318. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  5319. ;;
  5320. *)
  5321. sys_lib_search_path_spec=$LIB
  5322. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  5323. # It is most probably a Windows format PATH.
  5324. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  5325. else
  5326. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  5327. fi
  5328. # FIXME: find the short name or the path components, as spaces are
  5329. # common. (e.g. "Program Files" -> "PROGRA~1")
  5330. ;;
  5331. esac
  5332. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  5333. postinstall_cmds='base_file=`basename \$file`~
  5334. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  5335. dldir=$destdir/`dirname \$dlpath`~
  5336. test -d \$dldir || mkdir -p \$dldir~
  5337. $install_prog $dir/$dlname \$dldir/$dlname'
  5338. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  5339. dlpath=$dir/\$dldll~
  5340. $RM \$dlpath'
  5341. shlibpath_overrides_runpath=yes
  5342. dynamic_linker='Win32 link.exe'
  5343. ;;
  5344. *)
  5345. # Assume MSVC wrapper
  5346. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  5347. dynamic_linker='Win32 ld.exe'
  5348. ;;
  5349. esac
  5350. # FIXME: first we should search . and the directory the executable is in
  5351. shlibpath_var=PATH
  5352. ;;
  5353. darwin* | rhapsody*)
  5354. dynamic_linker="$host_os dyld"
  5355. version_type=darwin
  5356. need_lib_prefix=no
  5357. need_version=no
  5358. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  5359. soname_spec='$libname$release$major$shared_ext'
  5360. shlibpath_overrides_runpath=yes
  5361. shlibpath_var=DYLD_LIBRARY_PATH
  5362. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  5363. m4_if([$1], [],[
  5364. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  5365. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  5366. ;;
  5367. dgux*)
  5368. version_type=linux # correct to gnu/linux during the next big refactor
  5369. need_lib_prefix=no
  5370. need_version=no
  5371. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5372. soname_spec='$libname$release$shared_ext$major'
  5373. shlibpath_var=LD_LIBRARY_PATH
  5374. ;;
  5375. freebsd* | dragonfly*)
  5376. # DragonFly does not have aout. When/if they implement a new
  5377. # versioning mechanism, adjust this.
  5378. if test -x /usr/bin/objformat; then
  5379. objformat=`/usr/bin/objformat`
  5380. else
  5381. case $host_os in
  5382. freebsd[[23]].*) objformat=aout ;;
  5383. *) objformat=elf ;;
  5384. esac
  5385. fi
  5386. version_type=freebsd-$objformat
  5387. case $version_type in
  5388. freebsd-elf*)
  5389. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5390. soname_spec='$libname$release$shared_ext$major'
  5391. need_version=no
  5392. need_lib_prefix=no
  5393. ;;
  5394. freebsd-*)
  5395. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  5396. need_version=yes
  5397. ;;
  5398. esac
  5399. shlibpath_var=LD_LIBRARY_PATH
  5400. case $host_os in
  5401. freebsd2.*)
  5402. shlibpath_overrides_runpath=yes
  5403. ;;
  5404. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  5405. shlibpath_overrides_runpath=yes
  5406. hardcode_into_libs=yes
  5407. ;;
  5408. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  5409. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  5410. shlibpath_overrides_runpath=no
  5411. hardcode_into_libs=yes
  5412. ;;
  5413. *) # from 4.6 on, and DragonFly
  5414. shlibpath_overrides_runpath=yes
  5415. hardcode_into_libs=yes
  5416. ;;
  5417. esac
  5418. ;;
  5419. haiku*)
  5420. version_type=linux # correct to gnu/linux during the next big refactor
  5421. need_lib_prefix=no
  5422. need_version=no
  5423. dynamic_linker="$host_os runtime_loader"
  5424. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5425. soname_spec='$libname$release$shared_ext$major'
  5426. shlibpath_var=LIBRARY_PATH
  5427. shlibpath_overrides_runpath=no
  5428. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  5429. hardcode_into_libs=yes
  5430. ;;
  5431. hpux9* | hpux10* | hpux11*)
  5432. # Give a soname corresponding to the major version so that dld.sl refuses to
  5433. # link against other versions.
  5434. version_type=sunos
  5435. need_lib_prefix=no
  5436. need_version=no
  5437. case $host_cpu in
  5438. ia64*)
  5439. shrext_cmds='.so'
  5440. hardcode_into_libs=yes
  5441. dynamic_linker="$host_os dld.so"
  5442. shlibpath_var=LD_LIBRARY_PATH
  5443. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  5444. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5445. soname_spec='$libname$release$shared_ext$major'
  5446. if test 32 = "$HPUX_IA64_MODE"; then
  5447. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  5448. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  5449. else
  5450. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  5451. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  5452. fi
  5453. ;;
  5454. hppa*64*)
  5455. shrext_cmds='.sl'
  5456. hardcode_into_libs=yes
  5457. dynamic_linker="$host_os dld.sl"
  5458. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  5459. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  5460. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5461. soname_spec='$libname$release$shared_ext$major'
  5462. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  5463. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  5464. ;;
  5465. *)
  5466. shrext_cmds='.sl'
  5467. dynamic_linker="$host_os dld.sl"
  5468. shlibpath_var=SHLIB_PATH
  5469. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  5470. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5471. soname_spec='$libname$release$shared_ext$major'
  5472. ;;
  5473. esac
  5474. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  5475. postinstall_cmds='chmod 555 $lib'
  5476. # or fails outright, so override atomically:
  5477. install_override_mode=555
  5478. ;;
  5479. interix[[3-9]]*)
  5480. version_type=linux # correct to gnu/linux during the next big refactor
  5481. need_lib_prefix=no
  5482. need_version=no
  5483. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5484. soname_spec='$libname$release$shared_ext$major'
  5485. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  5486. shlibpath_var=LD_LIBRARY_PATH
  5487. shlibpath_overrides_runpath=no
  5488. hardcode_into_libs=yes
  5489. ;;
  5490. irix5* | irix6* | nonstopux*)
  5491. case $host_os in
  5492. nonstopux*) version_type=nonstopux ;;
  5493. *)
  5494. if test yes = "$lt_cv_prog_gnu_ld"; then
  5495. version_type=linux # correct to gnu/linux during the next big refactor
  5496. else
  5497. version_type=irix
  5498. fi ;;
  5499. esac
  5500. need_lib_prefix=no
  5501. need_version=no
  5502. soname_spec='$libname$release$shared_ext$major'
  5503. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  5504. case $host_os in
  5505. irix5* | nonstopux*)
  5506. libsuff= shlibsuff=
  5507. ;;
  5508. *)
  5509. case $LD in # libtool.m4 will add one of these switches to LD
  5510. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  5511. libsuff= shlibsuff= libmagic=32-bit;;
  5512. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  5513. libsuff=32 shlibsuff=N32 libmagic=N32;;
  5514. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  5515. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  5516. *) libsuff= shlibsuff= libmagic=never-match;;
  5517. esac
  5518. ;;
  5519. esac
  5520. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  5521. shlibpath_overrides_runpath=no
  5522. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  5523. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  5524. hardcode_into_libs=yes
  5525. ;;
  5526. # No shared lib support for Linux oldld, aout, or coff.
  5527. linux*oldld* | linux*aout* | linux*coff*)
  5528. dynamic_linker=no
  5529. ;;
  5530. linux*android*)
  5531. version_type=none # Android doesn't support versioned libraries.
  5532. need_lib_prefix=no
  5533. need_version=no
  5534. library_names_spec='$libname$release$shared_ext'
  5535. soname_spec='$libname$release$shared_ext'
  5536. finish_cmds=
  5537. shlibpath_var=LD_LIBRARY_PATH
  5538. shlibpath_overrides_runpath=yes
  5539. # This implies no fast_install, which is unacceptable.
  5540. # Some rework will be needed to allow for fast_install
  5541. # before this can be enabled.
  5542. hardcode_into_libs=yes
  5543. dynamic_linker='Android linker'
  5544. # Don't embed -rpath directories since the linker doesn't support them.
  5545. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5546. ;;
  5547. # This must be glibc/ELF.
  5548. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5549. version_type=linux # correct to gnu/linux during the next big refactor
  5550. need_lib_prefix=no
  5551. need_version=no
  5552. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5553. soname_spec='$libname$release$shared_ext$major'
  5554. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  5555. shlibpath_var=LD_LIBRARY_PATH
  5556. shlibpath_overrides_runpath=no
  5557. # Some binutils ld are patched to set DT_RUNPATH
  5558. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  5559. [lt_cv_shlibpath_overrides_runpath=no
  5560. save_LDFLAGS=$LDFLAGS
  5561. save_libdir=$libdir
  5562. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  5563. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  5564. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  5565. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  5566. [lt_cv_shlibpath_overrides_runpath=yes])])
  5567. LDFLAGS=$save_LDFLAGS
  5568. libdir=$save_libdir
  5569. ])
  5570. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  5571. # This implies no fast_install, which is unacceptable.
  5572. # Some rework will be needed to allow for fast_install
  5573. # before this can be enabled.
  5574. hardcode_into_libs=yes
  5575. # Ideally, we could use ldconfig to report *all* directores which are
  5576. # searched for libraries, however this is still not possible. Aside from not
  5577. # being certain /sbin/ldconfig is available, command
  5578. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  5579. # even though it is searched at run-time. Try to do the best guess by
  5580. # appending ld.so.conf contents (and includes) to the search path.
  5581. if test -f /etc/ld.so.conf; then
  5582. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  5583. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  5584. fi
  5585. # We used to test for /lib/ld.so.1 and disable shared libraries on
  5586. # powerpc, because MkLinux only supported shared libraries with the
  5587. # GNU dynamic linker. Since this was broken with cross compilers,
  5588. # most powerpc-linux boxes support dynamic linking these days and
  5589. # people can always --disable-shared, the test was removed, and we
  5590. # assume the GNU/Linux dynamic linker is in use.
  5591. dynamic_linker='GNU/Linux ld.so'
  5592. ;;
  5593. netbsdelf*-gnu)
  5594. version_type=linux
  5595. need_lib_prefix=no
  5596. need_version=no
  5597. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  5598. soname_spec='${libname}${release}${shared_ext}$major'
  5599. shlibpath_var=LD_LIBRARY_PATH
  5600. shlibpath_overrides_runpath=no
  5601. hardcode_into_libs=yes
  5602. dynamic_linker='NetBSD ld.elf_so'
  5603. ;;
  5604. netbsd*)
  5605. version_type=sunos
  5606. need_lib_prefix=no
  5607. need_version=no
  5608. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5609. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  5610. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  5611. dynamic_linker='NetBSD (a.out) ld.so'
  5612. else
  5613. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5614. soname_spec='$libname$release$shared_ext$major'
  5615. dynamic_linker='NetBSD ld.elf_so'
  5616. fi
  5617. shlibpath_var=LD_LIBRARY_PATH
  5618. shlibpath_overrides_runpath=yes
  5619. hardcode_into_libs=yes
  5620. ;;
  5621. newsos6)
  5622. version_type=linux # correct to gnu/linux during the next big refactor
  5623. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5624. shlibpath_var=LD_LIBRARY_PATH
  5625. shlibpath_overrides_runpath=yes
  5626. ;;
  5627. *nto* | *qnx*)
  5628. version_type=qnx
  5629. need_lib_prefix=no
  5630. need_version=no
  5631. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5632. soname_spec='$libname$release$shared_ext$major'
  5633. shlibpath_var=LD_LIBRARY_PATH
  5634. shlibpath_overrides_runpath=no
  5635. hardcode_into_libs=yes
  5636. dynamic_linker='ldqnx.so'
  5637. ;;
  5638. openbsd* | bitrig*)
  5639. version_type=sunos
  5640. sys_lib_dlsearch_path_spec=/usr/lib
  5641. need_lib_prefix=no
  5642. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5643. need_version=no
  5644. else
  5645. need_version=yes
  5646. fi
  5647. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  5648. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  5649. shlibpath_var=LD_LIBRARY_PATH
  5650. shlibpath_overrides_runpath=yes
  5651. ;;
  5652. os2*)
  5653. libname_spec='$name'
  5654. version_type=windows
  5655. shrext_cmds=.dll
  5656. need_version=no
  5657. need_lib_prefix=no
  5658. # OS/2 can only load a DLL with a base name of 8 characters or less.
  5659. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  5660. v=$($ECHO $release$versuffix | tr -d .-);
  5661. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  5662. $ECHO $n$v`$shared_ext'
  5663. library_names_spec='${libname}_dll.$libext'
  5664. dynamic_linker='OS/2 ld.exe'
  5665. shlibpath_var=BEGINLIBPATH
  5666. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  5667. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  5668. postinstall_cmds='base_file=`basename \$file`~
  5669. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  5670. dldir=$destdir/`dirname \$dlpath`~
  5671. test -d \$dldir || mkdir -p \$dldir~
  5672. $install_prog $dir/$dlname \$dldir/$dlname~
  5673. chmod a+x \$dldir/$dlname~
  5674. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  5675. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  5676. fi'
  5677. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  5678. dlpath=$dir/\$dldll~
  5679. $RM \$dlpath'
  5680. ;;
  5681. osf3* | osf4* | osf5*)
  5682. version_type=osf
  5683. need_lib_prefix=no
  5684. need_version=no
  5685. soname_spec='$libname$release$shared_ext$major'
  5686. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5687. shlibpath_var=LD_LIBRARY_PATH
  5688. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  5689. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  5690. ;;
  5691. rdos*)
  5692. dynamic_linker=no
  5693. ;;
  5694. solaris*)
  5695. version_type=linux # correct to gnu/linux during the next big refactor
  5696. need_lib_prefix=no
  5697. need_version=no
  5698. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5699. soname_spec='$libname$release$shared_ext$major'
  5700. shlibpath_var=LD_LIBRARY_PATH
  5701. shlibpath_overrides_runpath=yes
  5702. hardcode_into_libs=yes
  5703. # ldd complains unless libraries are executable
  5704. postinstall_cmds='chmod +x $lib'
  5705. ;;
  5706. sunos4*)
  5707. version_type=sunos
  5708. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  5709. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  5710. shlibpath_var=LD_LIBRARY_PATH
  5711. shlibpath_overrides_runpath=yes
  5712. if test yes = "$with_gnu_ld"; then
  5713. need_lib_prefix=no
  5714. fi
  5715. need_version=yes
  5716. ;;
  5717. sysv4 | sysv4.3*)
  5718. version_type=linux # correct to gnu/linux during the next big refactor
  5719. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5720. soname_spec='$libname$release$shared_ext$major'
  5721. shlibpath_var=LD_LIBRARY_PATH
  5722. case $host_vendor in
  5723. sni)
  5724. shlibpath_overrides_runpath=no
  5725. need_lib_prefix=no
  5726. runpath_var=LD_RUN_PATH
  5727. ;;
  5728. siemens)
  5729. need_lib_prefix=no
  5730. ;;
  5731. motorola)
  5732. need_lib_prefix=no
  5733. need_version=no
  5734. shlibpath_overrides_runpath=no
  5735. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  5736. ;;
  5737. esac
  5738. ;;
  5739. sysv4*MP*)
  5740. if test -d /usr/nec; then
  5741. version_type=linux # correct to gnu/linux during the next big refactor
  5742. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  5743. soname_spec='$libname$shared_ext.$major'
  5744. shlibpath_var=LD_LIBRARY_PATH
  5745. fi
  5746. ;;
  5747. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  5748. version_type=sco
  5749. need_lib_prefix=no
  5750. need_version=no
  5751. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  5752. soname_spec='$libname$release$shared_ext$major'
  5753. shlibpath_var=LD_LIBRARY_PATH
  5754. shlibpath_overrides_runpath=yes
  5755. hardcode_into_libs=yes
  5756. if test yes = "$with_gnu_ld"; then
  5757. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  5758. else
  5759. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  5760. case $host_os in
  5761. sco3.2v5*)
  5762. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  5763. ;;
  5764. esac
  5765. fi
  5766. sys_lib_dlsearch_path_spec='/usr/lib'
  5767. ;;
  5768. tpf*)
  5769. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  5770. version_type=linux # correct to gnu/linux during the next big refactor
  5771. need_lib_prefix=no
  5772. need_version=no
  5773. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5774. shlibpath_var=LD_LIBRARY_PATH
  5775. shlibpath_overrides_runpath=no
  5776. hardcode_into_libs=yes
  5777. ;;
  5778. uts4*)
  5779. version_type=linux # correct to gnu/linux during the next big refactor
  5780. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  5781. soname_spec='$libname$release$shared_ext$major'
  5782. shlibpath_var=LD_LIBRARY_PATH
  5783. ;;
  5784. *)
  5785. dynamic_linker=no
  5786. ;;
  5787. esac
  5788. AC_MSG_RESULT([$dynamic_linker])
  5789. test no = "$dynamic_linker" && can_build_shared=no
  5790. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  5791. if test yes = "$GCC"; then
  5792. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5793. fi
  5794. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  5795. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  5796. fi
  5797. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  5798. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  5799. fi
  5800. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  5801. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  5802. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  5803. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  5804. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  5805. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  5806. _LT_DECL([], [variables_saved_for_relink], [1],
  5807. [Variables whose values should be saved in libtool wrapper scripts and
  5808. restored at link time])
  5809. _LT_DECL([], [need_lib_prefix], [0],
  5810. [Do we need the "lib" prefix for modules?])
  5811. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  5812. _LT_DECL([], [version_type], [0], [Library versioning type])
  5813. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  5814. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  5815. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  5816. [Is shlibpath searched before the hard-coded library search path?])
  5817. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  5818. _LT_DECL([], [library_names_spec], [1],
  5819. [[List of archive names. First name is the real one, the rest are links.
  5820. The last name is the one that the linker finds with -lNAME]])
  5821. _LT_DECL([], [soname_spec], [1],
  5822. [[The coded name of the library, if different from the real name]])
  5823. _LT_DECL([], [install_override_mode], [1],
  5824. [Permission mode override for installation of shared libraries])
  5825. _LT_DECL([], [postinstall_cmds], [2],
  5826. [Command to use after installation of a shared archive])
  5827. _LT_DECL([], [postuninstall_cmds], [2],
  5828. [Command to use after uninstallation of a shared archive])
  5829. _LT_DECL([], [finish_cmds], [2],
  5830. [Commands used to finish a libtool library installation in a directory])
  5831. _LT_DECL([], [finish_eval], [1],
  5832. [[As "finish_cmds", except a single script fragment to be evaled but
  5833. not shown]])
  5834. _LT_DECL([], [hardcode_into_libs], [0],
  5835. [Whether we should hardcode library paths into libraries])
  5836. _LT_DECL([], [sys_lib_search_path_spec], [2],
  5837. [Compile-time system search path for libraries])
  5838. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  5839. [Detected run-time system search path for libraries])
  5840. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  5841. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  5842. ])# _LT_SYS_DYNAMIC_LINKER
  5843. # _LT_PATH_TOOL_PREFIX(TOOL)
  5844. # --------------------------
  5845. # find a file program that can recognize shared library
  5846. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  5847. [m4_require([_LT_DECL_EGREP])dnl
  5848. AC_MSG_CHECKING([for $1])
  5849. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  5850. [case $MAGIC_CMD in
  5851. [[\\/*] | ?:[\\/]*])
  5852. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  5853. ;;
  5854. *)
  5855. lt_save_MAGIC_CMD=$MAGIC_CMD
  5856. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  5857. dnl $ac_dummy forces splitting on constant user-supplied paths.
  5858. dnl POSIX.2 word splitting is done only on the output of word expansions,
  5859. dnl not every word. This closes a longstanding sh security hole.
  5860. ac_dummy="m4_if([$2], , $PATH, [$2])"
  5861. for ac_dir in $ac_dummy; do
  5862. IFS=$lt_save_ifs
  5863. test -z "$ac_dir" && ac_dir=.
  5864. if test -f "$ac_dir/$1"; then
  5865. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  5866. if test -n "$file_magic_test_file"; then
  5867. case $deplibs_check_method in
  5868. "file_magic "*)
  5869. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  5870. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  5871. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  5872. $EGREP "$file_magic_regex" > /dev/null; then
  5873. :
  5874. else
  5875. cat <<_LT_EOF 1>&2
  5876. *** Warning: the command libtool uses to detect shared libraries,
  5877. *** $file_magic_cmd, produces output that libtool cannot recognize.
  5878. *** The result is that libtool may fail to recognize shared libraries
  5879. *** as such. This will affect the creation of libtool libraries that
  5880. *** depend on shared libraries, but programs linked with such libtool
  5881. *** libraries will work regardless of this problem. Nevertheless, you
  5882. *** may want to report the problem to your system manager and/or to
  5883. *** bug-libtool@gnu.org
  5884. _LT_EOF
  5885. fi ;;
  5886. esac
  5887. fi
  5888. break
  5889. fi
  5890. done
  5891. IFS=$lt_save_ifs
  5892. MAGIC_CMD=$lt_save_MAGIC_CMD
  5893. ;;
  5894. esac])
  5895. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  5896. if test -n "$MAGIC_CMD"; then
  5897. AC_MSG_RESULT($MAGIC_CMD)
  5898. else
  5899. AC_MSG_RESULT(no)
  5900. fi
  5901. _LT_DECL([], [MAGIC_CMD], [0],
  5902. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  5903. ])# _LT_PATH_TOOL_PREFIX
  5904. # Old name:
  5905. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  5906. dnl aclocal-1.4 backwards compatibility:
  5907. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  5908. # _LT_PATH_MAGIC
  5909. # --------------
  5910. # find a file program that can recognize a shared library
  5911. m4_defun([_LT_PATH_MAGIC],
  5912. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  5913. if test -z "$lt_cv_path_MAGIC_CMD"; then
  5914. if test -n "$ac_tool_prefix"; then
  5915. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  5916. else
  5917. MAGIC_CMD=:
  5918. fi
  5919. fi
  5920. ])# _LT_PATH_MAGIC
  5921. # LT_PATH_LD
  5922. # ----------
  5923. # find the pathname to the GNU or non-GNU linker
  5924. AC_DEFUN([LT_PATH_LD],
  5925. [AC_REQUIRE([AC_PROG_CC])dnl
  5926. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5927. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  5928. m4_require([_LT_DECL_SED])dnl
  5929. m4_require([_LT_DECL_EGREP])dnl
  5930. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  5931. AC_ARG_WITH([gnu-ld],
  5932. [AS_HELP_STRING([--with-gnu-ld],
  5933. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  5934. [test no = "$withval" || with_gnu_ld=yes],
  5935. [with_gnu_ld=no])dnl
  5936. ac_prog=ld
  5937. if test yes = "$GCC"; then
  5938. # Check if gcc -print-prog-name=ld gives a path.
  5939. AC_MSG_CHECKING([for ld used by $CC])
  5940. case $host in
  5941. *-*-mingw*)
  5942. # gcc leaves a trailing carriage return, which upsets mingw
  5943. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  5944. *)
  5945. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  5946. esac
  5947. case $ac_prog in
  5948. # Accept absolute paths.
  5949. [[\\/]]* | ?:[[\\/]]*)
  5950. re_direlt='/[[^/]][[^/]]*/\.\./'
  5951. # Canonicalize the pathname of ld
  5952. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  5953. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  5954. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  5955. done
  5956. test -z "$LD" && LD=$ac_prog
  5957. ;;
  5958. "")
  5959. # If it fails, then pretend we aren't using GCC.
  5960. ac_prog=ld
  5961. ;;
  5962. *)
  5963. # If it is relative, then search for the first ld in PATH.
  5964. with_gnu_ld=unknown
  5965. ;;
  5966. esac
  5967. elif test yes = "$with_gnu_ld"; then
  5968. AC_MSG_CHECKING([for GNU ld])
  5969. else
  5970. AC_MSG_CHECKING([for non-GNU ld])
  5971. fi
  5972. AC_CACHE_VAL(lt_cv_path_LD,
  5973. [if test -z "$LD"; then
  5974. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  5975. for ac_dir in $PATH; do
  5976. IFS=$lt_save_ifs
  5977. test -z "$ac_dir" && ac_dir=.
  5978. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  5979. lt_cv_path_LD=$ac_dir/$ac_prog
  5980. # Check to see if the program is GNU ld. I'd rather use --version,
  5981. # but apparently some variants of GNU ld only accept -v.
  5982. # Break only if it was the GNU/non-GNU ld that we prefer.
  5983. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  5984. *GNU* | *'with BFD'*)
  5985. test no != "$with_gnu_ld" && break
  5986. ;;
  5987. *)
  5988. test yes != "$with_gnu_ld" && break
  5989. ;;
  5990. esac
  5991. fi
  5992. done
  5993. IFS=$lt_save_ifs
  5994. else
  5995. lt_cv_path_LD=$LD # Let the user override the test with a path.
  5996. fi])
  5997. LD=$lt_cv_path_LD
  5998. if test -n "$LD"; then
  5999. AC_MSG_RESULT($LD)
  6000. else
  6001. AC_MSG_RESULT(no)
  6002. fi
  6003. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  6004. _LT_PATH_LD_GNU
  6005. AC_SUBST([LD])
  6006. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  6007. ])# LT_PATH_LD
  6008. # Old names:
  6009. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  6010. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  6011. dnl aclocal-1.4 backwards compatibility:
  6012. dnl AC_DEFUN([AM_PROG_LD], [])
  6013. dnl AC_DEFUN([AC_PROG_LD], [])
  6014. # _LT_PATH_LD_GNU
  6015. #- --------------
  6016. m4_defun([_LT_PATH_LD_GNU],
  6017. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  6018. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  6019. case `$LD -v 2>&1 </dev/null` in
  6020. *GNU* | *'with BFD'*)
  6021. lt_cv_prog_gnu_ld=yes
  6022. ;;
  6023. *)
  6024. lt_cv_prog_gnu_ld=no
  6025. ;;
  6026. esac])
  6027. with_gnu_ld=$lt_cv_prog_gnu_ld
  6028. ])# _LT_PATH_LD_GNU
  6029. # _LT_CMD_RELOAD
  6030. # --------------
  6031. # find reload flag for linker
  6032. # -- PORTME Some linkers may need a different reload flag.
  6033. m4_defun([_LT_CMD_RELOAD],
  6034. [AC_CACHE_CHECK([for $LD option to reload object files],
  6035. lt_cv_ld_reload_flag,
  6036. [lt_cv_ld_reload_flag='-r'])
  6037. reload_flag=$lt_cv_ld_reload_flag
  6038. case $reload_flag in
  6039. "" | " "*) ;;
  6040. *) reload_flag=" $reload_flag" ;;
  6041. esac
  6042. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  6043. case $host_os in
  6044. cygwin* | mingw* | pw32* | cegcc*)
  6045. if test yes != "$GCC"; then
  6046. reload_cmds=false
  6047. fi
  6048. ;;
  6049. darwin*)
  6050. if test yes = "$GCC"; then
  6051. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  6052. else
  6053. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  6054. fi
  6055. ;;
  6056. esac
  6057. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  6058. _LT_TAGDECL([], [reload_cmds], [2])dnl
  6059. ])# _LT_CMD_RELOAD
  6060. # _LT_PATH_DD
  6061. # -----------
  6062. # find a working dd
  6063. m4_defun([_LT_PATH_DD],
  6064. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  6065. [printf 0123456789abcdef0123456789abcdef >conftest.i
  6066. cat conftest.i conftest.i >conftest2.i
  6067. : ${lt_DD:=$DD}
  6068. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  6069. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  6070. cmp -s conftest.i conftest.out \
  6071. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  6072. fi])
  6073. rm -f conftest.i conftest2.i conftest.out])
  6074. ])# _LT_PATH_DD
  6075. # _LT_CMD_TRUNCATE
  6076. # ----------------
  6077. # find command to truncate a binary pipe
  6078. m4_defun([_LT_CMD_TRUNCATE],
  6079. [m4_require([_LT_PATH_DD])
  6080. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  6081. [printf 0123456789abcdef0123456789abcdef >conftest.i
  6082. cat conftest.i conftest.i >conftest2.i
  6083. lt_cv_truncate_bin=
  6084. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  6085. cmp -s conftest.i conftest.out \
  6086. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  6087. fi
  6088. rm -f conftest.i conftest2.i conftest.out
  6089. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  6090. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  6091. [Command to truncate a binary pipe])
  6092. ])# _LT_CMD_TRUNCATE
  6093. # _LT_CHECK_MAGIC_METHOD
  6094. # ----------------------
  6095. # how to check for library dependencies
  6096. # -- PORTME fill in with the dynamic library characteristics
  6097. m4_defun([_LT_CHECK_MAGIC_METHOD],
  6098. [m4_require([_LT_DECL_EGREP])
  6099. m4_require([_LT_DECL_OBJDUMP])
  6100. AC_CACHE_CHECK([how to recognize dependent libraries],
  6101. lt_cv_deplibs_check_method,
  6102. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  6103. lt_cv_file_magic_test_file=
  6104. lt_cv_deplibs_check_method='unknown'
  6105. # Need to set the preceding variable on all platforms that support
  6106. # interlibrary dependencies.
  6107. # 'none' -- dependencies not supported.
  6108. # 'unknown' -- same as none, but documents that we really don't know.
  6109. # 'pass_all' -- all dependencies passed with no checks.
  6110. # 'test_compile' -- check by making test program.
  6111. # 'file_magic [[regex]]' -- check by looking for files in library path
  6112. # that responds to the $file_magic_cmd with a given extended regex.
  6113. # If you have 'file' or equivalent on your system and you're not sure
  6114. # whether 'pass_all' will *always* work, you probably want this one.
  6115. case $host_os in
  6116. aix[[4-9]]*)
  6117. lt_cv_deplibs_check_method=pass_all
  6118. ;;
  6119. beos*)
  6120. lt_cv_deplibs_check_method=pass_all
  6121. ;;
  6122. bsdi[[45]]*)
  6123. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  6124. lt_cv_file_magic_cmd='/usr/bin/file -L'
  6125. lt_cv_file_magic_test_file=/shlib/libc.so
  6126. ;;
  6127. cygwin*)
  6128. # func_win32_libid is a shell function defined in ltmain.sh
  6129. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  6130. lt_cv_file_magic_cmd='func_win32_libid'
  6131. ;;
  6132. mingw* | pw32*)
  6133. # Base MSYS/MinGW do not provide the 'file' command needed by
  6134. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  6135. # unless we find 'file', for example because we are cross-compiling.
  6136. if ( file / ) >/dev/null 2>&1; then
  6137. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  6138. lt_cv_file_magic_cmd='func_win32_libid'
  6139. else
  6140. # Keep this pattern in sync with the one in func_win32_libid.
  6141. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  6142. lt_cv_file_magic_cmd='$OBJDUMP -f'
  6143. fi
  6144. ;;
  6145. cegcc*)
  6146. # use the weaker test based on 'objdump'. See mingw*.
  6147. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  6148. lt_cv_file_magic_cmd='$OBJDUMP -f'
  6149. ;;
  6150. darwin* | rhapsody*)
  6151. lt_cv_deplibs_check_method=pass_all
  6152. ;;
  6153. freebsd* | dragonfly*)
  6154. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  6155. case $host_cpu in
  6156. i*86 )
  6157. # Not sure whether the presence of OpenBSD here was a mistake.
  6158. # Let's accept both of them until this is cleared up.
  6159. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  6160. lt_cv_file_magic_cmd=/usr/bin/file
  6161. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  6162. ;;
  6163. esac
  6164. else
  6165. lt_cv_deplibs_check_method=pass_all
  6166. fi
  6167. ;;
  6168. haiku*)
  6169. lt_cv_deplibs_check_method=pass_all
  6170. ;;
  6171. hpux10.20* | hpux11*)
  6172. lt_cv_file_magic_cmd=/usr/bin/file
  6173. case $host_cpu in
  6174. ia64*)
  6175. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  6176. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  6177. ;;
  6178. hppa*64*)
  6179. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  6180. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  6181. ;;
  6182. *)
  6183. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  6184. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  6185. ;;
  6186. esac
  6187. ;;
  6188. interix[[3-9]]*)
  6189. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  6190. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  6191. ;;
  6192. irix5* | irix6* | nonstopux*)
  6193. case $LD in
  6194. *-32|*"-32 ") libmagic=32-bit;;
  6195. *-n32|*"-n32 ") libmagic=N32;;
  6196. *-64|*"-64 ") libmagic=64-bit;;
  6197. *) libmagic=never-match;;
  6198. esac
  6199. lt_cv_deplibs_check_method=pass_all
  6200. ;;
  6201. # This must be glibc/ELF.
  6202. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6203. lt_cv_deplibs_check_method=pass_all
  6204. ;;
  6205. netbsd* | netbsdelf*-gnu)
  6206. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  6207. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  6208. else
  6209. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  6210. fi
  6211. ;;
  6212. newos6*)
  6213. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  6214. lt_cv_file_magic_cmd=/usr/bin/file
  6215. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  6216. ;;
  6217. *nto* | *qnx*)
  6218. lt_cv_deplibs_check_method=pass_all
  6219. ;;
  6220. openbsd* | bitrig*)
  6221. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  6222. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  6223. else
  6224. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  6225. fi
  6226. ;;
  6227. osf3* | osf4* | osf5*)
  6228. lt_cv_deplibs_check_method=pass_all
  6229. ;;
  6230. rdos*)
  6231. lt_cv_deplibs_check_method=pass_all
  6232. ;;
  6233. solaris*)
  6234. lt_cv_deplibs_check_method=pass_all
  6235. ;;
  6236. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  6237. lt_cv_deplibs_check_method=pass_all
  6238. ;;
  6239. sysv4 | sysv4.3*)
  6240. case $host_vendor in
  6241. motorola)
  6242. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  6243. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  6244. ;;
  6245. ncr)
  6246. lt_cv_deplibs_check_method=pass_all
  6247. ;;
  6248. sequent)
  6249. lt_cv_file_magic_cmd='/bin/file'
  6250. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  6251. ;;
  6252. sni)
  6253. lt_cv_file_magic_cmd='/bin/file'
  6254. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  6255. lt_cv_file_magic_test_file=/lib/libc.so
  6256. ;;
  6257. siemens)
  6258. lt_cv_deplibs_check_method=pass_all
  6259. ;;
  6260. pc)
  6261. lt_cv_deplibs_check_method=pass_all
  6262. ;;
  6263. esac
  6264. ;;
  6265. tpf*)
  6266. lt_cv_deplibs_check_method=pass_all
  6267. ;;
  6268. os2*)
  6269. lt_cv_deplibs_check_method=pass_all
  6270. ;;
  6271. esac
  6272. ])
  6273. file_magic_glob=
  6274. want_nocaseglob=no
  6275. if test "$build" = "$host"; then
  6276. case $host_os in
  6277. mingw* | pw32*)
  6278. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  6279. want_nocaseglob=yes
  6280. else
  6281. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  6282. fi
  6283. ;;
  6284. esac
  6285. fi
  6286. file_magic_cmd=$lt_cv_file_magic_cmd
  6287. deplibs_check_method=$lt_cv_deplibs_check_method
  6288. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  6289. _LT_DECL([], [deplibs_check_method], [1],
  6290. [Method to check whether dependent libraries are shared objects])
  6291. _LT_DECL([], [file_magic_cmd], [1],
  6292. [Command to use when deplibs_check_method = "file_magic"])
  6293. _LT_DECL([], [file_magic_glob], [1],
  6294. [How to find potential files when deplibs_check_method = "file_magic"])
  6295. _LT_DECL([], [want_nocaseglob], [1],
  6296. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  6297. ])# _LT_CHECK_MAGIC_METHOD
  6298. # LT_PATH_NM
  6299. # ----------
  6300. # find the pathname to a BSD- or MS-compatible name lister
  6301. AC_DEFUN([LT_PATH_NM],
  6302. [AC_REQUIRE([AC_PROG_CC])dnl
  6303. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  6304. [if test -n "$NM"; then
  6305. # Let the user override the test.
  6306. lt_cv_path_NM=$NM
  6307. else
  6308. lt_nm_to_check=${ac_tool_prefix}nm
  6309. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  6310. lt_nm_to_check="$lt_nm_to_check nm"
  6311. fi
  6312. for lt_tmp_nm in $lt_nm_to_check; do
  6313. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  6314. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  6315. IFS=$lt_save_ifs
  6316. test -z "$ac_dir" && ac_dir=.
  6317. tmp_nm=$ac_dir/$lt_tmp_nm
  6318. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  6319. # Check to see if the nm accepts a BSD-compat flag.
  6320. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  6321. # nm: unknown option "B" ignored
  6322. # Tru64's nm complains that /dev/null is an invalid object file
  6323. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  6324. case $build_os in
  6325. mingw*) lt_bad_file=conftest.nm/nofile ;;
  6326. *) lt_bad_file=/dev/null ;;
  6327. esac
  6328. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  6329. *$lt_bad_file* | *'Invalid file or object type'*)
  6330. lt_cv_path_NM="$tmp_nm -B"
  6331. break 2
  6332. ;;
  6333. *)
  6334. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  6335. */dev/null*)
  6336. lt_cv_path_NM="$tmp_nm -p"
  6337. break 2
  6338. ;;
  6339. *)
  6340. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  6341. continue # so that we can try to find one that supports BSD flags
  6342. ;;
  6343. esac
  6344. ;;
  6345. esac
  6346. fi
  6347. done
  6348. IFS=$lt_save_ifs
  6349. done
  6350. : ${lt_cv_path_NM=no}
  6351. fi])
  6352. if test no != "$lt_cv_path_NM"; then
  6353. NM=$lt_cv_path_NM
  6354. else
  6355. # Didn't find any BSD compatible name lister, look for dumpbin.
  6356. if test -n "$DUMPBIN"; then :
  6357. # Let the user override the test.
  6358. else
  6359. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  6360. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  6361. *COFF*)
  6362. DUMPBIN="$DUMPBIN -symbols -headers"
  6363. ;;
  6364. *)
  6365. DUMPBIN=:
  6366. ;;
  6367. esac
  6368. fi
  6369. AC_SUBST([DUMPBIN])
  6370. if test : != "$DUMPBIN"; then
  6371. NM=$DUMPBIN
  6372. fi
  6373. fi
  6374. test -z "$NM" && NM=nm
  6375. AC_SUBST([NM])
  6376. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  6377. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  6378. [lt_cv_nm_interface="BSD nm"
  6379. echo "int some_variable = 0;" > conftest.$ac_ext
  6380. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  6381. (eval "$ac_compile" 2>conftest.err)
  6382. cat conftest.err >&AS_MESSAGE_LOG_FD
  6383. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  6384. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  6385. cat conftest.err >&AS_MESSAGE_LOG_FD
  6386. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  6387. cat conftest.out >&AS_MESSAGE_LOG_FD
  6388. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  6389. lt_cv_nm_interface="MS dumpbin"
  6390. fi
  6391. rm -f conftest*])
  6392. ])# LT_PATH_NM
  6393. # Old names:
  6394. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  6395. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  6396. dnl aclocal-1.4 backwards compatibility:
  6397. dnl AC_DEFUN([AM_PROG_NM], [])
  6398. dnl AC_DEFUN([AC_PROG_NM], [])
  6399. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  6400. # --------------------------------
  6401. # how to determine the name of the shared library
  6402. # associated with a specific link library.
  6403. # -- PORTME fill in with the dynamic library characteristics
  6404. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  6405. [m4_require([_LT_DECL_EGREP])
  6406. m4_require([_LT_DECL_OBJDUMP])
  6407. m4_require([_LT_DECL_DLLTOOL])
  6408. AC_CACHE_CHECK([how to associate runtime and link libraries],
  6409. lt_cv_sharedlib_from_linklib_cmd,
  6410. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  6411. case $host_os in
  6412. cygwin* | mingw* | pw32* | cegcc*)
  6413. # two different shell functions defined in ltmain.sh;
  6414. # decide which one to use based on capabilities of $DLLTOOL
  6415. case `$DLLTOOL --help 2>&1` in
  6416. *--identify-strict*)
  6417. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  6418. ;;
  6419. *)
  6420. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  6421. ;;
  6422. esac
  6423. ;;
  6424. *)
  6425. # fallback: assume linklib IS sharedlib
  6426. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  6427. ;;
  6428. esac
  6429. ])
  6430. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  6431. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  6432. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  6433. [Command to associate shared and link libraries])
  6434. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  6435. # _LT_PATH_MANIFEST_TOOL
  6436. # ----------------------
  6437. # locate the manifest tool
  6438. m4_defun([_LT_PATH_MANIFEST_TOOL],
  6439. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  6440. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  6441. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  6442. [lt_cv_path_mainfest_tool=no
  6443. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  6444. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  6445. cat conftest.err >&AS_MESSAGE_LOG_FD
  6446. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  6447. lt_cv_path_mainfest_tool=yes
  6448. fi
  6449. rm -f conftest*])
  6450. if test yes != "$lt_cv_path_mainfest_tool"; then
  6451. MANIFEST_TOOL=:
  6452. fi
  6453. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  6454. ])# _LT_PATH_MANIFEST_TOOL
  6455. # _LT_DLL_DEF_P([FILE])
  6456. # ---------------------
  6457. # True iff FILE is a Windows DLL '.def' file.
  6458. # Keep in sync with func_dll_def_p in the libtool script
  6459. AC_DEFUN([_LT_DLL_DEF_P],
  6460. [dnl
  6461. test DEF = "`$SED -n dnl
  6462. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  6463. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  6464. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  6465. -e q dnl Only consider the first "real" line
  6466. $1`" dnl
  6467. ])# _LT_DLL_DEF_P
  6468. # LT_LIB_M
  6469. # --------
  6470. # check for math library
  6471. AC_DEFUN([LT_LIB_M],
  6472. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  6473. LIBM=
  6474. case $host in
  6475. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  6476. # These system don't have libm, or don't need it
  6477. ;;
  6478. *-ncr-sysv4.3*)
  6479. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  6480. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  6481. ;;
  6482. *)
  6483. AC_CHECK_LIB(m, cos, LIBM=-lm)
  6484. ;;
  6485. esac
  6486. AC_SUBST([LIBM])
  6487. ])# LT_LIB_M
  6488. # Old name:
  6489. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  6490. dnl aclocal-1.4 backwards compatibility:
  6491. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  6492. # _LT_COMPILER_NO_RTTI([TAGNAME])
  6493. # -------------------------------
  6494. m4_defun([_LT_COMPILER_NO_RTTI],
  6495. [m4_require([_LT_TAG_COMPILER])dnl
  6496. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  6497. if test yes = "$GCC"; then
  6498. case $cc_basename in
  6499. nvcc*)
  6500. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  6501. *)
  6502. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  6503. esac
  6504. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  6505. lt_cv_prog_compiler_rtti_exceptions,
  6506. [-fno-rtti -fno-exceptions], [],
  6507. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  6508. fi
  6509. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  6510. [Compiler flag to turn off builtin functions])
  6511. ])# _LT_COMPILER_NO_RTTI
  6512. # _LT_CMD_GLOBAL_SYMBOLS
  6513. # ----------------------
  6514. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  6515. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  6516. AC_REQUIRE([AC_PROG_CC])dnl
  6517. AC_REQUIRE([AC_PROG_AWK])dnl
  6518. AC_REQUIRE([LT_PATH_NM])dnl
  6519. AC_REQUIRE([LT_PATH_LD])dnl
  6520. m4_require([_LT_DECL_SED])dnl
  6521. m4_require([_LT_DECL_EGREP])dnl
  6522. m4_require([_LT_TAG_COMPILER])dnl
  6523. # Check for command to grab the raw symbol name followed by C symbol from nm.
  6524. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  6525. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  6526. [
  6527. # These are sane defaults that work on at least a few old systems.
  6528. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  6529. # Character class describing NM global symbol codes.
  6530. symcode='[[BCDEGRST]]'
  6531. # Regexp to match symbols that can be accessed directly from C.
  6532. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  6533. # Define system-specific variables.
  6534. case $host_os in
  6535. aix*)
  6536. symcode='[[BCDT]]'
  6537. ;;
  6538. cygwin* | mingw* | pw32* | cegcc*)
  6539. symcode='[[ABCDGISTW]]'
  6540. ;;
  6541. hpux*)
  6542. if test ia64 = "$host_cpu"; then
  6543. symcode='[[ABCDEGRST]]'
  6544. fi
  6545. ;;
  6546. irix* | nonstopux*)
  6547. symcode='[[BCDEGRST]]'
  6548. ;;
  6549. osf*)
  6550. symcode='[[BCDEGQRST]]'
  6551. ;;
  6552. solaris*)
  6553. symcode='[[BDRT]]'
  6554. ;;
  6555. sco3.2v5*)
  6556. symcode='[[DT]]'
  6557. ;;
  6558. sysv4.2uw2*)
  6559. symcode='[[DT]]'
  6560. ;;
  6561. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  6562. symcode='[[ABDT]]'
  6563. ;;
  6564. sysv4)
  6565. symcode='[[DFNSTU]]'
  6566. ;;
  6567. esac
  6568. # If we're using GNU nm, then use its standard symbol codes.
  6569. case `$NM -V 2>&1` in
  6570. *GNU* | *'with BFD'*)
  6571. symcode='[[ABCDGIRSTW]]' ;;
  6572. esac
  6573. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  6574. # Gets list of data symbols to import.
  6575. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  6576. # Adjust the below global symbol transforms to fixup imported variables.
  6577. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  6578. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  6579. lt_c_name_lib_hook="\
  6580. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  6581. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  6582. else
  6583. # Disable hooks by default.
  6584. lt_cv_sys_global_symbol_to_import=
  6585. lt_cdecl_hook=
  6586. lt_c_name_hook=
  6587. lt_c_name_lib_hook=
  6588. fi
  6589. # Transform an extracted symbol line into a proper C declaration.
  6590. # Some systems (esp. on ia64) link data and code symbols differently,
  6591. # so use this general approach.
  6592. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  6593. $lt_cdecl_hook\
  6594. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  6595. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  6596. # Transform an extracted symbol line into symbol name and symbol address
  6597. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  6598. $lt_c_name_hook\
  6599. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  6600. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  6601. # Transform an extracted symbol line into symbol name with lib prefix and
  6602. # symbol address.
  6603. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  6604. $lt_c_name_lib_hook\
  6605. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  6606. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  6607. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  6608. # Handle CRLF in mingw tool chain
  6609. opt_cr=
  6610. case $build_os in
  6611. mingw*)
  6612. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  6613. ;;
  6614. esac
  6615. # Try without a prefix underscore, then with it.
  6616. for ac_symprfx in "" "_"; do
  6617. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  6618. symxfrm="\\1 $ac_symprfx\\2 \\2"
  6619. # Write the raw and C identifiers.
  6620. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  6621. # Fake it for dumpbin and say T for any non-static function,
  6622. # D for any global variable and I for any imported variable.
  6623. # Also find C++ and __fastcall symbols from MSVC++,
  6624. # which start with @ or ?.
  6625. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  6626. " {last_section=section; section=\$ 3};"\
  6627. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  6628. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  6629. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  6630. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  6631. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  6632. " \$ 0!~/External *\|/{next};"\
  6633. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  6634. " {if(hide[section]) next};"\
  6635. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  6636. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  6637. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  6638. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  6639. " ' prfx=^$ac_symprfx]"
  6640. else
  6641. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  6642. fi
  6643. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  6644. # Check to see that the pipe works correctly.
  6645. pipe_works=no
  6646. rm -f conftest*
  6647. cat > conftest.$ac_ext <<_LT_EOF
  6648. #ifdef __cplusplus
  6649. extern "C" {
  6650. #endif
  6651. char nm_test_var;
  6652. void nm_test_func(void);
  6653. void nm_test_func(void){}
  6654. #ifdef __cplusplus
  6655. }
  6656. #endif
  6657. int main(){nm_test_var='a';nm_test_func();return(0);}
  6658. _LT_EOF
  6659. if AC_TRY_EVAL(ac_compile); then
  6660. # Now try to grab the symbols.
  6661. nlist=conftest.nm
  6662. $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
  6663. if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
  6664. # Try sorting and uniquifying the output.
  6665. if sort "$nlist" | uniq > "$nlist"T; then
  6666. mv -f "$nlist"T "$nlist"
  6667. else
  6668. rm -f "$nlist"T
  6669. fi
  6670. # Make sure that we snagged all the symbols we need.
  6671. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  6672. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  6673. cat <<_LT_EOF > conftest.$ac_ext
  6674. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  6675. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  6676. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  6677. relocations are performed -- see ld's documentation on pseudo-relocs. */
  6678. # define LT@&t@_DLSYM_CONST
  6679. #elif defined __osf__
  6680. /* This system does not cope well with relocations in const data. */
  6681. # define LT@&t@_DLSYM_CONST
  6682. #else
  6683. # define LT@&t@_DLSYM_CONST const
  6684. #endif
  6685. #ifdef __cplusplus
  6686. extern "C" {
  6687. #endif
  6688. _LT_EOF
  6689. # Now generate the symbol file.
  6690. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  6691. cat <<_LT_EOF >> conftest.$ac_ext
  6692. /* The mapping between symbol names and symbols. */
  6693. LT@&t@_DLSYM_CONST struct {
  6694. const char *name;
  6695. void *address;
  6696. }
  6697. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  6698. {
  6699. { "@PROGRAM@", (void *) 0 },
  6700. _LT_EOF
  6701. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  6702. cat <<\_LT_EOF >> conftest.$ac_ext
  6703. {0, (void *) 0}
  6704. };
  6705. /* This works around a problem in FreeBSD linker */
  6706. #ifdef FREEBSD_WORKAROUND
  6707. static const void *lt_preloaded_setup() {
  6708. return lt__PROGRAM__LTX_preloaded_symbols;
  6709. }
  6710. #endif
  6711. #ifdef __cplusplus
  6712. }
  6713. #endif
  6714. _LT_EOF
  6715. # Now try linking the two files.
  6716. mv conftest.$ac_objext conftstm.$ac_objext
  6717. lt_globsym_save_LIBS=$LIBS
  6718. lt_globsym_save_CFLAGS=$CFLAGS
  6719. LIBS=conftstm.$ac_objext
  6720. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  6721. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  6722. pipe_works=yes
  6723. fi
  6724. LIBS=$lt_globsym_save_LIBS
  6725. CFLAGS=$lt_globsym_save_CFLAGS
  6726. else
  6727. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  6728. fi
  6729. else
  6730. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  6731. fi
  6732. else
  6733. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  6734. fi
  6735. else
  6736. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  6737. cat conftest.$ac_ext >&5
  6738. fi
  6739. rm -rf conftest* conftst*
  6740. # Do not use the global_symbol_pipe unless it works.
  6741. if test yes = "$pipe_works"; then
  6742. break
  6743. else
  6744. lt_cv_sys_global_symbol_pipe=
  6745. fi
  6746. done
  6747. ])
  6748. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  6749. lt_cv_sys_global_symbol_to_cdecl=
  6750. fi
  6751. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  6752. AC_MSG_RESULT(failed)
  6753. else
  6754. AC_MSG_RESULT(ok)
  6755. fi
  6756. # Response file support.
  6757. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  6758. nm_file_list_spec='@'
  6759. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  6760. nm_file_list_spec='@'
  6761. fi
  6762. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  6763. [Take the output of nm and produce a listing of raw symbols and C names])
  6764. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  6765. [Transform the output of nm in a proper C declaration])
  6766. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  6767. [Transform the output of nm into a list of symbols to manually relocate])
  6768. _LT_DECL([global_symbol_to_c_name_address],
  6769. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  6770. [Transform the output of nm in a C name address pair])
  6771. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  6772. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  6773. [Transform the output of nm in a C name address pair when lib prefix is needed])
  6774. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  6775. [The name lister interface])
  6776. _LT_DECL([], [nm_file_list_spec], [1],
  6777. [Specify filename containing input files for $NM])
  6778. ]) # _LT_CMD_GLOBAL_SYMBOLS
  6779. # _LT_COMPILER_PIC([TAGNAME])
  6780. # ---------------------------
  6781. m4_defun([_LT_COMPILER_PIC],
  6782. [m4_require([_LT_TAG_COMPILER])dnl
  6783. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  6784. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6785. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  6786. m4_if([$1], [CXX], [
  6787. # C++ specific cases for pic, static, wl, etc.
  6788. if test yes = "$GXX"; then
  6789. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6790. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6791. case $host_os in
  6792. aix*)
  6793. # All AIX code is PIC.
  6794. if test ia64 = "$host_cpu"; then
  6795. # AIX 5 now supports IA64 processor
  6796. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6797. fi
  6798. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6799. ;;
  6800. amigaos*)
  6801. case $host_cpu in
  6802. powerpc)
  6803. # see comment about AmigaOS4 .so support
  6804. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6805. ;;
  6806. m68k)
  6807. # FIXME: we need at least 68020 code to build shared libraries, but
  6808. # adding the '-m68020' flag to GCC prevents building anything better,
  6809. # like '-m68040'.
  6810. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  6811. ;;
  6812. esac
  6813. ;;
  6814. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  6815. # PIC is the default for these OSes.
  6816. ;;
  6817. mingw* | cygwin* | os2* | pw32* | cegcc*)
  6818. # This hack is so that the source file can tell whether it is being
  6819. # built for inclusion in a dll (and should export symbols for example).
  6820. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  6821. # (--disable-auto-import) libraries
  6822. m4_if([$1], [GCJ], [],
  6823. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  6824. case $host_os in
  6825. os2*)
  6826. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  6827. ;;
  6828. esac
  6829. ;;
  6830. darwin* | rhapsody*)
  6831. # PIC is the default on this platform
  6832. # Common symbols not allowed in MH_DYLIB files
  6833. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  6834. ;;
  6835. *djgpp*)
  6836. # DJGPP does not support shared libraries at all
  6837. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6838. ;;
  6839. haiku*)
  6840. # PIC is the default for Haiku.
  6841. # The "-static" flag exists, but is broken.
  6842. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  6843. ;;
  6844. interix[[3-9]]*)
  6845. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  6846. # Instead, we relocate shared libraries at runtime.
  6847. ;;
  6848. sysv4*MP*)
  6849. if test -d /usr/nec; then
  6850. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  6851. fi
  6852. ;;
  6853. hpux*)
  6854. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  6855. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  6856. # sets the default TLS model and affects inlining.
  6857. case $host_cpu in
  6858. hppa*64*)
  6859. ;;
  6860. *)
  6861. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6862. ;;
  6863. esac
  6864. ;;
  6865. *qnx* | *nto*)
  6866. # QNX uses GNU C++, but need to define -shared option too, otherwise
  6867. # it will coredump.
  6868. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  6869. ;;
  6870. *)
  6871. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6872. ;;
  6873. esac
  6874. else
  6875. case $host_os in
  6876. aix[[4-9]]*)
  6877. # All AIX code is PIC.
  6878. if test ia64 = "$host_cpu"; then
  6879. # AIX 5 now supports IA64 processor
  6880. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6881. else
  6882. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  6883. fi
  6884. ;;
  6885. chorus*)
  6886. case $cc_basename in
  6887. cxch68*)
  6888. # Green Hills C++ Compiler
  6889. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  6890. ;;
  6891. esac
  6892. ;;
  6893. mingw* | cygwin* | os2* | pw32* | cegcc*)
  6894. # This hack is so that the source file can tell whether it is being
  6895. # built for inclusion in a dll (and should export symbols for example).
  6896. m4_if([$1], [GCJ], [],
  6897. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  6898. ;;
  6899. dgux*)
  6900. case $cc_basename in
  6901. ec++*)
  6902. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6903. ;;
  6904. ghcx*)
  6905. # Green Hills C++ Compiler
  6906. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  6907. ;;
  6908. *)
  6909. ;;
  6910. esac
  6911. ;;
  6912. freebsd* | dragonfly*)
  6913. # FreeBSD uses GNU C++
  6914. ;;
  6915. hpux9* | hpux10* | hpux11*)
  6916. case $cc_basename in
  6917. CC*)
  6918. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6919. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  6920. if test ia64 != "$host_cpu"; then
  6921. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  6922. fi
  6923. ;;
  6924. aCC*)
  6925. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6926. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  6927. case $host_cpu in
  6928. hppa*64*|ia64*)
  6929. # +Z the default
  6930. ;;
  6931. *)
  6932. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  6933. ;;
  6934. esac
  6935. ;;
  6936. *)
  6937. ;;
  6938. esac
  6939. ;;
  6940. interix*)
  6941. # This is c89, which is MS Visual C++ (no shared libs)
  6942. # Anyone wants to do a port?
  6943. ;;
  6944. irix5* | irix6* | nonstopux*)
  6945. case $cc_basename in
  6946. CC*)
  6947. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6948. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6949. # CC pic flag -KPIC is the default.
  6950. ;;
  6951. *)
  6952. ;;
  6953. esac
  6954. ;;
  6955. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6956. case $cc_basename in
  6957. KCC*)
  6958. # KAI C++ Compiler
  6959. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  6960. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6961. ;;
  6962. ecpc* )
  6963. # old Intel C++ for x86_64, which still supported -KPIC.
  6964. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6965. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6966. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6967. ;;
  6968. icpc* )
  6969. # Intel C++, used to be incompatible with GCC.
  6970. # ICC 10 doesn't accept -KPIC any more.
  6971. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6972. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6973. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6974. ;;
  6975. pgCC* | pgcpp*)
  6976. # Portland Group C++ compiler
  6977. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6978. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  6979. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6980. ;;
  6981. cxx*)
  6982. # Compaq C++
  6983. # Make sure the PIC flag is empty. It appears that all Alpha
  6984. # Linux and Compaq Tru64 Unix objects are PIC.
  6985. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6986. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6987. ;;
  6988. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  6989. # IBM XL 8.0, 9.0 on PPC and BlueGene
  6990. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6991. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  6992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  6993. ;;
  6994. *)
  6995. case `$CC -V 2>&1 | sed 5q` in
  6996. *Sun\ C*)
  6997. # Sun C++ 5.9
  6998. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6999. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7000. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7001. ;;
  7002. esac
  7003. ;;
  7004. esac
  7005. ;;
  7006. lynxos*)
  7007. ;;
  7008. m88k*)
  7009. ;;
  7010. mvs*)
  7011. case $cc_basename in
  7012. cxx*)
  7013. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  7014. ;;
  7015. *)
  7016. ;;
  7017. esac
  7018. ;;
  7019. netbsd* | netbsdelf*-gnu)
  7020. ;;
  7021. *qnx* | *nto*)
  7022. # QNX uses GNU C++, but need to define -shared option too, otherwise
  7023. # it will coredump.
  7024. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  7025. ;;
  7026. osf3* | osf4* | osf5*)
  7027. case $cc_basename in
  7028. KCC*)
  7029. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  7030. ;;
  7031. RCC*)
  7032. # Rational C++ 2.4.1
  7033. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7034. ;;
  7035. cxx*)
  7036. # Digital/Compaq C++
  7037. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7038. # Make sure the PIC flag is empty. It appears that all Alpha
  7039. # Linux and Compaq Tru64 Unix objects are PIC.
  7040. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  7041. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7042. ;;
  7043. *)
  7044. ;;
  7045. esac
  7046. ;;
  7047. psos*)
  7048. ;;
  7049. solaris*)
  7050. case $cc_basename in
  7051. CC* | sunCC*)
  7052. # Sun C++ 4.2, 5.x and Centerline C++
  7053. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7054. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7055. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7056. ;;
  7057. gcx*)
  7058. # Green Hills C++ Compiler
  7059. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7060. ;;
  7061. *)
  7062. ;;
  7063. esac
  7064. ;;
  7065. sunos4*)
  7066. case $cc_basename in
  7067. CC*)
  7068. # Sun C++ 4.x
  7069. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7070. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7071. ;;
  7072. lcc*)
  7073. # Lucid
  7074. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7075. ;;
  7076. *)
  7077. ;;
  7078. esac
  7079. ;;
  7080. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  7081. case $cc_basename in
  7082. CC*)
  7083. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7084. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7085. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7086. ;;
  7087. esac
  7088. ;;
  7089. tandem*)
  7090. case $cc_basename in
  7091. NCC*)
  7092. # NonStop-UX NCC 3.20
  7093. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7094. ;;
  7095. *)
  7096. ;;
  7097. esac
  7098. ;;
  7099. vxworks*)
  7100. ;;
  7101. *)
  7102. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7103. ;;
  7104. esac
  7105. fi
  7106. ],
  7107. [
  7108. if test yes = "$GCC"; then
  7109. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7110. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7111. case $host_os in
  7112. aix*)
  7113. # All AIX code is PIC.
  7114. if test ia64 = "$host_cpu"; then
  7115. # AIX 5 now supports IA64 processor
  7116. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7117. fi
  7118. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7119. ;;
  7120. amigaos*)
  7121. case $host_cpu in
  7122. powerpc)
  7123. # see comment about AmigaOS4 .so support
  7124. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7125. ;;
  7126. m68k)
  7127. # FIXME: we need at least 68020 code to build shared libraries, but
  7128. # adding the '-m68020' flag to GCC prevents building anything better,
  7129. # like '-m68040'.
  7130. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  7131. ;;
  7132. esac
  7133. ;;
  7134. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  7135. # PIC is the default for these OSes.
  7136. ;;
  7137. mingw* | cygwin* | pw32* | os2* | cegcc*)
  7138. # This hack is so that the source file can tell whether it is being
  7139. # built for inclusion in a dll (and should export symbols for example).
  7140. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  7141. # (--disable-auto-import) libraries
  7142. m4_if([$1], [GCJ], [],
  7143. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  7144. case $host_os in
  7145. os2*)
  7146. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  7147. ;;
  7148. esac
  7149. ;;
  7150. darwin* | rhapsody*)
  7151. # PIC is the default on this platform
  7152. # Common symbols not allowed in MH_DYLIB files
  7153. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  7154. ;;
  7155. haiku*)
  7156. # PIC is the default for Haiku.
  7157. # The "-static" flag exists, but is broken.
  7158. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  7159. ;;
  7160. hpux*)
  7161. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  7162. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  7163. # sets the default TLS model and affects inlining.
  7164. case $host_cpu in
  7165. hppa*64*)
  7166. # +Z the default
  7167. ;;
  7168. *)
  7169. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7170. ;;
  7171. esac
  7172. ;;
  7173. interix[[3-9]]*)
  7174. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  7175. # Instead, we relocate shared libraries at runtime.
  7176. ;;
  7177. msdosdjgpp*)
  7178. # Just because we use GCC doesn't mean we suddenly get shared libraries
  7179. # on systems that don't support them.
  7180. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7181. enable_shared=no
  7182. ;;
  7183. *nto* | *qnx*)
  7184. # QNX uses GNU C++, but need to define -shared option too, otherwise
  7185. # it will coredump.
  7186. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  7187. ;;
  7188. sysv4*MP*)
  7189. if test -d /usr/nec; then
  7190. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  7191. fi
  7192. ;;
  7193. *)
  7194. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7195. ;;
  7196. esac
  7197. case $cc_basename in
  7198. nvcc*) # Cuda Compiler Driver 2.2
  7199. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  7200. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  7201. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  7202. fi
  7203. ;;
  7204. esac
  7205. else
  7206. # PORTME Check for flag to pass linker flags through the system compiler.
  7207. case $host_os in
  7208. aix*)
  7209. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7210. if test ia64 = "$host_cpu"; then
  7211. # AIX 5 now supports IA64 processor
  7212. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7213. else
  7214. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  7215. fi
  7216. ;;
  7217. darwin* | rhapsody*)
  7218. # PIC is the default on this platform
  7219. # Common symbols not allowed in MH_DYLIB files
  7220. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  7221. case $cc_basename in
  7222. nagfor*)
  7223. # NAG Fortran compiler
  7224. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  7225. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7226. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7227. ;;
  7228. esac
  7229. ;;
  7230. mingw* | cygwin* | pw32* | os2* | cegcc*)
  7231. # This hack is so that the source file can tell whether it is being
  7232. # built for inclusion in a dll (and should export symbols for example).
  7233. m4_if([$1], [GCJ], [],
  7234. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  7235. case $host_os in
  7236. os2*)
  7237. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  7238. ;;
  7239. esac
  7240. ;;
  7241. hpux9* | hpux10* | hpux11*)
  7242. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7243. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  7244. # not for PA HP-UX.
  7245. case $host_cpu in
  7246. hppa*64*|ia64*)
  7247. # +Z the default
  7248. ;;
  7249. *)
  7250. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  7251. ;;
  7252. esac
  7253. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  7254. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  7255. ;;
  7256. irix5* | irix6* | nonstopux*)
  7257. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7258. # PIC (with -KPIC) is the default.
  7259. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7260. ;;
  7261. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  7262. case $cc_basename in
  7263. # old Intel for x86_64, which still supported -KPIC.
  7264. ecc*)
  7265. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7266. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7267. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7268. ;;
  7269. # flang / f18. f95 an alias for gfortran or flang on Debian
  7270. flang* | f18* | f95*)
  7271. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7272. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7273. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7274. ;;
  7275. # icc used to be incompatible with GCC.
  7276. # ICC 10 doesn't accept -KPIC any more.
  7277. icc* | ifort*)
  7278. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7279. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7280. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7281. ;;
  7282. # Lahey Fortran 8.1.
  7283. lf95*)
  7284. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7285. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  7286. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  7287. ;;
  7288. nagfor*)
  7289. # NAG Fortran compiler
  7290. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  7291. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7292. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7293. ;;
  7294. tcc*)
  7295. # Fabrice Bellard et al's Tiny C Compiler
  7296. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7297. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7298. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7299. ;;
  7300. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  7301. # Portland Group compilers (*not* the Pentium gcc compiler,
  7302. # which looks to be a dead project)
  7303. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7304. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  7305. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7306. ;;
  7307. ccc*)
  7308. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7309. # All Alpha code is PIC.
  7310. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7311. ;;
  7312. xl* | bgxl* | bgf* | mpixl*)
  7313. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  7314. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7315. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  7316. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  7317. ;;
  7318. *)
  7319. case `$CC -V 2>&1 | sed 5q` in
  7320. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  7321. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  7322. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7323. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7324. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  7325. ;;
  7326. *Sun\ F* | *Sun*Fortran*)
  7327. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7328. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7329. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7330. ;;
  7331. *Sun\ C*)
  7332. # Sun C 5.9
  7333. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7334. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7335. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7336. ;;
  7337. *Intel*\ [[CF]]*Compiler*)
  7338. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7339. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  7340. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  7341. ;;
  7342. *Portland\ Group*)
  7343. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7344. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  7345. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7346. ;;
  7347. esac
  7348. ;;
  7349. esac
  7350. ;;
  7351. newsos6)
  7352. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7353. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7354. ;;
  7355. *nto* | *qnx*)
  7356. # QNX uses GNU C++, but need to define -shared option too, otherwise
  7357. # it will coredump.
  7358. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  7359. ;;
  7360. osf3* | osf4* | osf5*)
  7361. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7362. # All OSF/1 code is PIC.
  7363. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7364. ;;
  7365. rdos*)
  7366. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  7367. ;;
  7368. solaris*)
  7369. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7370. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7371. case $cc_basename in
  7372. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  7373. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  7374. *)
  7375. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  7376. esac
  7377. ;;
  7378. sunos4*)
  7379. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  7380. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  7381. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7382. ;;
  7383. sysv4 | sysv4.2uw2* | sysv4.3*)
  7384. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7385. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7386. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7387. ;;
  7388. sysv4*MP*)
  7389. if test -d /usr/nec; then
  7390. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  7391. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7392. fi
  7393. ;;
  7394. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  7395. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7396. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  7397. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7398. ;;
  7399. unicos*)
  7400. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  7401. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7402. ;;
  7403. uts4*)
  7404. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  7405. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  7406. ;;
  7407. *)
  7408. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  7409. ;;
  7410. esac
  7411. fi
  7412. ])
  7413. case $host_os in
  7414. # For platforms that do not support PIC, -DPIC is meaningless:
  7415. *djgpp*)
  7416. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  7417. ;;
  7418. *)
  7419. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  7420. ;;
  7421. esac
  7422. AC_CACHE_CHECK([for $compiler option to produce PIC],
  7423. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  7424. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  7425. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  7426. #
  7427. # Check to make sure the PIC flag actually works.
  7428. #
  7429. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  7430. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  7431. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  7432. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  7433. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  7434. "" | " "*) ;;
  7435. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  7436. esac],
  7437. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  7438. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  7439. fi
  7440. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  7441. [Additional compiler flags for building library objects])
  7442. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  7443. [How to pass a linker flag through the compiler])
  7444. #
  7445. # Check to make sure the static flag actually works.
  7446. #
  7447. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  7448. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  7449. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  7450. $lt_tmp_static_flag,
  7451. [],
  7452. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  7453. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  7454. [Compiler flag to prevent dynamic linking])
  7455. ])# _LT_COMPILER_PIC
  7456. # _LT_LINKER_SHLIBS([TAGNAME])
  7457. # ----------------------------
  7458. # See if the linker supports building shared libraries.
  7459. m4_defun([_LT_LINKER_SHLIBS],
  7460. [AC_REQUIRE([LT_PATH_LD])dnl
  7461. AC_REQUIRE([LT_PATH_NM])dnl
  7462. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  7463. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  7464. m4_require([_LT_DECL_EGREP])dnl
  7465. m4_require([_LT_DECL_SED])dnl
  7466. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  7467. m4_require([_LT_TAG_COMPILER])dnl
  7468. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  7469. m4_if([$1], [CXX], [
  7470. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7471. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  7472. case $host_os in
  7473. aix[[4-9]]*)
  7474. # If we're using GNU nm, then we don't want the "-C" option.
  7475. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  7476. # Without the "-l" option, or with the "-B" option, AIX nm treats
  7477. # weak defined symbols like other global defined symbols, whereas
  7478. # GNU nm marks them as "W".
  7479. # While the 'weak' keyword is ignored in the Export File, we need
  7480. # it in the Import File for the 'aix-soname' feature, so we have
  7481. # to replace the "-B" option with "-P" for AIX nm.
  7482. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  7483. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  7484. else
  7485. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  7486. fi
  7487. ;;
  7488. pw32*)
  7489. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  7490. ;;
  7491. cygwin* | mingw* | cegcc*)
  7492. case $cc_basename in
  7493. cl*)
  7494. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  7495. ;;
  7496. *)
  7497. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  7498. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  7499. ;;
  7500. esac
  7501. ;;
  7502. linux* | k*bsd*-gnu | gnu*)
  7503. _LT_TAGVAR(link_all_deplibs, $1)=no
  7504. ;;
  7505. *)
  7506. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7507. ;;
  7508. esac
  7509. ], [
  7510. runpath_var=
  7511. _LT_TAGVAR(allow_undefined_flag, $1)=
  7512. _LT_TAGVAR(always_export_symbols, $1)=no
  7513. _LT_TAGVAR(archive_cmds, $1)=
  7514. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7515. _LT_TAGVAR(compiler_needs_object, $1)=no
  7516. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7517. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7518. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  7519. _LT_TAGVAR(hardcode_automatic, $1)=no
  7520. _LT_TAGVAR(hardcode_direct, $1)=no
  7521. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7522. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7523. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7524. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7525. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  7526. _LT_TAGVAR(inherit_rpath, $1)=no
  7527. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7528. _LT_TAGVAR(module_cmds, $1)=
  7529. _LT_TAGVAR(module_expsym_cmds, $1)=
  7530. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  7531. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  7532. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  7533. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7534. # include_expsyms should be a list of space-separated symbols to be *always*
  7535. # included in the symbol list
  7536. _LT_TAGVAR(include_expsyms, $1)=
  7537. # exclude_expsyms can be an extended regexp of symbols to exclude
  7538. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  7539. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  7540. # as well as any symbol that contains 'd'.
  7541. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  7542. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  7543. # platforms (ab)use it in PIC code, but their linkers get confused if
  7544. # the symbol is explicitly referenced. Since portable code cannot
  7545. # rely on this symbol name, it's probably fine to never include it in
  7546. # preloaded symbol tables.
  7547. # Exclude shared library initialization/finalization symbols.
  7548. dnl Note also adjust exclude_expsyms for C++ above.
  7549. extract_expsyms_cmds=
  7550. case $host_os in
  7551. cygwin* | mingw* | pw32* | cegcc*)
  7552. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  7553. # When not using gcc, we currently assume that we are using
  7554. # Microsoft Visual C++.
  7555. if test yes != "$GCC"; then
  7556. with_gnu_ld=no
  7557. fi
  7558. ;;
  7559. interix*)
  7560. # we just hope/assume this is gcc and not c89 (= MSVC++)
  7561. with_gnu_ld=yes
  7562. ;;
  7563. openbsd* | bitrig*)
  7564. with_gnu_ld=no
  7565. ;;
  7566. linux* | k*bsd*-gnu | gnu*)
  7567. _LT_TAGVAR(link_all_deplibs, $1)=no
  7568. ;;
  7569. esac
  7570. _LT_TAGVAR(ld_shlibs, $1)=yes
  7571. # On some targets, GNU ld is compatible enough with the native linker
  7572. # that we're better off using the native interface for both.
  7573. lt_use_gnu_ld_interface=no
  7574. if test yes = "$with_gnu_ld"; then
  7575. case $host_os in
  7576. aix*)
  7577. # The AIX port of GNU ld has always aspired to compatibility
  7578. # with the native linker. However, as the warning in the GNU ld
  7579. # block says, versions before 2.19.5* couldn't really create working
  7580. # shared libraries, regardless of the interface used.
  7581. case `$LD -v 2>&1` in
  7582. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  7583. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  7584. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  7585. *)
  7586. lt_use_gnu_ld_interface=yes
  7587. ;;
  7588. esac
  7589. ;;
  7590. *)
  7591. lt_use_gnu_ld_interface=yes
  7592. ;;
  7593. esac
  7594. fi
  7595. if test yes = "$lt_use_gnu_ld_interface"; then
  7596. # If archive_cmds runs LD, not CC, wlarc should be empty
  7597. wlarc='$wl'
  7598. # Set some defaults for GNU ld with shared library support. These
  7599. # are reset later if shared libraries are not supported. Putting them
  7600. # here allows them to be overridden if necessary.
  7601. runpath_var=LD_RUN_PATH
  7602. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7603. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  7604. # ancient GNU ld didn't support --whole-archive et. al.
  7605. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  7606. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  7607. else
  7608. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7609. fi
  7610. supports_anon_versioning=no
  7611. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  7612. *GNU\ gold*) supports_anon_versioning=yes ;;
  7613. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  7614. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  7615. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  7616. *\ 2.11.*) ;; # other 2.11 versions
  7617. *) supports_anon_versioning=yes ;;
  7618. esac
  7619. # See if GNU ld supports shared libraries.
  7620. case $host_os in
  7621. aix[[3-9]]*)
  7622. # On AIX/PPC, the GNU linker is very broken
  7623. if test ia64 != "$host_cpu"; then
  7624. _LT_TAGVAR(ld_shlibs, $1)=no
  7625. cat <<_LT_EOF 1>&2
  7626. *** Warning: the GNU linker, at least up to release 2.19, is reported
  7627. *** to be unable to reliably create shared libraries on AIX.
  7628. *** Therefore, libtool is disabling shared libraries support. If you
  7629. *** really care for shared libraries, you may want to install binutils
  7630. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  7631. *** You will then need to restart the configuration process.
  7632. _LT_EOF
  7633. fi
  7634. ;;
  7635. amigaos*)
  7636. case $host_cpu in
  7637. powerpc)
  7638. # see comment about AmigaOS4 .so support
  7639. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7640. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  7641. ;;
  7642. m68k)
  7643. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  7644. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7645. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7646. ;;
  7647. esac
  7648. ;;
  7649. beos*)
  7650. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7651. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7652. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  7653. # support --undefined. This deserves some investigation. FIXME
  7654. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7655. else
  7656. _LT_TAGVAR(ld_shlibs, $1)=no
  7657. fi
  7658. ;;
  7659. cygwin* | mingw* | pw32* | cegcc*)
  7660. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  7661. # as there is no search path for DLLs.
  7662. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7663. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  7664. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7665. _LT_TAGVAR(always_export_symbols, $1)=no
  7666. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7667. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  7668. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  7669. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  7670. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7671. # If the export-symbols file already is a .def file, use it as
  7672. # is; otherwise, prepend EXPORTS...
  7673. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  7674. cp $export_symbols $output_objdir/$soname.def;
  7675. else
  7676. echo EXPORTS > $output_objdir/$soname.def;
  7677. cat $export_symbols >> $output_objdir/$soname.def;
  7678. fi~
  7679. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  7680. else
  7681. _LT_TAGVAR(ld_shlibs, $1)=no
  7682. fi
  7683. ;;
  7684. haiku*)
  7685. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7686. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7687. ;;
  7688. os2*)
  7689. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7690. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7691. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7692. shrext_cmds=.dll
  7693. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  7694. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  7695. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  7696. $ECHO EXPORTS >> $output_objdir/$libname.def~
  7697. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  7698. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  7699. emximp -o $lib $output_objdir/$libname.def'
  7700. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  7701. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  7702. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  7703. $ECHO EXPORTS >> $output_objdir/$libname.def~
  7704. prefix_cmds="$SED"~
  7705. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  7706. prefix_cmds="$prefix_cmds -e 1d";
  7707. fi~
  7708. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  7709. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  7710. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  7711. emximp -o $lib $output_objdir/$libname.def'
  7712. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  7713. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  7714. ;;
  7715. interix[[3-9]]*)
  7716. _LT_TAGVAR(hardcode_direct, $1)=no
  7717. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7718. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  7719. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  7720. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  7721. # Instead, shared libraries are loaded at an image base (0x10000000 by
  7722. # default) and relocated if they conflict, which is a slow very memory
  7723. # consuming and fragmenting process. To avoid this, we pick a random,
  7724. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  7725. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  7726. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7727. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  7728. ;;
  7729. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  7730. tmp_diet=no
  7731. if test linux-dietlibc = "$host_os"; then
  7732. case $cc_basename in
  7733. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  7734. esac
  7735. fi
  7736. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  7737. && test no = "$tmp_diet"
  7738. then
  7739. tmp_addflag=' $pic_flag'
  7740. tmp_sharedflag='-shared'
  7741. case $cc_basename,$host_cpu in
  7742. pgcc*) # Portland Group C compiler
  7743. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  7744. tmp_addflag=' $pic_flag'
  7745. ;;
  7746. pgf77* | pgf90* | pgf95* | pgfortran*)
  7747. # Portland Group f77 and f90 compilers
  7748. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  7749. tmp_addflag=' $pic_flag -Mnomain' ;;
  7750. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  7751. tmp_addflag=' -i_dynamic' ;;
  7752. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  7753. tmp_addflag=' -i_dynamic -nofor_main' ;;
  7754. ifc* | ifort*) # Intel Fortran compiler
  7755. tmp_addflag=' -nofor_main' ;;
  7756. lf95*) # Lahey Fortran 8.1
  7757. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7758. tmp_sharedflag='--shared' ;;
  7759. nagfor*) # NAGFOR 5.3
  7760. tmp_sharedflag='-Wl,-shared' ;;
  7761. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  7762. tmp_sharedflag='-qmkshrobj'
  7763. tmp_addflag= ;;
  7764. nvcc*) # Cuda Compiler Driver 2.2
  7765. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  7766. _LT_TAGVAR(compiler_needs_object, $1)=yes
  7767. ;;
  7768. esac
  7769. case `$CC -V 2>&1 | sed 5q` in
  7770. *Sun\ C*) # Sun C 5.9
  7771. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  7772. _LT_TAGVAR(compiler_needs_object, $1)=yes
  7773. tmp_sharedflag='-G' ;;
  7774. *Sun\ F*) # Sun Fortran 8.3
  7775. tmp_sharedflag='-G' ;;
  7776. esac
  7777. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7778. if test yes = "$supports_anon_versioning"; then
  7779. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  7780. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  7781. echo "local: *; };" >> $output_objdir/$libname.ver~
  7782. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  7783. fi
  7784. case $cc_basename in
  7785. tcc*)
  7786. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  7787. ;;
  7788. xlf* | bgf* | bgxlf* | mpixlf*)
  7789. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  7790. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  7791. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7792. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  7793. if test yes = "$supports_anon_versioning"; then
  7794. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  7795. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  7796. echo "local: *; };" >> $output_objdir/$libname.ver~
  7797. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  7798. fi
  7799. ;;
  7800. esac
  7801. else
  7802. _LT_TAGVAR(ld_shlibs, $1)=no
  7803. fi
  7804. ;;
  7805. netbsd* | netbsdelf*-gnu)
  7806. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  7807. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  7808. wlarc=
  7809. else
  7810. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7811. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  7812. fi
  7813. ;;
  7814. solaris*)
  7815. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  7816. _LT_TAGVAR(ld_shlibs, $1)=no
  7817. cat <<_LT_EOF 1>&2
  7818. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  7819. *** create shared libraries on Solaris systems. Therefore, libtool
  7820. *** is disabling shared libraries support. We urge you to upgrade GNU
  7821. *** binutils to release 2.9.1 or newer. Another option is to modify
  7822. *** your PATH or compiler configuration so that the native linker is
  7823. *** used, and then restart.
  7824. _LT_EOF
  7825. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7826. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7827. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  7828. else
  7829. _LT_TAGVAR(ld_shlibs, $1)=no
  7830. fi
  7831. ;;
  7832. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  7833. case `$LD -v 2>&1` in
  7834. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  7835. _LT_TAGVAR(ld_shlibs, $1)=no
  7836. cat <<_LT_EOF 1>&2
  7837. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  7838. *** reliably create shared libraries on SCO systems. Therefore, libtool
  7839. *** is disabling shared libraries support. We urge you to upgrade GNU
  7840. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  7841. *** your PATH or compiler configuration so that the native linker is
  7842. *** used, and then restart.
  7843. _LT_EOF
  7844. ;;
  7845. *)
  7846. # For security reasons, it is highly recommended that you always
  7847. # use absolute paths for naming shared libraries, and exclude the
  7848. # DT_RUNPATH tag from executables and libraries. But doing so
  7849. # requires that you compile everything twice, which is a pain.
  7850. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7851. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  7852. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7853. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  7854. else
  7855. _LT_TAGVAR(ld_shlibs, $1)=no
  7856. fi
  7857. ;;
  7858. esac
  7859. ;;
  7860. sunos4*)
  7861. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  7862. wlarc=
  7863. _LT_TAGVAR(hardcode_direct, $1)=yes
  7864. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  7865. ;;
  7866. *)
  7867. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  7868. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  7869. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  7870. else
  7871. _LT_TAGVAR(ld_shlibs, $1)=no
  7872. fi
  7873. ;;
  7874. esac
  7875. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  7876. runpath_var=
  7877. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7878. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7879. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7880. fi
  7881. else
  7882. # PORTME fill in a description of your system's linker (not GNU ld)
  7883. case $host_os in
  7884. aix3*)
  7885. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  7886. _LT_TAGVAR(always_export_symbols, $1)=yes
  7887. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  7888. # Note: this linker hardcodes the directories in LIBPATH if there
  7889. # are no directories specified by -L.
  7890. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7891. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  7892. # Neither direct hardcoding nor static linking is supported with a
  7893. # broken collect2.
  7894. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  7895. fi
  7896. ;;
  7897. aix[[4-9]]*)
  7898. if test ia64 = "$host_cpu"; then
  7899. # On IA64, the linker does run time linking by default, so we don't
  7900. # have to do anything special.
  7901. aix_use_runtimelinking=no
  7902. exp_sym_flag='-Bexport'
  7903. no_entry_flag=
  7904. else
  7905. # If we're using GNU nm, then we don't want the "-C" option.
  7906. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  7907. # Without the "-l" option, or with the "-B" option, AIX nm treats
  7908. # weak defined symbols like other global defined symbols, whereas
  7909. # GNU nm marks them as "W".
  7910. # While the 'weak' keyword is ignored in the Export File, we need
  7911. # it in the Import File for the 'aix-soname' feature, so we have
  7912. # to replace the "-B" option with "-P" for AIX nm.
  7913. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  7914. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  7915. else
  7916. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  7917. fi
  7918. aix_use_runtimelinking=no
  7919. # Test if we are trying to use run time linking or normal
  7920. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  7921. # have runtime linking enabled, and use it for executables.
  7922. # For shared libraries, we enable/disable runtime linking
  7923. # depending on the kind of the shared library created -
  7924. # when "with_aix_soname,aix_use_runtimelinking" is:
  7925. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  7926. # "aix,yes" lib.so shared, rtl:yes, for executables
  7927. # lib.a static archive
  7928. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  7929. # lib.a(lib.so.V) shared, rtl:no, for executables
  7930. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  7931. # lib.a(lib.so.V) shared, rtl:no
  7932. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  7933. # lib.a static archive
  7934. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  7935. for ld_flag in $LDFLAGS; do
  7936. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  7937. aix_use_runtimelinking=yes
  7938. break
  7939. fi
  7940. done
  7941. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  7942. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  7943. # so we don't have lib.a shared libs to link our executables.
  7944. # We have to force runtime linking in this case.
  7945. aix_use_runtimelinking=yes
  7946. LDFLAGS="$LDFLAGS -Wl,-brtl"
  7947. fi
  7948. ;;
  7949. esac
  7950. exp_sym_flag='-bexport'
  7951. no_entry_flag='-bnoentry'
  7952. fi
  7953. # When large executables or shared objects are built, AIX ld can
  7954. # have problems creating the table of contents. If linking a library
  7955. # or program results in "error TOC overflow" add -mminimal-toc to
  7956. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  7957. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  7958. _LT_TAGVAR(archive_cmds, $1)=''
  7959. _LT_TAGVAR(hardcode_direct, $1)=yes
  7960. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  7961. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  7962. _LT_TAGVAR(link_all_deplibs, $1)=yes
  7963. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  7964. case $with_aix_soname,$aix_use_runtimelinking in
  7965. aix,*) ;; # traditional, no import file
  7966. svr4,* | *,yes) # use import file
  7967. # The Import File defines what to hardcode.
  7968. _LT_TAGVAR(hardcode_direct, $1)=no
  7969. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7970. ;;
  7971. esac
  7972. if test yes = "$GCC"; then
  7973. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  7974. # We only want to do this on AIX 4.2 and lower, the check
  7975. # below for broken collect2 doesn't work under 4.3+
  7976. collect2name=`$CC -print-prog-name=collect2`
  7977. if test -f "$collect2name" &&
  7978. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  7979. then
  7980. # We have reworked collect2
  7981. :
  7982. else
  7983. # We have old collect2
  7984. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  7985. # It fails to find uninstalled libraries when the uninstalled
  7986. # path is not listed in the libpath. Setting hardcode_minus_L
  7987. # to unsupported forces relinking
  7988. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  7989. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  7990. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7991. fi
  7992. ;;
  7993. esac
  7994. shared_flag='-shared'
  7995. if test yes = "$aix_use_runtimelinking"; then
  7996. shared_flag="$shared_flag "'$wl-G'
  7997. fi
  7998. # Need to ensure runtime linking is disabled for the traditional
  7999. # shared library, or the linker may eventually find shared libraries
  8000. # /with/ Import File - we do not want to mix them.
  8001. shared_flag_aix='-shared'
  8002. shared_flag_svr4='-shared $wl-G'
  8003. else
  8004. # not using gcc
  8005. if test ia64 = "$host_cpu"; then
  8006. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  8007. # chokes on -Wl,-G. The following line is correct:
  8008. shared_flag='-G'
  8009. else
  8010. if test yes = "$aix_use_runtimelinking"; then
  8011. shared_flag='$wl-G'
  8012. else
  8013. shared_flag='$wl-bM:SRE'
  8014. fi
  8015. shared_flag_aix='$wl-bM:SRE'
  8016. shared_flag_svr4='$wl-G'
  8017. fi
  8018. fi
  8019. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  8020. # It seems that -bexpall does not export symbols beginning with
  8021. # underscore (_), so it is better to generate a list of symbols to export.
  8022. _LT_TAGVAR(always_export_symbols, $1)=yes
  8023. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  8024. # Warning - without using the other runtime loading flags (-brtl),
  8025. # -berok will link without error, but may produce a broken library.
  8026. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  8027. # Determine the default libpath from the value encoded in an
  8028. # empty executable.
  8029. _LT_SYS_MODULE_PATH_AIX([$1])
  8030. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  8031. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  8032. else
  8033. if test ia64 = "$host_cpu"; then
  8034. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  8035. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  8036. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
  8037. else
  8038. # Determine the default libpath from the value encoded in an
  8039. # empty executable.
  8040. _LT_SYS_MODULE_PATH_AIX([$1])
  8041. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  8042. # Warning - without using the other run time loading flags,
  8043. # -berok will link without error, but may produce a broken library.
  8044. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  8045. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  8046. if test yes = "$with_gnu_ld"; then
  8047. # We only use this code for GNU lds that support --whole-archive.
  8048. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  8049. else
  8050. # Exported symbols can be pulled into shared objects from archives
  8051. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  8052. fi
  8053. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  8054. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  8055. # -brtl affects multiple linker settings, -berok does not and is overridden later
  8056. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  8057. if test svr4 != "$with_aix_soname"; then
  8058. # This is similar to how AIX traditionally builds its shared libraries.
  8059. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  8060. fi
  8061. if test aix != "$with_aix_soname"; then
  8062. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  8063. else
  8064. # used by -dlpreopen to get the symbols
  8065. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  8066. fi
  8067. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  8068. fi
  8069. fi
  8070. ;;
  8071. amigaos*)
  8072. case $host_cpu in
  8073. powerpc)
  8074. # see comment about AmigaOS4 .so support
  8075. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  8076. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  8077. ;;
  8078. m68k)
  8079. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  8080. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8081. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8082. ;;
  8083. esac
  8084. ;;
  8085. bsdi[[45]]*)
  8086. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  8087. ;;
  8088. cygwin* | mingw* | pw32* | cegcc*)
  8089. # When not using gcc, we currently assume that we are using
  8090. # Microsoft Visual C++.
  8091. # hardcode_libdir_flag_spec is actually meaningless, as there is
  8092. # no search path for DLLs.
  8093. case $cc_basename in
  8094. cl*)
  8095. # Native MSVC
  8096. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  8097. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  8098. _LT_TAGVAR(always_export_symbols, $1)=yes
  8099. _LT_TAGVAR(file_list_spec, $1)='@'
  8100. # Tell ltmain to make .lib files, not .a files.
  8101. libext=lib
  8102. # Tell ltmain to make .dll files, not .so files.
  8103. shrext_cmds=.dll
  8104. # FIXME: Setting linknames here is a bad hack.
  8105. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  8106. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  8107. cp "$export_symbols" "$output_objdir/$soname.def";
  8108. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  8109. else
  8110. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  8111. fi~
  8112. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  8113. linknames='
  8114. # The linker will not automatically build a static lib if we build a DLL.
  8115. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  8116. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  8117. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  8118. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  8119. # Don't use ranlib
  8120. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  8121. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  8122. lt_tool_outputfile="@TOOL_OUTPUT@"~
  8123. case $lt_outputfile in
  8124. *.exe|*.EXE) ;;
  8125. *)
  8126. lt_outputfile=$lt_outputfile.exe
  8127. lt_tool_outputfile=$lt_tool_outputfile.exe
  8128. ;;
  8129. esac~
  8130. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  8131. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  8132. $RM "$lt_outputfile.manifest";
  8133. fi'
  8134. ;;
  8135. *)
  8136. # Assume MSVC wrapper
  8137. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  8138. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  8139. # Tell ltmain to make .lib files, not .a files.
  8140. libext=lib
  8141. # Tell ltmain to make .dll files, not .so files.
  8142. shrext_cmds=.dll
  8143. # FIXME: Setting linknames here is a bad hack.
  8144. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  8145. # The linker will automatically build a .lib file if we build a DLL.
  8146. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  8147. # FIXME: Should let the user specify the lib program.
  8148. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  8149. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  8150. ;;
  8151. esac
  8152. ;;
  8153. darwin* | rhapsody*)
  8154. _LT_DARWIN_LINKER_FEATURES($1)
  8155. ;;
  8156. dgux*)
  8157. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8158. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8159. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8160. ;;
  8161. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  8162. # support. Future versions do this automatically, but an explicit c++rt0.o
  8163. # does not break anything, and helps significantly (at the cost of a little
  8164. # extra space).
  8165. freebsd2.2*)
  8166. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  8167. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8168. _LT_TAGVAR(hardcode_direct, $1)=yes
  8169. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8170. ;;
  8171. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  8172. freebsd2.*)
  8173. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  8174. _LT_TAGVAR(hardcode_direct, $1)=yes
  8175. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8176. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8177. ;;
  8178. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  8179. freebsd* | dragonfly*)
  8180. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8181. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8182. _LT_TAGVAR(hardcode_direct, $1)=yes
  8183. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8184. ;;
  8185. hpux9*)
  8186. if test yes = "$GCC"; then
  8187. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  8188. else
  8189. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  8190. fi
  8191. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  8192. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8193. _LT_TAGVAR(hardcode_direct, $1)=yes
  8194. # hardcode_minus_L: Not really in the search PATH,
  8195. # but as the default location of the library.
  8196. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8197. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  8198. ;;
  8199. hpux10*)
  8200. if test yes,no = "$GCC,$with_gnu_ld"; then
  8201. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  8202. else
  8203. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  8204. fi
  8205. if test no = "$with_gnu_ld"; then
  8206. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  8207. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8208. _LT_TAGVAR(hardcode_direct, $1)=yes
  8209. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  8210. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  8211. # hardcode_minus_L: Not really in the search PATH,
  8212. # but as the default location of the library.
  8213. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8214. fi
  8215. ;;
  8216. hpux11*)
  8217. if test yes,no = "$GCC,$with_gnu_ld"; then
  8218. case $host_cpu in
  8219. hppa*64*)
  8220. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  8221. ;;
  8222. ia64*)
  8223. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  8224. ;;
  8225. *)
  8226. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  8227. ;;
  8228. esac
  8229. else
  8230. case $host_cpu in
  8231. hppa*64*)
  8232. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  8233. ;;
  8234. ia64*)
  8235. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  8236. ;;
  8237. *)
  8238. m4_if($1, [], [
  8239. # Older versions of the 11.00 compiler do not understand -b yet
  8240. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  8241. _LT_LINKER_OPTION([if $CC understands -b],
  8242. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  8243. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  8244. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  8245. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  8246. ;;
  8247. esac
  8248. fi
  8249. if test no = "$with_gnu_ld"; then
  8250. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  8251. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8252. case $host_cpu in
  8253. hppa*64*|ia64*)
  8254. _LT_TAGVAR(hardcode_direct, $1)=no
  8255. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8256. ;;
  8257. *)
  8258. _LT_TAGVAR(hardcode_direct, $1)=yes
  8259. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  8260. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  8261. # hardcode_minus_L: Not really in the search PATH,
  8262. # but as the default location of the library.
  8263. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8264. ;;
  8265. esac
  8266. fi
  8267. ;;
  8268. irix5* | irix6* | nonstopux*)
  8269. if test yes = "$GCC"; then
  8270. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  8271. # Try to use the -exported_symbol ld option, if it does not
  8272. # work, assume that -exports_file does not work either and
  8273. # implicitly export all symbols.
  8274. # This should be the same for all languages, so no per-tag cache variable.
  8275. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  8276. [lt_cv_irix_exported_symbol],
  8277. [save_LDFLAGS=$LDFLAGS
  8278. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  8279. AC_LINK_IFELSE(
  8280. [AC_LANG_SOURCE(
  8281. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  8282. [C++], [[int foo (void) { return 0; }]],
  8283. [Fortran 77], [[
  8284. subroutine foo
  8285. end]],
  8286. [Fortran], [[
  8287. subroutine foo
  8288. end]])])],
  8289. [lt_cv_irix_exported_symbol=yes],
  8290. [lt_cv_irix_exported_symbol=no])
  8291. LDFLAGS=$save_LDFLAGS])
  8292. if test yes = "$lt_cv_irix_exported_symbol"; then
  8293. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
  8294. fi
  8295. _LT_TAGVAR(link_all_deplibs, $1)=no
  8296. else
  8297. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  8298. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
  8299. fi
  8300. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  8301. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  8302. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8303. _LT_TAGVAR(inherit_rpath, $1)=yes
  8304. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8305. ;;
  8306. linux*)
  8307. case $cc_basename in
  8308. tcc*)
  8309. # Fabrice Bellard et al's Tiny C Compiler
  8310. _LT_TAGVAR(ld_shlibs, $1)=yes
  8311. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8312. ;;
  8313. esac
  8314. ;;
  8315. netbsd* | netbsdelf*-gnu)
  8316. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  8317. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  8318. else
  8319. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  8320. fi
  8321. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8322. _LT_TAGVAR(hardcode_direct, $1)=yes
  8323. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8324. ;;
  8325. newsos6)
  8326. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8327. _LT_TAGVAR(hardcode_direct, $1)=yes
  8328. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  8329. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8330. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8331. ;;
  8332. *nto* | *qnx*)
  8333. ;;
  8334. openbsd* | bitrig*)
  8335. if test -f /usr/libexec/ld.so; then
  8336. _LT_TAGVAR(hardcode_direct, $1)=yes
  8337. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8338. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  8339. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  8340. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8341. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  8342. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  8343. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  8344. else
  8345. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  8346. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  8347. fi
  8348. else
  8349. _LT_TAGVAR(ld_shlibs, $1)=no
  8350. fi
  8351. ;;
  8352. os2*)
  8353. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8354. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8355. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  8356. shrext_cmds=.dll
  8357. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  8358. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  8359. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  8360. $ECHO EXPORTS >> $output_objdir/$libname.def~
  8361. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  8362. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  8363. emximp -o $lib $output_objdir/$libname.def'
  8364. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  8365. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  8366. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  8367. $ECHO EXPORTS >> $output_objdir/$libname.def~
  8368. prefix_cmds="$SED"~
  8369. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  8370. prefix_cmds="$prefix_cmds -e 1d";
  8371. fi~
  8372. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  8373. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  8374. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  8375. emximp -o $lib $output_objdir/$libname.def'
  8376. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  8377. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  8378. ;;
  8379. osf3*)
  8380. if test yes = "$GCC"; then
  8381. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  8382. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  8383. else
  8384. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  8385. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  8386. fi
  8387. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  8388. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  8389. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8390. ;;
  8391. osf4* | osf5*) # as osf3* with the addition of -msym flag
  8392. if test yes = "$GCC"; then
  8393. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  8394. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  8395. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  8396. else
  8397. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  8398. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  8399. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  8400. $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
  8401. # Both c and cxx compiler support -rpath directly
  8402. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  8403. fi
  8404. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  8405. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  8406. ;;
  8407. solaris*)
  8408. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  8409. if test yes = "$GCC"; then
  8410. wlarc='$wl'
  8411. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  8412. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8413. $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  8414. else
  8415. case `$CC -V 2>&1` in
  8416. *"Compilers 5.0"*)
  8417. wlarc=''
  8418. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8419. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8420. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  8421. ;;
  8422. *)
  8423. wlarc='$wl'
  8424. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  8425. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  8426. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  8427. ;;
  8428. esac
  8429. fi
  8430. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  8431. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8432. case $host_os in
  8433. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  8434. *)
  8435. # The compiler driver will combine and reorder linker options,
  8436. # but understands '-z linker_flag'. GCC discards it without '$wl',
  8437. # but is careful enough not to reorder.
  8438. # Supported since Solaris 2.6 (maybe 2.5.1?)
  8439. if test yes = "$GCC"; then
  8440. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  8441. else
  8442. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  8443. fi
  8444. ;;
  8445. esac
  8446. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8447. ;;
  8448. sunos4*)
  8449. if test sequent = "$host_vendor"; then
  8450. # Use $CC to link under sequent, because it throws in some extra .o
  8451. # files that make .init and .fini sections work.
  8452. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  8453. else
  8454. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  8455. fi
  8456. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8457. _LT_TAGVAR(hardcode_direct, $1)=yes
  8458. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8459. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8460. ;;
  8461. sysv4)
  8462. case $host_vendor in
  8463. sni)
  8464. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8465. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  8466. ;;
  8467. siemens)
  8468. ## LD is ld it makes a PLAMLIB
  8469. ## CC just makes a GrossModule.
  8470. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  8471. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  8472. _LT_TAGVAR(hardcode_direct, $1)=no
  8473. ;;
  8474. motorola)
  8475. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8476. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  8477. ;;
  8478. esac
  8479. runpath_var='LD_RUN_PATH'
  8480. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8481. ;;
  8482. sysv4.3*)
  8483. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8484. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8485. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  8486. ;;
  8487. sysv4*MP*)
  8488. if test -d /usr/nec; then
  8489. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8490. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8491. runpath_var=LD_RUN_PATH
  8492. hardcode_runpath_var=yes
  8493. _LT_TAGVAR(ld_shlibs, $1)=yes
  8494. fi
  8495. ;;
  8496. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  8497. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  8498. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8499. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8500. runpath_var='LD_RUN_PATH'
  8501. if test yes = "$GCC"; then
  8502. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8503. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8504. else
  8505. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8506. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8507. fi
  8508. ;;
  8509. sysv5* | sco3.2v5* | sco5v6*)
  8510. # Note: We CANNOT use -z defs as we might desire, because we do not
  8511. # link with -lc, and that would cause any symbols used from libc to
  8512. # always be unresolved, which means just about no library would
  8513. # ever link correctly. If we're not using GNU ld we use -z text
  8514. # though, which does catch some bad symbols but isn't as heavy-handed
  8515. # as -z defs.
  8516. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  8517. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  8518. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8519. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8520. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  8521. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  8522. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8523. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  8524. runpath_var='LD_RUN_PATH'
  8525. if test yes = "$GCC"; then
  8526. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8527. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8528. else
  8529. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8530. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  8531. fi
  8532. ;;
  8533. uts4*)
  8534. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  8535. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8536. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  8537. ;;
  8538. *)
  8539. _LT_TAGVAR(ld_shlibs, $1)=no
  8540. ;;
  8541. esac
  8542. if test sni = "$host_vendor"; then
  8543. case $host in
  8544. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  8545. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  8546. ;;
  8547. esac
  8548. fi
  8549. fi
  8550. ])
  8551. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  8552. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  8553. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  8554. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  8555. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  8556. _LT_DECL([], [extract_expsyms_cmds], [2],
  8557. [The commands to extract the exported symbol list from a shared archive])
  8558. #
  8559. # Do we need to explicitly link libc?
  8560. #
  8561. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  8562. x|xyes)
  8563. # Assume -lc should be added
  8564. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  8565. if test yes,yes = "$GCC,$enable_shared"; then
  8566. case $_LT_TAGVAR(archive_cmds, $1) in
  8567. *'~'*)
  8568. # FIXME: we may have to deal with multi-command sequences.
  8569. ;;
  8570. '$CC '*)
  8571. # Test whether the compiler implicitly links with -lc since on some
  8572. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  8573. # to ld, don't add -lc before -lgcc.
  8574. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  8575. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  8576. [$RM conftest*
  8577. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  8578. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  8579. soname=conftest
  8580. lib=conftest
  8581. libobjs=conftest.$ac_objext
  8582. deplibs=
  8583. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  8584. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  8585. compiler_flags=-v
  8586. linker_flags=-v
  8587. verstring=
  8588. output_objdir=.
  8589. libname=conftest
  8590. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  8591. _LT_TAGVAR(allow_undefined_flag, $1)=
  8592. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  8593. then
  8594. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8595. else
  8596. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  8597. fi
  8598. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  8599. else
  8600. cat conftest.err 1>&5
  8601. fi
  8602. $RM conftest*
  8603. ])
  8604. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  8605. ;;
  8606. esac
  8607. fi
  8608. ;;
  8609. esac
  8610. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  8611. [Whether or not to add -lc for building shared libraries])
  8612. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  8613. [enable_shared_with_static_runtimes], [0],
  8614. [Whether or not to disallow shared libs when runtime libs are static])
  8615. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  8616. [Compiler flag to allow reflexive dlopens])
  8617. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  8618. [Compiler flag to generate shared objects directly from archives])
  8619. _LT_TAGDECL([], [compiler_needs_object], [1],
  8620. [Whether the compiler copes with passing no objects directly])
  8621. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  8622. [Create an old-style archive from a shared archive])
  8623. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  8624. [Create a temporary old-style archive to link instead of a shared archive])
  8625. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  8626. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  8627. _LT_TAGDECL([], [module_cmds], [2],
  8628. [Commands used to build a loadable module if different from building
  8629. a shared archive.])
  8630. _LT_TAGDECL([], [module_expsym_cmds], [2])
  8631. _LT_TAGDECL([], [with_gnu_ld], [1],
  8632. [Whether we are building with GNU ld or not])
  8633. _LT_TAGDECL([], [allow_undefined_flag], [1],
  8634. [Flag that allows shared libraries with undefined symbols to be built])
  8635. _LT_TAGDECL([], [no_undefined_flag], [1],
  8636. [Flag that enforces no undefined symbols])
  8637. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  8638. [Flag to hardcode $libdir into a binary during linking.
  8639. This must work even if $libdir does not exist])
  8640. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  8641. [Whether we need a single "-rpath" flag with a separated argument])
  8642. _LT_TAGDECL([], [hardcode_direct], [0],
  8643. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  8644. DIR into the resulting binary])
  8645. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  8646. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  8647. DIR into the resulting binary and the resulting library dependency is
  8648. "absolute", i.e impossible to change by setting $shlibpath_var if the
  8649. library is relocated])
  8650. _LT_TAGDECL([], [hardcode_minus_L], [0],
  8651. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  8652. into the resulting binary])
  8653. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  8654. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  8655. into the resulting binary])
  8656. _LT_TAGDECL([], [hardcode_automatic], [0],
  8657. [Set to "yes" if building a shared library automatically hardcodes DIR
  8658. into the library and all subsequent libraries and executables linked
  8659. against it])
  8660. _LT_TAGDECL([], [inherit_rpath], [0],
  8661. [Set to yes if linker adds runtime paths of dependent libraries
  8662. to runtime path list])
  8663. _LT_TAGDECL([], [link_all_deplibs], [0],
  8664. [Whether libtool must link a program against all its dependency libraries])
  8665. _LT_TAGDECL([], [always_export_symbols], [0],
  8666. [Set to "yes" if exported symbols are required])
  8667. _LT_TAGDECL([], [export_symbols_cmds], [2],
  8668. [The commands to list exported symbols])
  8669. _LT_TAGDECL([], [exclude_expsyms], [1],
  8670. [Symbols that should not be listed in the preloaded symbols])
  8671. _LT_TAGDECL([], [include_expsyms], [1],
  8672. [Symbols that must always be exported])
  8673. _LT_TAGDECL([], [prelink_cmds], [2],
  8674. [Commands necessary for linking programs (against libraries) with templates])
  8675. _LT_TAGDECL([], [postlink_cmds], [2],
  8676. [Commands necessary for finishing linking programs])
  8677. _LT_TAGDECL([], [file_list_spec], [1],
  8678. [Specify filename containing input files])
  8679. dnl FIXME: Not yet implemented
  8680. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  8681. dnl [Compiler flag to generate thread safe objects])
  8682. ])# _LT_LINKER_SHLIBS
  8683. # _LT_LANG_C_CONFIG([TAG])
  8684. # ------------------------
  8685. # Ensure that the configuration variables for a C compiler are suitably
  8686. # defined. These variables are subsequently used by _LT_CONFIG to write
  8687. # the compiler configuration to 'libtool'.
  8688. m4_defun([_LT_LANG_C_CONFIG],
  8689. [m4_require([_LT_DECL_EGREP])dnl
  8690. lt_save_CC=$CC
  8691. AC_LANG_PUSH(C)
  8692. # Source file extension for C test sources.
  8693. ac_ext=c
  8694. # Object file extension for compiled C test sources.
  8695. objext=o
  8696. _LT_TAGVAR(objext, $1)=$objext
  8697. # Code to be used in simple compile tests
  8698. lt_simple_compile_test_code="int some_variable = 0;"
  8699. # Code to be used in simple link tests
  8700. lt_simple_link_test_code='int main(){return(0);}'
  8701. _LT_TAG_COMPILER
  8702. # Save the default compiler, since it gets overwritten when the other
  8703. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  8704. compiler_DEFAULT=$CC
  8705. # save warnings/boilerplate of simple test code
  8706. _LT_COMPILER_BOILERPLATE
  8707. _LT_LINKER_BOILERPLATE
  8708. ## CAVEAT EMPTOR:
  8709. ## There is no encapsulation within the following macros, do not change
  8710. ## the running order or otherwise move them around unless you know exactly
  8711. ## what you are doing...
  8712. if test -n "$compiler"; then
  8713. _LT_COMPILER_NO_RTTI($1)
  8714. _LT_COMPILER_PIC($1)
  8715. _LT_COMPILER_C_O($1)
  8716. _LT_COMPILER_FILE_LOCKS($1)
  8717. _LT_LINKER_SHLIBS($1)
  8718. _LT_SYS_DYNAMIC_LINKER($1)
  8719. _LT_LINKER_HARDCODE_LIBPATH($1)
  8720. LT_SYS_DLOPEN_SELF
  8721. _LT_CMD_STRIPLIB
  8722. # Report what library types will actually be built
  8723. AC_MSG_CHECKING([if libtool supports shared libraries])
  8724. AC_MSG_RESULT([$can_build_shared])
  8725. AC_MSG_CHECKING([whether to build shared libraries])
  8726. test no = "$can_build_shared" && enable_shared=no
  8727. # On AIX, shared libraries and static libraries use the same namespace, and
  8728. # are all built from PIC.
  8729. case $host_os in
  8730. aix3*)
  8731. test yes = "$enable_shared" && enable_static=no
  8732. if test -n "$RANLIB"; then
  8733. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  8734. postinstall_cmds='$RANLIB $lib'
  8735. fi
  8736. ;;
  8737. aix[[4-9]]*)
  8738. if test ia64 != "$host_cpu"; then
  8739. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  8740. yes,aix,yes) ;; # shared object as lib.so file only
  8741. yes,svr4,*) ;; # shared object as lib.so archive member only
  8742. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  8743. esac
  8744. fi
  8745. ;;
  8746. esac
  8747. AC_MSG_RESULT([$enable_shared])
  8748. AC_MSG_CHECKING([whether to build static libraries])
  8749. # Make sure either enable_shared or enable_static is yes.
  8750. test yes = "$enable_shared" || enable_static=yes
  8751. AC_MSG_RESULT([$enable_static])
  8752. _LT_CONFIG($1)
  8753. fi
  8754. AC_LANG_POP
  8755. CC=$lt_save_CC
  8756. ])# _LT_LANG_C_CONFIG
  8757. # _LT_LANG_CXX_CONFIG([TAG])
  8758. # --------------------------
  8759. # Ensure that the configuration variables for a C++ compiler are suitably
  8760. # defined. These variables are subsequently used by _LT_CONFIG to write
  8761. # the compiler configuration to 'libtool'.
  8762. m4_defun([_LT_LANG_CXX_CONFIG],
  8763. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  8764. m4_require([_LT_DECL_EGREP])dnl
  8765. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  8766. if test -n "$CXX" && ( test no != "$CXX" &&
  8767. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  8768. (test g++ != "$CXX"))); then
  8769. AC_PROG_CXXCPP
  8770. else
  8771. _lt_caught_CXX_error=yes
  8772. fi
  8773. AC_LANG_PUSH(C++)
  8774. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  8775. _LT_TAGVAR(allow_undefined_flag, $1)=
  8776. _LT_TAGVAR(always_export_symbols, $1)=no
  8777. _LT_TAGVAR(archive_expsym_cmds, $1)=
  8778. _LT_TAGVAR(compiler_needs_object, $1)=no
  8779. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  8780. _LT_TAGVAR(hardcode_direct, $1)=no
  8781. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8782. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  8783. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8784. _LT_TAGVAR(hardcode_minus_L, $1)=no
  8785. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  8786. _LT_TAGVAR(hardcode_automatic, $1)=no
  8787. _LT_TAGVAR(inherit_rpath, $1)=no
  8788. _LT_TAGVAR(module_cmds, $1)=
  8789. _LT_TAGVAR(module_expsym_cmds, $1)=
  8790. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  8791. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  8792. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  8793. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  8794. _LT_TAGVAR(no_undefined_flag, $1)=
  8795. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8796. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  8797. # Source file extension for C++ test sources.
  8798. ac_ext=cpp
  8799. # Object file extension for compiled C++ test sources.
  8800. objext=o
  8801. _LT_TAGVAR(objext, $1)=$objext
  8802. # No sense in running all these tests if we already determined that
  8803. # the CXX compiler isn't working. Some variables (like enable_shared)
  8804. # are currently assumed to apply to all compilers on this platform,
  8805. # and will be corrupted by setting them based on a non-working compiler.
  8806. if test yes != "$_lt_caught_CXX_error"; then
  8807. # Code to be used in simple compile tests
  8808. lt_simple_compile_test_code="int some_variable = 0;"
  8809. # Code to be used in simple link tests
  8810. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  8811. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  8812. _LT_TAG_COMPILER
  8813. # save warnings/boilerplate of simple test code
  8814. _LT_COMPILER_BOILERPLATE
  8815. _LT_LINKER_BOILERPLATE
  8816. # Allow CC to be a program name with arguments.
  8817. lt_save_CC=$CC
  8818. lt_save_CFLAGS=$CFLAGS
  8819. lt_save_LD=$LD
  8820. lt_save_GCC=$GCC
  8821. GCC=$GXX
  8822. lt_save_with_gnu_ld=$with_gnu_ld
  8823. lt_save_path_LD=$lt_cv_path_LD
  8824. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  8825. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  8826. else
  8827. $as_unset lt_cv_prog_gnu_ld
  8828. fi
  8829. if test -n "${lt_cv_path_LDCXX+set}"; then
  8830. lt_cv_path_LD=$lt_cv_path_LDCXX
  8831. else
  8832. $as_unset lt_cv_path_LD
  8833. fi
  8834. test -z "${LDCXX+set}" || LD=$LDCXX
  8835. CC=${CXX-"c++"}
  8836. CFLAGS=$CXXFLAGS
  8837. compiler=$CC
  8838. _LT_TAGVAR(compiler, $1)=$CC
  8839. _LT_CC_BASENAME([$compiler])
  8840. if test -n "$compiler"; then
  8841. # We don't want -fno-exception when compiling C++ code, so set the
  8842. # no_builtin_flag separately
  8843. if test yes = "$GXX"; then
  8844. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  8845. else
  8846. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  8847. fi
  8848. if test yes = "$GXX"; then
  8849. # Set up default GNU C++ configuration
  8850. LT_PATH_LD
  8851. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  8852. # archiving commands below assume that GNU ld is being used.
  8853. if test yes = "$with_gnu_ld"; then
  8854. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  8855. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  8856. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  8857. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  8858. # If archive_cmds runs LD, not CC, wlarc should be empty
  8859. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  8860. # investigate it a little bit more. (MM)
  8861. wlarc='$wl'
  8862. # ancient GNU ld didn't support --whole-archive et. al.
  8863. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  8864. $GREP 'no-whole-archive' > /dev/null; then
  8865. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  8866. else
  8867. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  8868. fi
  8869. else
  8870. with_gnu_ld=no
  8871. wlarc=
  8872. # A generic and very simple default shared library creation
  8873. # command for GNU C++ for the case where it uses the native
  8874. # linker, instead of GNU ld. If possible, this setting should
  8875. # overridden to take advantage of the native linker features on
  8876. # the platform it is being used on.
  8877. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  8878. fi
  8879. # Commands to make compiler produce verbose output that lists
  8880. # what "hidden" libraries, object files and flags are used when
  8881. # linking a shared library.
  8882. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  8883. else
  8884. GXX=no
  8885. with_gnu_ld=no
  8886. wlarc=
  8887. fi
  8888. # PORTME: fill in a description of your system's C++ link characteristics
  8889. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  8890. _LT_TAGVAR(ld_shlibs, $1)=yes
  8891. case $host_os in
  8892. aix3*)
  8893. # FIXME: insert proper C++ library support
  8894. _LT_TAGVAR(ld_shlibs, $1)=no
  8895. ;;
  8896. aix[[4-9]]*)
  8897. if test ia64 = "$host_cpu"; then
  8898. # On IA64, the linker does run time linking by default, so we don't
  8899. # have to do anything special.
  8900. aix_use_runtimelinking=no
  8901. exp_sym_flag='-Bexport'
  8902. no_entry_flag=
  8903. else
  8904. aix_use_runtimelinking=no
  8905. # Test if we are trying to use run time linking or normal
  8906. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  8907. # have runtime linking enabled, and use it for executables.
  8908. # For shared libraries, we enable/disable runtime linking
  8909. # depending on the kind of the shared library created -
  8910. # when "with_aix_soname,aix_use_runtimelinking" is:
  8911. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  8912. # "aix,yes" lib.so shared, rtl:yes, for executables
  8913. # lib.a static archive
  8914. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  8915. # lib.a(lib.so.V) shared, rtl:no, for executables
  8916. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  8917. # lib.a(lib.so.V) shared, rtl:no
  8918. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  8919. # lib.a static archive
  8920. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  8921. for ld_flag in $LDFLAGS; do
  8922. case $ld_flag in
  8923. *-brtl*)
  8924. aix_use_runtimelinking=yes
  8925. break
  8926. ;;
  8927. esac
  8928. done
  8929. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  8930. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  8931. # so we don't have lib.a shared libs to link our executables.
  8932. # We have to force runtime linking in this case.
  8933. aix_use_runtimelinking=yes
  8934. LDFLAGS="$LDFLAGS -Wl,-brtl"
  8935. fi
  8936. ;;
  8937. esac
  8938. exp_sym_flag='-bexport'
  8939. no_entry_flag='-bnoentry'
  8940. fi
  8941. # When large executables or shared objects are built, AIX ld can
  8942. # have problems creating the table of contents. If linking a library
  8943. # or program results in "error TOC overflow" add -mminimal-toc to
  8944. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  8945. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  8946. _LT_TAGVAR(archive_cmds, $1)=''
  8947. _LT_TAGVAR(hardcode_direct, $1)=yes
  8948. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  8949. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  8950. _LT_TAGVAR(link_all_deplibs, $1)=yes
  8951. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  8952. case $with_aix_soname,$aix_use_runtimelinking in
  8953. aix,*) ;; # no import file
  8954. svr4,* | *,yes) # use import file
  8955. # The Import File defines what to hardcode.
  8956. _LT_TAGVAR(hardcode_direct, $1)=no
  8957. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  8958. ;;
  8959. esac
  8960. if test yes = "$GXX"; then
  8961. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  8962. # We only want to do this on AIX 4.2 and lower, the check
  8963. # below for broken collect2 doesn't work under 4.3+
  8964. collect2name=`$CC -print-prog-name=collect2`
  8965. if test -f "$collect2name" &&
  8966. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  8967. then
  8968. # We have reworked collect2
  8969. :
  8970. else
  8971. # We have old collect2
  8972. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  8973. # It fails to find uninstalled libraries when the uninstalled
  8974. # path is not listed in the libpath. Setting hardcode_minus_L
  8975. # to unsupported forces relinking
  8976. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  8977. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  8978. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  8979. fi
  8980. esac
  8981. shared_flag='-shared'
  8982. if test yes = "$aix_use_runtimelinking"; then
  8983. shared_flag=$shared_flag' $wl-G'
  8984. fi
  8985. # Need to ensure runtime linking is disabled for the traditional
  8986. # shared library, or the linker may eventually find shared libraries
  8987. # /with/ Import File - we do not want to mix them.
  8988. shared_flag_aix='-shared'
  8989. shared_flag_svr4='-shared $wl-G'
  8990. else
  8991. # not using gcc
  8992. if test ia64 = "$host_cpu"; then
  8993. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  8994. # chokes on -Wl,-G. The following line is correct:
  8995. shared_flag='-G'
  8996. else
  8997. if test yes = "$aix_use_runtimelinking"; then
  8998. shared_flag='$wl-G'
  8999. else
  9000. shared_flag='$wl-bM:SRE'
  9001. fi
  9002. shared_flag_aix='$wl-bM:SRE'
  9003. shared_flag_svr4='$wl-G'
  9004. fi
  9005. fi
  9006. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  9007. # It seems that -bexpall does not export symbols beginning with
  9008. # underscore (_), so it is better to generate a list of symbols to
  9009. # export.
  9010. _LT_TAGVAR(always_export_symbols, $1)=yes
  9011. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  9012. # Warning - without using the other runtime loading flags (-brtl),
  9013. # -berok will link without error, but may produce a broken library.
  9014. # The "-G" linker flag allows undefined symbols.
  9015. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  9016. # Determine the default libpath from the value encoded in an empty
  9017. # executable.
  9018. _LT_SYS_MODULE_PATH_AIX([$1])
  9019. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  9020. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  9021. else
  9022. if test ia64 = "$host_cpu"; then
  9023. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  9024. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  9025. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
  9026. else
  9027. # Determine the default libpath from the value encoded in an
  9028. # empty executable.
  9029. _LT_SYS_MODULE_PATH_AIX([$1])
  9030. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  9031. # Warning - without using the other run time loading flags,
  9032. # -berok will link without error, but may produce a broken library.
  9033. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  9034. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  9035. if test yes = "$with_gnu_ld"; then
  9036. # We only use this code for GNU lds that support --whole-archive.
  9037. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  9038. else
  9039. # Exported symbols can be pulled into shared objects from archives
  9040. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  9041. fi
  9042. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  9043. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  9044. # -brtl affects multiple linker settings, -berok does not and is overridden later
  9045. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  9046. if test svr4 != "$with_aix_soname"; then
  9047. # This is similar to how AIX traditionally builds its shared
  9048. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  9049. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  9050. fi
  9051. if test aix != "$with_aix_soname"; then
  9052. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  9053. else
  9054. # used by -dlpreopen to get the symbols
  9055. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  9056. fi
  9057. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  9058. fi
  9059. fi
  9060. ;;
  9061. beos*)
  9062. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  9063. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  9064. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  9065. # support --undefined. This deserves some investigation. FIXME
  9066. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  9067. else
  9068. _LT_TAGVAR(ld_shlibs, $1)=no
  9069. fi
  9070. ;;
  9071. chorus*)
  9072. case $cc_basename in
  9073. *)
  9074. # FIXME: insert proper C++ library support
  9075. _LT_TAGVAR(ld_shlibs, $1)=no
  9076. ;;
  9077. esac
  9078. ;;
  9079. cygwin* | mingw* | pw32* | cegcc*)
  9080. case $GXX,$cc_basename in
  9081. ,cl* | no,cl*)
  9082. # Native MSVC
  9083. # hardcode_libdir_flag_spec is actually meaningless, as there is
  9084. # no search path for DLLs.
  9085. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  9086. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  9087. _LT_TAGVAR(always_export_symbols, $1)=yes
  9088. _LT_TAGVAR(file_list_spec, $1)='@'
  9089. # Tell ltmain to make .lib files, not .a files.
  9090. libext=lib
  9091. # Tell ltmain to make .dll files, not .so files.
  9092. shrext_cmds=.dll
  9093. # FIXME: Setting linknames here is a bad hack.
  9094. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  9095. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  9096. cp "$export_symbols" "$output_objdir/$soname.def";
  9097. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  9098. else
  9099. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  9100. fi~
  9101. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  9102. linknames='
  9103. # The linker will not automatically build a static lib if we build a DLL.
  9104. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  9105. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  9106. # Don't use ranlib
  9107. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  9108. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  9109. lt_tool_outputfile="@TOOL_OUTPUT@"~
  9110. case $lt_outputfile in
  9111. *.exe|*.EXE) ;;
  9112. *)
  9113. lt_outputfile=$lt_outputfile.exe
  9114. lt_tool_outputfile=$lt_tool_outputfile.exe
  9115. ;;
  9116. esac~
  9117. func_to_tool_file "$lt_outputfile"~
  9118. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  9119. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  9120. $RM "$lt_outputfile.manifest";
  9121. fi'
  9122. ;;
  9123. *)
  9124. # g++
  9125. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  9126. # as there is no search path for DLLs.
  9127. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  9128. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  9129. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  9130. _LT_TAGVAR(always_export_symbols, $1)=no
  9131. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  9132. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  9133. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  9134. # If the export-symbols file already is a .def file, use it as
  9135. # is; otherwise, prepend EXPORTS...
  9136. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  9137. cp $export_symbols $output_objdir/$soname.def;
  9138. else
  9139. echo EXPORTS > $output_objdir/$soname.def;
  9140. cat $export_symbols >> $output_objdir/$soname.def;
  9141. fi~
  9142. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  9143. else
  9144. _LT_TAGVAR(ld_shlibs, $1)=no
  9145. fi
  9146. ;;
  9147. esac
  9148. ;;
  9149. darwin* | rhapsody*)
  9150. _LT_DARWIN_LINKER_FEATURES($1)
  9151. ;;
  9152. os2*)
  9153. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  9154. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  9155. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  9156. shrext_cmds=.dll
  9157. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  9158. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  9159. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  9160. $ECHO EXPORTS >> $output_objdir/$libname.def~
  9161. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  9162. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  9163. emximp -o $lib $output_objdir/$libname.def'
  9164. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  9165. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  9166. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  9167. $ECHO EXPORTS >> $output_objdir/$libname.def~
  9168. prefix_cmds="$SED"~
  9169. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  9170. prefix_cmds="$prefix_cmds -e 1d";
  9171. fi~
  9172. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  9173. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  9174. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  9175. emximp -o $lib $output_objdir/$libname.def'
  9176. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  9177. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  9178. ;;
  9179. dgux*)
  9180. case $cc_basename in
  9181. ec++*)
  9182. # FIXME: insert proper C++ library support
  9183. _LT_TAGVAR(ld_shlibs, $1)=no
  9184. ;;
  9185. ghcx*)
  9186. # Green Hills C++ Compiler
  9187. # FIXME: insert proper C++ library support
  9188. _LT_TAGVAR(ld_shlibs, $1)=no
  9189. ;;
  9190. *)
  9191. # FIXME: insert proper C++ library support
  9192. _LT_TAGVAR(ld_shlibs, $1)=no
  9193. ;;
  9194. esac
  9195. ;;
  9196. freebsd2.*)
  9197. # C++ shared libraries reported to be fairly broken before
  9198. # switch to ELF
  9199. _LT_TAGVAR(ld_shlibs, $1)=no
  9200. ;;
  9201. freebsd-elf*)
  9202. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  9203. ;;
  9204. freebsd* | dragonfly*)
  9205. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  9206. # conventions
  9207. _LT_TAGVAR(ld_shlibs, $1)=yes
  9208. ;;
  9209. haiku*)
  9210. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  9211. _LT_TAGVAR(link_all_deplibs, $1)=yes
  9212. ;;
  9213. hpux9*)
  9214. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  9215. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9216. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  9217. _LT_TAGVAR(hardcode_direct, $1)=yes
  9218. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  9219. # but as the default
  9220. # location of the library.
  9221. case $cc_basename in
  9222. CC*)
  9223. # FIXME: insert proper C++ library support
  9224. _LT_TAGVAR(ld_shlibs, $1)=no
  9225. ;;
  9226. aCC*)
  9227. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  9228. # Commands to make compiler produce verbose output that lists
  9229. # what "hidden" libraries, object files and flags are used when
  9230. # linking a shared library.
  9231. #
  9232. # There doesn't appear to be a way to prevent this compiler from
  9233. # explicitly linking system object files so we need to strip them
  9234. # from the output so that they don't get included in the library
  9235. # dependencies.
  9236. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  9237. ;;
  9238. *)
  9239. if test yes = "$GXX"; then
  9240. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  9241. else
  9242. # FIXME: insert proper C++ library support
  9243. _LT_TAGVAR(ld_shlibs, $1)=no
  9244. fi
  9245. ;;
  9246. esac
  9247. ;;
  9248. hpux10*|hpux11*)
  9249. if test no = "$with_gnu_ld"; then
  9250. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  9251. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9252. case $host_cpu in
  9253. hppa*64*|ia64*)
  9254. ;;
  9255. *)
  9256. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  9257. ;;
  9258. esac
  9259. fi
  9260. case $host_cpu in
  9261. hppa*64*|ia64*)
  9262. _LT_TAGVAR(hardcode_direct, $1)=no
  9263. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9264. ;;
  9265. *)
  9266. _LT_TAGVAR(hardcode_direct, $1)=yes
  9267. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  9268. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  9269. # but as the default
  9270. # location of the library.
  9271. ;;
  9272. esac
  9273. case $cc_basename in
  9274. CC*)
  9275. # FIXME: insert proper C++ library support
  9276. _LT_TAGVAR(ld_shlibs, $1)=no
  9277. ;;
  9278. aCC*)
  9279. case $host_cpu in
  9280. hppa*64*)
  9281. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9282. ;;
  9283. ia64*)
  9284. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9285. ;;
  9286. *)
  9287. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9288. ;;
  9289. esac
  9290. # Commands to make compiler produce verbose output that lists
  9291. # what "hidden" libraries, object files and flags are used when
  9292. # linking a shared library.
  9293. #
  9294. # There doesn't appear to be a way to prevent this compiler from
  9295. # explicitly linking system object files so we need to strip them
  9296. # from the output so that they don't get included in the library
  9297. # dependencies.
  9298. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  9299. ;;
  9300. *)
  9301. if test yes = "$GXX"; then
  9302. if test no = "$with_gnu_ld"; then
  9303. case $host_cpu in
  9304. hppa*64*)
  9305. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9306. ;;
  9307. ia64*)
  9308. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9309. ;;
  9310. *)
  9311. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9312. ;;
  9313. esac
  9314. fi
  9315. else
  9316. # FIXME: insert proper C++ library support
  9317. _LT_TAGVAR(ld_shlibs, $1)=no
  9318. fi
  9319. ;;
  9320. esac
  9321. ;;
  9322. interix[[3-9]]*)
  9323. _LT_TAGVAR(hardcode_direct, $1)=no
  9324. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9325. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  9326. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  9327. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  9328. # Instead, shared libraries are loaded at an image base (0x10000000 by
  9329. # default) and relocated if they conflict, which is a slow very memory
  9330. # consuming and fragmenting process. To avoid this, we pick a random,
  9331. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  9332. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  9333. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  9334. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  9335. ;;
  9336. irix5* | irix6*)
  9337. case $cc_basename in
  9338. CC*)
  9339. # SGI C++
  9340. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  9341. # Archives containing C++ object files must be created using
  9342. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  9343. # necessary to make sure instantiated templates are included
  9344. # in the archive.
  9345. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  9346. ;;
  9347. *)
  9348. if test yes = "$GXX"; then
  9349. if test no = "$with_gnu_ld"; then
  9350. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  9351. else
  9352. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
  9353. fi
  9354. fi
  9355. _LT_TAGVAR(link_all_deplibs, $1)=yes
  9356. ;;
  9357. esac
  9358. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  9359. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9360. _LT_TAGVAR(inherit_rpath, $1)=yes
  9361. ;;
  9362. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  9363. case $cc_basename in
  9364. KCC*)
  9365. # Kuck and Associates, Inc. (KAI) C++ Compiler
  9366. # KCC will only create a shared library if the output file
  9367. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  9368. # to its proper name (with version) after linking.
  9369. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  9370. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
  9371. # Commands to make compiler produce verbose output that lists
  9372. # what "hidden" libraries, object files and flags are used when
  9373. # linking a shared library.
  9374. #
  9375. # There doesn't appear to be a way to prevent this compiler from
  9376. # explicitly linking system object files so we need to strip them
  9377. # from the output so that they don't get included in the library
  9378. # dependencies.
  9379. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  9380. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  9381. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  9382. # Archives containing C++ object files must be created using
  9383. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  9384. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  9385. ;;
  9386. icpc* | ecpc* )
  9387. # Intel C++
  9388. with_gnu_ld=yes
  9389. # version 8.0 and above of icpc choke on multiply defined symbols
  9390. # if we add $predep_objects and $postdep_objects, however 7.1 and
  9391. # earlier do not add the objects themselves.
  9392. case `$CC -V 2>&1` in
  9393. *"Version 7."*)
  9394. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  9395. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  9396. ;;
  9397. *) # Version 8.0 or newer
  9398. tmp_idyn=
  9399. case $host_cpu in
  9400. ia64*) tmp_idyn=' -i_dynamic';;
  9401. esac
  9402. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  9403. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  9404. ;;
  9405. esac
  9406. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  9407. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  9408. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  9409. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  9410. ;;
  9411. pgCC* | pgcpp*)
  9412. # Portland Group C++ compiler
  9413. case `$CC -V` in
  9414. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  9415. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  9416. rm -rf $tpldir~
  9417. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  9418. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  9419. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  9420. rm -rf $tpldir~
  9421. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  9422. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  9423. $RANLIB $oldlib'
  9424. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  9425. rm -rf $tpldir~
  9426. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  9427. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  9428. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  9429. rm -rf $tpldir~
  9430. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  9431. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  9432. ;;
  9433. *) # Version 6 and above use weak symbols
  9434. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  9435. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  9436. ;;
  9437. esac
  9438. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  9439. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  9440. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  9441. ;;
  9442. cxx*)
  9443. # Compaq C++
  9444. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  9445. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
  9446. runpath_var=LD_RUN_PATH
  9447. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  9448. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9449. # Commands to make compiler produce verbose output that lists
  9450. # what "hidden" libraries, object files and flags are used when
  9451. # linking a shared library.
  9452. #
  9453. # There doesn't appear to be a way to prevent this compiler from
  9454. # explicitly linking system object files so we need to strip them
  9455. # from the output so that they don't get included in the library
  9456. # dependencies.
  9457. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  9458. ;;
  9459. xl* | mpixl* | bgxl*)
  9460. # IBM XL 8.0 on PPC, with GNU ld
  9461. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  9462. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  9463. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  9464. if test yes = "$supports_anon_versioning"; then
  9465. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  9466. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  9467. echo "local: *; };" >> $output_objdir/$libname.ver~
  9468. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  9469. fi
  9470. ;;
  9471. *)
  9472. case `$CC -V 2>&1 | sed 5q` in
  9473. *Sun\ C*)
  9474. # Sun C++ 5.9
  9475. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  9476. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9477. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
  9478. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  9479. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  9480. _LT_TAGVAR(compiler_needs_object, $1)=yes
  9481. # Not sure whether something based on
  9482. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  9483. # would be better.
  9484. output_verbose_link_cmd='func_echo_all'
  9485. # Archives containing C++ object files must be created using
  9486. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  9487. # necessary to make sure instantiated templates are included
  9488. # in the archive.
  9489. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  9490. ;;
  9491. esac
  9492. ;;
  9493. esac
  9494. ;;
  9495. lynxos*)
  9496. # FIXME: insert proper C++ library support
  9497. _LT_TAGVAR(ld_shlibs, $1)=no
  9498. ;;
  9499. m88k*)
  9500. # FIXME: insert proper C++ library support
  9501. _LT_TAGVAR(ld_shlibs, $1)=no
  9502. ;;
  9503. mvs*)
  9504. case $cc_basename in
  9505. cxx*)
  9506. # FIXME: insert proper C++ library support
  9507. _LT_TAGVAR(ld_shlibs, $1)=no
  9508. ;;
  9509. *)
  9510. # FIXME: insert proper C++ library support
  9511. _LT_TAGVAR(ld_shlibs, $1)=no
  9512. ;;
  9513. esac
  9514. ;;
  9515. netbsd*)
  9516. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  9517. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  9518. wlarc=
  9519. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  9520. _LT_TAGVAR(hardcode_direct, $1)=yes
  9521. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9522. fi
  9523. # Workaround some broken pre-1.5 toolchains
  9524. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  9525. ;;
  9526. *nto* | *qnx*)
  9527. _LT_TAGVAR(ld_shlibs, $1)=yes
  9528. ;;
  9529. openbsd* | bitrig*)
  9530. if test -f /usr/libexec/ld.so; then
  9531. _LT_TAGVAR(hardcode_direct, $1)=yes
  9532. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9533. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  9534. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  9535. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  9536. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  9537. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
  9538. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  9539. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  9540. fi
  9541. output_verbose_link_cmd=func_echo_all
  9542. else
  9543. _LT_TAGVAR(ld_shlibs, $1)=no
  9544. fi
  9545. ;;
  9546. osf3* | osf4* | osf5*)
  9547. case $cc_basename in
  9548. KCC*)
  9549. # Kuck and Associates, Inc. (KAI) C++ Compiler
  9550. # KCC will only create a shared library if the output file
  9551. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  9552. # to its proper name (with version) after linking.
  9553. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  9554. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  9555. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9556. # Archives containing C++ object files must be created using
  9557. # the KAI C++ compiler.
  9558. case $host in
  9559. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  9560. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  9561. esac
  9562. ;;
  9563. RCC*)
  9564. # Rational C++ 2.4.1
  9565. # FIXME: insert proper C++ library support
  9566. _LT_TAGVAR(ld_shlibs, $1)=no
  9567. ;;
  9568. cxx*)
  9569. case $host in
  9570. osf3*)
  9571. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  9572. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  9573. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  9574. ;;
  9575. *)
  9576. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  9577. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  9578. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  9579. echo "-hidden">> $lib.exp~
  9580. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
  9581. $RM $lib.exp'
  9582. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  9583. ;;
  9584. esac
  9585. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9586. # Commands to make compiler produce verbose output that lists
  9587. # what "hidden" libraries, object files and flags are used when
  9588. # linking a shared library.
  9589. #
  9590. # There doesn't appear to be a way to prevent this compiler from
  9591. # explicitly linking system object files so we need to strip them
  9592. # from the output so that they don't get included in the library
  9593. # dependencies.
  9594. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  9595. ;;
  9596. *)
  9597. if test yes,no = "$GXX,$with_gnu_ld"; then
  9598. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  9599. case $host in
  9600. osf3*)
  9601. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  9602. ;;
  9603. *)
  9604. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  9605. ;;
  9606. esac
  9607. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  9608. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  9609. # Commands to make compiler produce verbose output that lists
  9610. # what "hidden" libraries, object files and flags are used when
  9611. # linking a shared library.
  9612. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  9613. else
  9614. # FIXME: insert proper C++ library support
  9615. _LT_TAGVAR(ld_shlibs, $1)=no
  9616. fi
  9617. ;;
  9618. esac
  9619. ;;
  9620. psos*)
  9621. # FIXME: insert proper C++ library support
  9622. _LT_TAGVAR(ld_shlibs, $1)=no
  9623. ;;
  9624. sunos4*)
  9625. case $cc_basename in
  9626. CC*)
  9627. # Sun C++ 4.x
  9628. # FIXME: insert proper C++ library support
  9629. _LT_TAGVAR(ld_shlibs, $1)=no
  9630. ;;
  9631. lcc*)
  9632. # Lucid
  9633. # FIXME: insert proper C++ library support
  9634. _LT_TAGVAR(ld_shlibs, $1)=no
  9635. ;;
  9636. *)
  9637. # FIXME: insert proper C++ library support
  9638. _LT_TAGVAR(ld_shlibs, $1)=no
  9639. ;;
  9640. esac
  9641. ;;
  9642. solaris*)
  9643. case $cc_basename in
  9644. CC* | sunCC*)
  9645. # Sun C++ 4.2, 5.x and Centerline C++
  9646. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  9647. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  9648. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  9649. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  9650. $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  9651. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  9652. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9653. case $host_os in
  9654. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  9655. *)
  9656. # The compiler driver will combine and reorder linker options,
  9657. # but understands '-z linker_flag'.
  9658. # Supported since Solaris 2.6 (maybe 2.5.1?)
  9659. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  9660. ;;
  9661. esac
  9662. _LT_TAGVAR(link_all_deplibs, $1)=yes
  9663. output_verbose_link_cmd='func_echo_all'
  9664. # Archives containing C++ object files must be created using
  9665. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  9666. # necessary to make sure instantiated templates are included
  9667. # in the archive.
  9668. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  9669. ;;
  9670. gcx*)
  9671. # Green Hills C++ Compiler
  9672. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  9673. # The C++ compiler must be used to create the archive.
  9674. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  9675. ;;
  9676. *)
  9677. # GNU C++ compiler with Solaris linker
  9678. if test yes,no = "$GXX,$with_gnu_ld"; then
  9679. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  9680. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  9681. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  9682. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  9683. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  9684. # Commands to make compiler produce verbose output that lists
  9685. # what "hidden" libraries, object files and flags are used when
  9686. # linking a shared library.
  9687. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  9688. else
  9689. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  9690. # platform.
  9691. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  9692. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  9693. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  9694. # Commands to make compiler produce verbose output that lists
  9695. # what "hidden" libraries, object files and flags are used when
  9696. # linking a shared library.
  9697. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
  9698. fi
  9699. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  9700. case $host_os in
  9701. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  9702. *)
  9703. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  9704. ;;
  9705. esac
  9706. fi
  9707. ;;
  9708. esac
  9709. ;;
  9710. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  9711. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  9712. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  9713. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9714. runpath_var='LD_RUN_PATH'
  9715. case $cc_basename in
  9716. CC*)
  9717. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9718. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9719. ;;
  9720. *)
  9721. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9722. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9723. ;;
  9724. esac
  9725. ;;
  9726. sysv5* | sco3.2v5* | sco5v6*)
  9727. # Note: We CANNOT use -z defs as we might desire, because we do not
  9728. # link with -lc, and that would cause any symbols used from libc to
  9729. # always be unresolved, which means just about no library would
  9730. # ever link correctly. If we're not using GNU ld we use -z text
  9731. # though, which does catch some bad symbols but isn't as heavy-handed
  9732. # as -z defs.
  9733. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  9734. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  9735. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  9736. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  9737. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  9738. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  9739. _LT_TAGVAR(link_all_deplibs, $1)=yes
  9740. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  9741. runpath_var='LD_RUN_PATH'
  9742. case $cc_basename in
  9743. CC*)
  9744. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9745. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9746. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  9747. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  9748. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  9749. '"$_LT_TAGVAR(reload_cmds, $1)"
  9750. ;;
  9751. *)
  9752. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9753. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  9754. ;;
  9755. esac
  9756. ;;
  9757. tandem*)
  9758. case $cc_basename in
  9759. NCC*)
  9760. # NonStop-UX NCC 3.20
  9761. # FIXME: insert proper C++ library support
  9762. _LT_TAGVAR(ld_shlibs, $1)=no
  9763. ;;
  9764. *)
  9765. # FIXME: insert proper C++ library support
  9766. _LT_TAGVAR(ld_shlibs, $1)=no
  9767. ;;
  9768. esac
  9769. ;;
  9770. vxworks*)
  9771. # FIXME: insert proper C++ library support
  9772. _LT_TAGVAR(ld_shlibs, $1)=no
  9773. ;;
  9774. *)
  9775. # FIXME: insert proper C++ library support
  9776. _LT_TAGVAR(ld_shlibs, $1)=no
  9777. ;;
  9778. esac
  9779. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  9780. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  9781. _LT_TAGVAR(GCC, $1)=$GXX
  9782. _LT_TAGVAR(LD, $1)=$LD
  9783. ## CAVEAT EMPTOR:
  9784. ## There is no encapsulation within the following macros, do not change
  9785. ## the running order or otherwise move them around unless you know exactly
  9786. ## what you are doing...
  9787. _LT_SYS_HIDDEN_LIBDEPS($1)
  9788. _LT_COMPILER_PIC($1)
  9789. _LT_COMPILER_C_O($1)
  9790. _LT_COMPILER_FILE_LOCKS($1)
  9791. _LT_LINKER_SHLIBS($1)
  9792. _LT_SYS_DYNAMIC_LINKER($1)
  9793. _LT_LINKER_HARDCODE_LIBPATH($1)
  9794. _LT_CONFIG($1)
  9795. fi # test -n "$compiler"
  9796. CC=$lt_save_CC
  9797. CFLAGS=$lt_save_CFLAGS
  9798. LDCXX=$LD
  9799. LD=$lt_save_LD
  9800. GCC=$lt_save_GCC
  9801. with_gnu_ld=$lt_save_with_gnu_ld
  9802. lt_cv_path_LDCXX=$lt_cv_path_LD
  9803. lt_cv_path_LD=$lt_save_path_LD
  9804. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  9805. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  9806. fi # test yes != "$_lt_caught_CXX_error"
  9807. AC_LANG_POP
  9808. ])# _LT_LANG_CXX_CONFIG
  9809. # _LT_FUNC_STRIPNAME_CNF
  9810. # ----------------------
  9811. # func_stripname_cnf prefix suffix name
  9812. # strip PREFIX and SUFFIX off of NAME.
  9813. # PREFIX and SUFFIX must not contain globbing or regex special
  9814. # characters, hashes, percent signs, but SUFFIX may contain a leading
  9815. # dot (in which case that matches only a dot).
  9816. #
  9817. # This function is identical to the (non-XSI) version of func_stripname,
  9818. # except this one can be used by m4 code that may be executed by configure,
  9819. # rather than the libtool script.
  9820. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  9821. AC_REQUIRE([_LT_DECL_SED])
  9822. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  9823. func_stripname_cnf ()
  9824. {
  9825. case @S|@2 in
  9826. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  9827. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  9828. esac
  9829. } # func_stripname_cnf
  9830. ])# _LT_FUNC_STRIPNAME_CNF
  9831. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  9832. # ---------------------------------
  9833. # Figure out "hidden" library dependencies from verbose
  9834. # compiler output when linking a shared library.
  9835. # Parse the compiler output and extract the necessary
  9836. # objects, libraries and library flags.
  9837. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  9838. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  9839. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  9840. # Dependencies to place before and after the object being linked:
  9841. _LT_TAGVAR(predep_objects, $1)=
  9842. _LT_TAGVAR(postdep_objects, $1)=
  9843. _LT_TAGVAR(predeps, $1)=
  9844. _LT_TAGVAR(postdeps, $1)=
  9845. _LT_TAGVAR(compiler_lib_search_path, $1)=
  9846. dnl we can't use the lt_simple_compile_test_code here,
  9847. dnl because it contains code intended for an executable,
  9848. dnl not a library. It's possible we should let each
  9849. dnl tag define a new lt_????_link_test_code variable,
  9850. dnl but it's only used here...
  9851. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  9852. int a;
  9853. void foo (void) { a = 0; }
  9854. _LT_EOF
  9855. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  9856. class Foo
  9857. {
  9858. public:
  9859. Foo (void) { a = 0; }
  9860. private:
  9861. int a;
  9862. };
  9863. _LT_EOF
  9864. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  9865. subroutine foo
  9866. implicit none
  9867. integer*4 a
  9868. a=0
  9869. return
  9870. end
  9871. _LT_EOF
  9872. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  9873. subroutine foo
  9874. implicit none
  9875. integer a
  9876. a=0
  9877. return
  9878. end
  9879. _LT_EOF
  9880. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  9881. public class foo {
  9882. private int a;
  9883. public void bar (void) {
  9884. a = 0;
  9885. }
  9886. };
  9887. _LT_EOF
  9888. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  9889. package foo
  9890. func foo() {
  9891. }
  9892. _LT_EOF
  9893. ])
  9894. _lt_libdeps_save_CFLAGS=$CFLAGS
  9895. case "$CC $CFLAGS " in #(
  9896. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  9897. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  9898. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  9899. esac
  9900. dnl Parse the compiler output and extract the necessary
  9901. dnl objects, libraries and library flags.
  9902. if AC_TRY_EVAL(ac_compile); then
  9903. # Parse the compiler output and extract the necessary
  9904. # objects, libraries and library flags.
  9905. # Sentinel used to keep track of whether or not we are before
  9906. # the conftest object file.
  9907. pre_test_object_deps_done=no
  9908. for p in `eval "$output_verbose_link_cmd"`; do
  9909. case $prev$p in
  9910. -L* | -R* | -l*)
  9911. # Some compilers place space between "-{L,R}" and the path.
  9912. # Remove the space.
  9913. if test x-L = "$p" ||
  9914. test x-R = "$p"; then
  9915. prev=$p
  9916. continue
  9917. fi
  9918. # Expand the sysroot to ease extracting the directories later.
  9919. if test -z "$prev"; then
  9920. case $p in
  9921. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  9922. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  9923. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  9924. esac
  9925. fi
  9926. case $p in
  9927. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  9928. esac
  9929. if test no = "$pre_test_object_deps_done"; then
  9930. case $prev in
  9931. -L | -R)
  9932. # Internal compiler library paths should come after those
  9933. # provided the user. The postdeps already come after the
  9934. # user supplied libs so there is no need to process them.
  9935. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  9936. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  9937. else
  9938. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  9939. fi
  9940. ;;
  9941. # The "-l" case would never come before the object being
  9942. # linked, so don't bother handling this case.
  9943. esac
  9944. else
  9945. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  9946. _LT_TAGVAR(postdeps, $1)=$prev$p
  9947. else
  9948. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  9949. fi
  9950. fi
  9951. prev=
  9952. ;;
  9953. *.lto.$objext) ;; # Ignore GCC LTO objects
  9954. *.$objext)
  9955. # This assumes that the test object file only shows up
  9956. # once in the compiler output.
  9957. if test "$p" = "conftest.$objext"; then
  9958. pre_test_object_deps_done=yes
  9959. continue
  9960. fi
  9961. if test no = "$pre_test_object_deps_done"; then
  9962. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  9963. _LT_TAGVAR(predep_objects, $1)=$p
  9964. else
  9965. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  9966. fi
  9967. else
  9968. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  9969. _LT_TAGVAR(postdep_objects, $1)=$p
  9970. else
  9971. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  9972. fi
  9973. fi
  9974. ;;
  9975. *) ;; # Ignore the rest.
  9976. esac
  9977. done
  9978. # Clean up.
  9979. rm -f a.out a.exe
  9980. else
  9981. echo "libtool.m4: error: problem compiling $1 test program"
  9982. fi
  9983. $RM -f confest.$objext
  9984. CFLAGS=$_lt_libdeps_save_CFLAGS
  9985. # PORTME: override above test on systems where it is broken
  9986. m4_if([$1], [CXX],
  9987. [case $host_os in
  9988. interix[[3-9]]*)
  9989. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  9990. # hack all around it, let's just trust "g++" to DTRT.
  9991. _LT_TAGVAR(predep_objects,$1)=
  9992. _LT_TAGVAR(postdep_objects,$1)=
  9993. _LT_TAGVAR(postdeps,$1)=
  9994. ;;
  9995. esac
  9996. ])
  9997. case " $_LT_TAGVAR(postdeps, $1) " in
  9998. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  9999. esac
  10000. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  10001. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  10002. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  10003. fi
  10004. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  10005. [The directories searched by this compiler when creating a shared library])
  10006. _LT_TAGDECL([], [predep_objects], [1],
  10007. [Dependencies to place before and after the objects being linked to
  10008. create a shared library])
  10009. _LT_TAGDECL([], [postdep_objects], [1])
  10010. _LT_TAGDECL([], [predeps], [1])
  10011. _LT_TAGDECL([], [postdeps], [1])
  10012. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  10013. [The library search path used internally by the compiler when linking
  10014. a shared library])
  10015. ])# _LT_SYS_HIDDEN_LIBDEPS
  10016. # _LT_LANG_F77_CONFIG([TAG])
  10017. # --------------------------
  10018. # Ensure that the configuration variables for a Fortran 77 compiler are
  10019. # suitably defined. These variables are subsequently used by _LT_CONFIG
  10020. # to write the compiler configuration to 'libtool'.
  10021. m4_defun([_LT_LANG_F77_CONFIG],
  10022. [AC_LANG_PUSH(Fortran 77)
  10023. if test -z "$F77" || test no = "$F77"; then
  10024. _lt_disable_F77=yes
  10025. fi
  10026. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  10027. _LT_TAGVAR(allow_undefined_flag, $1)=
  10028. _LT_TAGVAR(always_export_symbols, $1)=no
  10029. _LT_TAGVAR(archive_expsym_cmds, $1)=
  10030. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  10031. _LT_TAGVAR(hardcode_direct, $1)=no
  10032. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  10033. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  10034. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  10035. _LT_TAGVAR(hardcode_minus_L, $1)=no
  10036. _LT_TAGVAR(hardcode_automatic, $1)=no
  10037. _LT_TAGVAR(inherit_rpath, $1)=no
  10038. _LT_TAGVAR(module_cmds, $1)=
  10039. _LT_TAGVAR(module_expsym_cmds, $1)=
  10040. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  10041. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  10042. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  10043. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  10044. _LT_TAGVAR(no_undefined_flag, $1)=
  10045. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  10046. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  10047. # Source file extension for f77 test sources.
  10048. ac_ext=f
  10049. # Object file extension for compiled f77 test sources.
  10050. objext=o
  10051. _LT_TAGVAR(objext, $1)=$objext
  10052. # No sense in running all these tests if we already determined that
  10053. # the F77 compiler isn't working. Some variables (like enable_shared)
  10054. # are currently assumed to apply to all compilers on this platform,
  10055. # and will be corrupted by setting them based on a non-working compiler.
  10056. if test yes != "$_lt_disable_F77"; then
  10057. # Code to be used in simple compile tests
  10058. lt_simple_compile_test_code="\
  10059. subroutine t
  10060. return
  10061. end
  10062. "
  10063. # Code to be used in simple link tests
  10064. lt_simple_link_test_code="\
  10065. program t
  10066. end
  10067. "
  10068. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  10069. _LT_TAG_COMPILER
  10070. # save warnings/boilerplate of simple test code
  10071. _LT_COMPILER_BOILERPLATE
  10072. _LT_LINKER_BOILERPLATE
  10073. # Allow CC to be a program name with arguments.
  10074. lt_save_CC=$CC
  10075. lt_save_GCC=$GCC
  10076. lt_save_CFLAGS=$CFLAGS
  10077. CC=${F77-"f77"}
  10078. CFLAGS=$FFLAGS
  10079. compiler=$CC
  10080. _LT_TAGVAR(compiler, $1)=$CC
  10081. _LT_CC_BASENAME([$compiler])
  10082. GCC=$G77
  10083. if test -n "$compiler"; then
  10084. AC_MSG_CHECKING([if libtool supports shared libraries])
  10085. AC_MSG_RESULT([$can_build_shared])
  10086. AC_MSG_CHECKING([whether to build shared libraries])
  10087. test no = "$can_build_shared" && enable_shared=no
  10088. # On AIX, shared libraries and static libraries use the same namespace, and
  10089. # are all built from PIC.
  10090. case $host_os in
  10091. aix3*)
  10092. test yes = "$enable_shared" && enable_static=no
  10093. if test -n "$RANLIB"; then
  10094. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  10095. postinstall_cmds='$RANLIB $lib'
  10096. fi
  10097. ;;
  10098. aix[[4-9]]*)
  10099. if test ia64 != "$host_cpu"; then
  10100. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  10101. yes,aix,yes) ;; # shared object as lib.so file only
  10102. yes,svr4,*) ;; # shared object as lib.so archive member only
  10103. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  10104. esac
  10105. fi
  10106. ;;
  10107. esac
  10108. AC_MSG_RESULT([$enable_shared])
  10109. AC_MSG_CHECKING([whether to build static libraries])
  10110. # Make sure either enable_shared or enable_static is yes.
  10111. test yes = "$enable_shared" || enable_static=yes
  10112. AC_MSG_RESULT([$enable_static])
  10113. _LT_TAGVAR(GCC, $1)=$G77
  10114. _LT_TAGVAR(LD, $1)=$LD
  10115. ## CAVEAT EMPTOR:
  10116. ## There is no encapsulation within the following macros, do not change
  10117. ## the running order or otherwise move them around unless you know exactly
  10118. ## what you are doing...
  10119. _LT_COMPILER_PIC($1)
  10120. _LT_COMPILER_C_O($1)
  10121. _LT_COMPILER_FILE_LOCKS($1)
  10122. _LT_LINKER_SHLIBS($1)
  10123. _LT_SYS_DYNAMIC_LINKER($1)
  10124. _LT_LINKER_HARDCODE_LIBPATH($1)
  10125. _LT_CONFIG($1)
  10126. fi # test -n "$compiler"
  10127. GCC=$lt_save_GCC
  10128. CC=$lt_save_CC
  10129. CFLAGS=$lt_save_CFLAGS
  10130. fi # test yes != "$_lt_disable_F77"
  10131. AC_LANG_POP
  10132. ])# _LT_LANG_F77_CONFIG
  10133. # _LT_LANG_FC_CONFIG([TAG])
  10134. # -------------------------
  10135. # Ensure that the configuration variables for a Fortran compiler are
  10136. # suitably defined. These variables are subsequently used by _LT_CONFIG
  10137. # to write the compiler configuration to 'libtool'.
  10138. m4_defun([_LT_LANG_FC_CONFIG],
  10139. [AC_LANG_PUSH(Fortran)
  10140. if test -z "$FC" || test no = "$FC"; then
  10141. _lt_disable_FC=yes
  10142. fi
  10143. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  10144. _LT_TAGVAR(allow_undefined_flag, $1)=
  10145. _LT_TAGVAR(always_export_symbols, $1)=no
  10146. _LT_TAGVAR(archive_expsym_cmds, $1)=
  10147. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  10148. _LT_TAGVAR(hardcode_direct, $1)=no
  10149. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  10150. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  10151. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  10152. _LT_TAGVAR(hardcode_minus_L, $1)=no
  10153. _LT_TAGVAR(hardcode_automatic, $1)=no
  10154. _LT_TAGVAR(inherit_rpath, $1)=no
  10155. _LT_TAGVAR(module_cmds, $1)=
  10156. _LT_TAGVAR(module_expsym_cmds, $1)=
  10157. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  10158. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  10159. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  10160. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  10161. _LT_TAGVAR(no_undefined_flag, $1)=
  10162. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  10163. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  10164. # Source file extension for fc test sources.
  10165. ac_ext=${ac_fc_srcext-f}
  10166. # Object file extension for compiled fc test sources.
  10167. objext=o
  10168. _LT_TAGVAR(objext, $1)=$objext
  10169. # No sense in running all these tests if we already determined that
  10170. # the FC compiler isn't working. Some variables (like enable_shared)
  10171. # are currently assumed to apply to all compilers on this platform,
  10172. # and will be corrupted by setting them based on a non-working compiler.
  10173. if test yes != "$_lt_disable_FC"; then
  10174. # Code to be used in simple compile tests
  10175. lt_simple_compile_test_code="\
  10176. subroutine t
  10177. return
  10178. end
  10179. "
  10180. # Code to be used in simple link tests
  10181. lt_simple_link_test_code="\
  10182. program t
  10183. end
  10184. "
  10185. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  10186. _LT_TAG_COMPILER
  10187. # save warnings/boilerplate of simple test code
  10188. _LT_COMPILER_BOILERPLATE
  10189. _LT_LINKER_BOILERPLATE
  10190. # Allow CC to be a program name with arguments.
  10191. lt_save_CC=$CC
  10192. lt_save_GCC=$GCC
  10193. lt_save_CFLAGS=$CFLAGS
  10194. CC=${FC-"f95"}
  10195. CFLAGS=$FCFLAGS
  10196. compiler=$CC
  10197. GCC=$ac_cv_fc_compiler_gnu
  10198. _LT_TAGVAR(compiler, $1)=$CC
  10199. _LT_CC_BASENAME([$compiler])
  10200. if test -n "$compiler"; then
  10201. AC_MSG_CHECKING([if libtool supports shared libraries])
  10202. AC_MSG_RESULT([$can_build_shared])
  10203. AC_MSG_CHECKING([whether to build shared libraries])
  10204. test no = "$can_build_shared" && enable_shared=no
  10205. # On AIX, shared libraries and static libraries use the same namespace, and
  10206. # are all built from PIC.
  10207. case $host_os in
  10208. aix3*)
  10209. test yes = "$enable_shared" && enable_static=no
  10210. if test -n "$RANLIB"; then
  10211. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  10212. postinstall_cmds='$RANLIB $lib'
  10213. fi
  10214. ;;
  10215. aix[[4-9]]*)
  10216. if test ia64 != "$host_cpu"; then
  10217. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  10218. yes,aix,yes) ;; # shared object as lib.so file only
  10219. yes,svr4,*) ;; # shared object as lib.so archive member only
  10220. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  10221. esac
  10222. fi
  10223. ;;
  10224. esac
  10225. AC_MSG_RESULT([$enable_shared])
  10226. AC_MSG_CHECKING([whether to build static libraries])
  10227. # Make sure either enable_shared or enable_static is yes.
  10228. test yes = "$enable_shared" || enable_static=yes
  10229. AC_MSG_RESULT([$enable_static])
  10230. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  10231. _LT_TAGVAR(LD, $1)=$LD
  10232. ## CAVEAT EMPTOR:
  10233. ## There is no encapsulation within the following macros, do not change
  10234. ## the running order or otherwise move them around unless you know exactly
  10235. ## what you are doing...
  10236. _LT_SYS_HIDDEN_LIBDEPS($1)
  10237. _LT_COMPILER_PIC($1)
  10238. _LT_COMPILER_C_O($1)
  10239. _LT_COMPILER_FILE_LOCKS($1)
  10240. _LT_LINKER_SHLIBS($1)
  10241. _LT_SYS_DYNAMIC_LINKER($1)
  10242. _LT_LINKER_HARDCODE_LIBPATH($1)
  10243. _LT_CONFIG($1)
  10244. fi # test -n "$compiler"
  10245. GCC=$lt_save_GCC
  10246. CC=$lt_save_CC
  10247. CFLAGS=$lt_save_CFLAGS
  10248. fi # test yes != "$_lt_disable_FC"
  10249. AC_LANG_POP
  10250. ])# _LT_LANG_FC_CONFIG
  10251. # _LT_LANG_GCJ_CONFIG([TAG])
  10252. # --------------------------
  10253. # Ensure that the configuration variables for the GNU Java Compiler compiler
  10254. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  10255. # to write the compiler configuration to 'libtool'.
  10256. m4_defun([_LT_LANG_GCJ_CONFIG],
  10257. [AC_REQUIRE([LT_PROG_GCJ])dnl
  10258. AC_LANG_SAVE
  10259. # Source file extension for Java test sources.
  10260. ac_ext=java
  10261. # Object file extension for compiled Java test sources.
  10262. objext=o
  10263. _LT_TAGVAR(objext, $1)=$objext
  10264. # Code to be used in simple compile tests
  10265. lt_simple_compile_test_code="class foo {}"
  10266. # Code to be used in simple link tests
  10267. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  10268. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  10269. _LT_TAG_COMPILER
  10270. # save warnings/boilerplate of simple test code
  10271. _LT_COMPILER_BOILERPLATE
  10272. _LT_LINKER_BOILERPLATE
  10273. # Allow CC to be a program name with arguments.
  10274. lt_save_CC=$CC
  10275. lt_save_CFLAGS=$CFLAGS
  10276. lt_save_GCC=$GCC
  10277. GCC=yes
  10278. CC=${GCJ-"gcj"}
  10279. CFLAGS=$GCJFLAGS
  10280. compiler=$CC
  10281. _LT_TAGVAR(compiler, $1)=$CC
  10282. _LT_TAGVAR(LD, $1)=$LD
  10283. _LT_CC_BASENAME([$compiler])
  10284. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  10285. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  10286. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  10287. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  10288. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  10289. ## CAVEAT EMPTOR:
  10290. ## There is no encapsulation within the following macros, do not change
  10291. ## the running order or otherwise move them around unless you know exactly
  10292. ## what you are doing...
  10293. if test -n "$compiler"; then
  10294. _LT_COMPILER_NO_RTTI($1)
  10295. _LT_COMPILER_PIC($1)
  10296. _LT_COMPILER_C_O($1)
  10297. _LT_COMPILER_FILE_LOCKS($1)
  10298. _LT_LINKER_SHLIBS($1)
  10299. _LT_LINKER_HARDCODE_LIBPATH($1)
  10300. _LT_CONFIG($1)
  10301. fi
  10302. AC_LANG_RESTORE
  10303. GCC=$lt_save_GCC
  10304. CC=$lt_save_CC
  10305. CFLAGS=$lt_save_CFLAGS
  10306. ])# _LT_LANG_GCJ_CONFIG
  10307. # _LT_LANG_GO_CONFIG([TAG])
  10308. # --------------------------
  10309. # Ensure that the configuration variables for the GNU Go compiler
  10310. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  10311. # to write the compiler configuration to 'libtool'.
  10312. m4_defun([_LT_LANG_GO_CONFIG],
  10313. [AC_REQUIRE([LT_PROG_GO])dnl
  10314. AC_LANG_SAVE
  10315. # Source file extension for Go test sources.
  10316. ac_ext=go
  10317. # Object file extension for compiled Go test sources.
  10318. objext=o
  10319. _LT_TAGVAR(objext, $1)=$objext
  10320. # Code to be used in simple compile tests
  10321. lt_simple_compile_test_code="package main; func main() { }"
  10322. # Code to be used in simple link tests
  10323. lt_simple_link_test_code='package main; func main() { }'
  10324. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  10325. _LT_TAG_COMPILER
  10326. # save warnings/boilerplate of simple test code
  10327. _LT_COMPILER_BOILERPLATE
  10328. _LT_LINKER_BOILERPLATE
  10329. # Allow CC to be a program name with arguments.
  10330. lt_save_CC=$CC
  10331. lt_save_CFLAGS=$CFLAGS
  10332. lt_save_GCC=$GCC
  10333. GCC=yes
  10334. CC=${GOC-"gccgo"}
  10335. CFLAGS=$GOFLAGS
  10336. compiler=$CC
  10337. _LT_TAGVAR(compiler, $1)=$CC
  10338. _LT_TAGVAR(LD, $1)=$LD
  10339. _LT_CC_BASENAME([$compiler])
  10340. # Go did not exist at the time GCC didn't implicitly link libc in.
  10341. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  10342. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  10343. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  10344. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  10345. ## CAVEAT EMPTOR:
  10346. ## There is no encapsulation within the following macros, do not change
  10347. ## the running order or otherwise move them around unless you know exactly
  10348. ## what you are doing...
  10349. if test -n "$compiler"; then
  10350. _LT_COMPILER_NO_RTTI($1)
  10351. _LT_COMPILER_PIC($1)
  10352. _LT_COMPILER_C_O($1)
  10353. _LT_COMPILER_FILE_LOCKS($1)
  10354. _LT_LINKER_SHLIBS($1)
  10355. _LT_LINKER_HARDCODE_LIBPATH($1)
  10356. _LT_CONFIG($1)
  10357. fi
  10358. AC_LANG_RESTORE
  10359. GCC=$lt_save_GCC
  10360. CC=$lt_save_CC
  10361. CFLAGS=$lt_save_CFLAGS
  10362. ])# _LT_LANG_GO_CONFIG
  10363. # _LT_LANG_RC_CONFIG([TAG])
  10364. # -------------------------
  10365. # Ensure that the configuration variables for the Windows resource compiler
  10366. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  10367. # to write the compiler configuration to 'libtool'.
  10368. m4_defun([_LT_LANG_RC_CONFIG],
  10369. [AC_REQUIRE([LT_PROG_RC])dnl
  10370. AC_LANG_SAVE
  10371. # Source file extension for RC test sources.
  10372. ac_ext=rc
  10373. # Object file extension for compiled RC test sources.
  10374. objext=o
  10375. _LT_TAGVAR(objext, $1)=$objext
  10376. # Code to be used in simple compile tests
  10377. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  10378. # Code to be used in simple link tests
  10379. lt_simple_link_test_code=$lt_simple_compile_test_code
  10380. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  10381. _LT_TAG_COMPILER
  10382. # save warnings/boilerplate of simple test code
  10383. _LT_COMPILER_BOILERPLATE
  10384. _LT_LINKER_BOILERPLATE
  10385. # Allow CC to be a program name with arguments.
  10386. lt_save_CC=$CC
  10387. lt_save_CFLAGS=$CFLAGS
  10388. lt_save_GCC=$GCC
  10389. GCC=
  10390. CC=${RC-"windres"}
  10391. CFLAGS=
  10392. compiler=$CC
  10393. _LT_TAGVAR(compiler, $1)=$CC
  10394. _LT_CC_BASENAME([$compiler])
  10395. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  10396. if test -n "$compiler"; then
  10397. :
  10398. _LT_CONFIG($1)
  10399. fi
  10400. GCC=$lt_save_GCC
  10401. AC_LANG_RESTORE
  10402. CC=$lt_save_CC
  10403. CFLAGS=$lt_save_CFLAGS
  10404. ])# _LT_LANG_RC_CONFIG
  10405. # LT_PROG_GCJ
  10406. # -----------
  10407. AC_DEFUN([LT_PROG_GCJ],
  10408. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  10409. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  10410. [AC_CHECK_TOOL(GCJ, gcj,)
  10411. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  10412. AC_SUBST(GCJFLAGS)])])[]dnl
  10413. ])
  10414. # Old name:
  10415. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  10416. dnl aclocal-1.4 backwards compatibility:
  10417. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  10418. # LT_PROG_GO
  10419. # ----------
  10420. AC_DEFUN([LT_PROG_GO],
  10421. [AC_CHECK_TOOL(GOC, gccgo,)
  10422. ])
  10423. # LT_PROG_RC
  10424. # ----------
  10425. AC_DEFUN([LT_PROG_RC],
  10426. [AC_CHECK_TOOL(RC, windres,)
  10427. ])
  10428. # Old name:
  10429. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  10430. dnl aclocal-1.4 backwards compatibility:
  10431. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  10432. # _LT_DECL_EGREP
  10433. # --------------
  10434. # If we don't have a new enough Autoconf to choose the best grep
  10435. # available, choose the one first in the user's PATH.
  10436. m4_defun([_LT_DECL_EGREP],
  10437. [AC_REQUIRE([AC_PROG_EGREP])dnl
  10438. AC_REQUIRE([AC_PROG_FGREP])dnl
  10439. test -z "$GREP" && GREP=grep
  10440. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  10441. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  10442. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  10443. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  10444. AC_SUBST([GREP])
  10445. ])
  10446. # _LT_DECL_OBJDUMP
  10447. # --------------
  10448. # If we don't have a new enough Autoconf to choose the best objdump
  10449. # available, choose the one first in the user's PATH.
  10450. m4_defun([_LT_DECL_OBJDUMP],
  10451. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  10452. test -z "$OBJDUMP" && OBJDUMP=objdump
  10453. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  10454. AC_SUBST([OBJDUMP])
  10455. ])
  10456. # _LT_DECL_DLLTOOL
  10457. # ----------------
  10458. # Ensure DLLTOOL variable is set.
  10459. m4_defun([_LT_DECL_DLLTOOL],
  10460. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  10461. test -z "$DLLTOOL" && DLLTOOL=dlltool
  10462. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  10463. AC_SUBST([DLLTOOL])
  10464. ])
  10465. # _LT_DECL_SED
  10466. # ------------
  10467. # Check for a fully-functional sed program, that truncates
  10468. # as few characters as possible. Prefer GNU sed if found.
  10469. m4_defun([_LT_DECL_SED],
  10470. [AC_PROG_SED
  10471. test -z "$SED" && SED=sed
  10472. Xsed="$SED -e 1s/^X//"
  10473. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  10474. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  10475. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  10476. ])# _LT_DECL_SED
  10477. m4_ifndef([AC_PROG_SED], [
  10478. ############################################################
  10479. # NOTE: This macro has been submitted for inclusion into #
  10480. # GNU Autoconf as AC_PROG_SED. When it is available in #
  10481. # a released version of Autoconf we should remove this #
  10482. # macro and use it instead. #
  10483. ############################################################
  10484. m4_defun([AC_PROG_SED],
  10485. [AC_MSG_CHECKING([for a sed that does not truncate output])
  10486. AC_CACHE_VAL(lt_cv_path_SED,
  10487. [# Loop through the user's path and test for sed and gsed.
  10488. # Then use that list of sed's as ones to test for truncation.
  10489. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  10490. for as_dir in $PATH
  10491. do
  10492. IFS=$as_save_IFS
  10493. test -z "$as_dir" && as_dir=.
  10494. for lt_ac_prog in sed gsed; do
  10495. for ac_exec_ext in '' $ac_executable_extensions; do
  10496. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  10497. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  10498. fi
  10499. done
  10500. done
  10501. done
  10502. IFS=$as_save_IFS
  10503. lt_ac_max=0
  10504. lt_ac_count=0
  10505. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  10506. # along with /bin/sed that truncates output.
  10507. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  10508. test ! -f "$lt_ac_sed" && continue
  10509. cat /dev/null > conftest.in
  10510. lt_ac_count=0
  10511. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  10512. # Check for GNU sed and select it if it is found.
  10513. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  10514. lt_cv_path_SED=$lt_ac_sed
  10515. break
  10516. fi
  10517. while true; do
  10518. cat conftest.in conftest.in >conftest.tmp
  10519. mv conftest.tmp conftest.in
  10520. cp conftest.in conftest.nl
  10521. echo >>conftest.nl
  10522. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  10523. cmp -s conftest.out conftest.nl || break
  10524. # 10000 chars as input seems more than enough
  10525. test 10 -lt "$lt_ac_count" && break
  10526. lt_ac_count=`expr $lt_ac_count + 1`
  10527. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  10528. lt_ac_max=$lt_ac_count
  10529. lt_cv_path_SED=$lt_ac_sed
  10530. fi
  10531. done
  10532. done
  10533. ])
  10534. SED=$lt_cv_path_SED
  10535. AC_SUBST([SED])
  10536. AC_MSG_RESULT([$SED])
  10537. ])#AC_PROG_SED
  10538. ])#m4_ifndef
  10539. # Old name:
  10540. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  10541. dnl aclocal-1.4 backwards compatibility:
  10542. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  10543. # _LT_CHECK_SHELL_FEATURES
  10544. # ------------------------
  10545. # Find out whether the shell is Bourne or XSI compatible,
  10546. # or has some other useful features.
  10547. m4_defun([_LT_CHECK_SHELL_FEATURES],
  10548. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  10549. lt_unset=unset
  10550. else
  10551. lt_unset=false
  10552. fi
  10553. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  10554. # test EBCDIC or ASCII
  10555. case `echo X|tr X '\101'` in
  10556. A) # ASCII based system
  10557. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  10558. lt_SP2NL='tr \040 \012'
  10559. lt_NL2SP='tr \015\012 \040\040'
  10560. ;;
  10561. *) # EBCDIC based system
  10562. lt_SP2NL='tr \100 \n'
  10563. lt_NL2SP='tr \r\n \100\100'
  10564. ;;
  10565. esac
  10566. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  10567. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  10568. ])# _LT_CHECK_SHELL_FEATURES
  10569. # _LT_PATH_CONVERSION_FUNCTIONS
  10570. # -----------------------------
  10571. # Determine what file name conversion functions should be used by
  10572. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  10573. # for certain cross-compile configurations and native mingw.
  10574. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  10575. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  10576. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  10577. AC_MSG_CHECKING([how to convert $build file names to $host format])
  10578. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  10579. [case $host in
  10580. *-*-mingw* )
  10581. case $build in
  10582. *-*-mingw* ) # actually msys
  10583. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  10584. ;;
  10585. *-*-cygwin* )
  10586. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  10587. ;;
  10588. * ) # otherwise, assume *nix
  10589. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  10590. ;;
  10591. esac
  10592. ;;
  10593. *-*-cygwin* )
  10594. case $build in
  10595. *-*-mingw* ) # actually msys
  10596. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  10597. ;;
  10598. *-*-cygwin* )
  10599. lt_cv_to_host_file_cmd=func_convert_file_noop
  10600. ;;
  10601. * ) # otherwise, assume *nix
  10602. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  10603. ;;
  10604. esac
  10605. ;;
  10606. * ) # unhandled hosts (and "normal" native builds)
  10607. lt_cv_to_host_file_cmd=func_convert_file_noop
  10608. ;;
  10609. esac
  10610. ])
  10611. to_host_file_cmd=$lt_cv_to_host_file_cmd
  10612. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  10613. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  10614. [0], [convert $build file names to $host format])dnl
  10615. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  10616. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  10617. [#assume ordinary cross tools, or native build.
  10618. lt_cv_to_tool_file_cmd=func_convert_file_noop
  10619. case $host in
  10620. *-*-mingw* )
  10621. case $build in
  10622. *-*-mingw* ) # actually msys
  10623. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  10624. ;;
  10625. esac
  10626. ;;
  10627. esac
  10628. ])
  10629. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  10630. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  10631. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  10632. [0], [convert $build files to toolchain format])dnl
  10633. ])# _LT_PATH_CONVERSION_FUNCTIONS
  10634. # Helper functions for option handling. -*- Autoconf -*-
  10635. #
  10636. # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
  10637. # Foundation, Inc.
  10638. # Written by Gary V. Vaughan, 2004
  10639. #
  10640. # This file is free software; the Free Software Foundation gives
  10641. # unlimited permission to copy and/or distribute it, with or without
  10642. # modifications, as long as this notice is preserved.
  10643. # serial 8 ltoptions.m4
  10644. # This is to help aclocal find these macros, as it can't see m4_define.
  10645. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  10646. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  10647. # ------------------------------------------
  10648. m4_define([_LT_MANGLE_OPTION],
  10649. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  10650. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  10651. # ---------------------------------------
  10652. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  10653. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  10654. # saved as a flag.
  10655. m4_define([_LT_SET_OPTION],
  10656. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  10657. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  10658. _LT_MANGLE_DEFUN([$1], [$2]),
  10659. [m4_warning([Unknown $1 option '$2'])])[]dnl
  10660. ])
  10661. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  10662. # ------------------------------------------------------------
  10663. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  10664. m4_define([_LT_IF_OPTION],
  10665. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  10666. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  10667. # -------------------------------------------------------
  10668. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  10669. # are set.
  10670. m4_define([_LT_UNLESS_OPTIONS],
  10671. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  10672. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  10673. [m4_define([$0_found])])])[]dnl
  10674. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  10675. ])[]dnl
  10676. ])
  10677. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  10678. # ----------------------------------------
  10679. # OPTION-LIST is a space-separated list of Libtool options associated
  10680. # with MACRO-NAME. If any OPTION has a matching handler declared with
  10681. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  10682. # the unknown option and exit.
  10683. m4_defun([_LT_SET_OPTIONS],
  10684. [# Set options
  10685. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  10686. [_LT_SET_OPTION([$1], _LT_Option)])
  10687. m4_if([$1],[LT_INIT],[
  10688. dnl
  10689. dnl Simply set some default values (i.e off) if boolean options were not
  10690. dnl specified:
  10691. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  10692. ])
  10693. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  10694. ])
  10695. dnl
  10696. dnl If no reference was made to various pairs of opposing options, then
  10697. dnl we run the default mode handler for the pair. For example, if neither
  10698. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  10699. dnl archives by default:
  10700. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  10701. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  10702. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  10703. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  10704. [_LT_ENABLE_FAST_INSTALL])
  10705. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  10706. [_LT_WITH_AIX_SONAME([aix])])
  10707. ])
  10708. ])# _LT_SET_OPTIONS
  10709. ## --------------------------------- ##
  10710. ## Macros to handle LT_INIT options. ##
  10711. ## --------------------------------- ##
  10712. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  10713. # -----------------------------------------
  10714. m4_define([_LT_MANGLE_DEFUN],
  10715. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  10716. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  10717. # -----------------------------------------------
  10718. m4_define([LT_OPTION_DEFINE],
  10719. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  10720. ])# LT_OPTION_DEFINE
  10721. # dlopen
  10722. # ------
  10723. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  10724. ])
  10725. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  10726. [_LT_SET_OPTION([LT_INIT], [dlopen])
  10727. AC_DIAGNOSE([obsolete],
  10728. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  10729. put the 'dlopen' option into LT_INIT's first parameter.])
  10730. ])
  10731. dnl aclocal-1.4 backwards compatibility:
  10732. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  10733. # win32-dll
  10734. # ---------
  10735. # Declare package support for building win32 dll's.
  10736. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  10737. [enable_win32_dll=yes
  10738. case $host in
  10739. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  10740. AC_CHECK_TOOL(AS, as, false)
  10741. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  10742. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  10743. ;;
  10744. esac
  10745. test -z "$AS" && AS=as
  10746. _LT_DECL([], [AS], [1], [Assembler program])dnl
  10747. test -z "$DLLTOOL" && DLLTOOL=dlltool
  10748. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  10749. test -z "$OBJDUMP" && OBJDUMP=objdump
  10750. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  10751. ])# win32-dll
  10752. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  10753. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  10754. _LT_SET_OPTION([LT_INIT], [win32-dll])
  10755. AC_DIAGNOSE([obsolete],
  10756. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  10757. put the 'win32-dll' option into LT_INIT's first parameter.])
  10758. ])
  10759. dnl aclocal-1.4 backwards compatibility:
  10760. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  10761. # _LT_ENABLE_SHARED([DEFAULT])
  10762. # ----------------------------
  10763. # implement the --enable-shared flag, and supports the 'shared' and
  10764. # 'disable-shared' LT_INIT options.
  10765. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  10766. m4_define([_LT_ENABLE_SHARED],
  10767. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  10768. AC_ARG_ENABLE([shared],
  10769. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  10770. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  10771. [p=${PACKAGE-default}
  10772. case $enableval in
  10773. yes) enable_shared=yes ;;
  10774. no) enable_shared=no ;;
  10775. *)
  10776. enable_shared=no
  10777. # Look at the argument we got. We use all the common list separators.
  10778. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  10779. for pkg in $enableval; do
  10780. IFS=$lt_save_ifs
  10781. if test "X$pkg" = "X$p"; then
  10782. enable_shared=yes
  10783. fi
  10784. done
  10785. IFS=$lt_save_ifs
  10786. ;;
  10787. esac],
  10788. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  10789. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  10790. [Whether or not to build shared libraries])
  10791. ])# _LT_ENABLE_SHARED
  10792. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  10793. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  10794. # Old names:
  10795. AC_DEFUN([AC_ENABLE_SHARED],
  10796. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  10797. ])
  10798. AC_DEFUN([AC_DISABLE_SHARED],
  10799. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  10800. ])
  10801. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  10802. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  10803. dnl aclocal-1.4 backwards compatibility:
  10804. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  10805. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  10806. # _LT_ENABLE_STATIC([DEFAULT])
  10807. # ----------------------------
  10808. # implement the --enable-static flag, and support the 'static' and
  10809. # 'disable-static' LT_INIT options.
  10810. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  10811. m4_define([_LT_ENABLE_STATIC],
  10812. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  10813. AC_ARG_ENABLE([static],
  10814. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  10815. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  10816. [p=${PACKAGE-default}
  10817. case $enableval in
  10818. yes) enable_static=yes ;;
  10819. no) enable_static=no ;;
  10820. *)
  10821. enable_static=no
  10822. # Look at the argument we got. We use all the common list separators.
  10823. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  10824. for pkg in $enableval; do
  10825. IFS=$lt_save_ifs
  10826. if test "X$pkg" = "X$p"; then
  10827. enable_static=yes
  10828. fi
  10829. done
  10830. IFS=$lt_save_ifs
  10831. ;;
  10832. esac],
  10833. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  10834. _LT_DECL([build_old_libs], [enable_static], [0],
  10835. [Whether or not to build static libraries])
  10836. ])# _LT_ENABLE_STATIC
  10837. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  10838. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  10839. # Old names:
  10840. AC_DEFUN([AC_ENABLE_STATIC],
  10841. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  10842. ])
  10843. AC_DEFUN([AC_DISABLE_STATIC],
  10844. [_LT_SET_OPTION([LT_INIT], [disable-static])
  10845. ])
  10846. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  10847. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  10848. dnl aclocal-1.4 backwards compatibility:
  10849. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  10850. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  10851. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  10852. # ----------------------------------
  10853. # implement the --enable-fast-install flag, and support the 'fast-install'
  10854. # and 'disable-fast-install' LT_INIT options.
  10855. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  10856. m4_define([_LT_ENABLE_FAST_INSTALL],
  10857. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  10858. AC_ARG_ENABLE([fast-install],
  10859. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  10860. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  10861. [p=${PACKAGE-default}
  10862. case $enableval in
  10863. yes) enable_fast_install=yes ;;
  10864. no) enable_fast_install=no ;;
  10865. *)
  10866. enable_fast_install=no
  10867. # Look at the argument we got. We use all the common list separators.
  10868. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  10869. for pkg in $enableval; do
  10870. IFS=$lt_save_ifs
  10871. if test "X$pkg" = "X$p"; then
  10872. enable_fast_install=yes
  10873. fi
  10874. done
  10875. IFS=$lt_save_ifs
  10876. ;;
  10877. esac],
  10878. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  10879. _LT_DECL([fast_install], [enable_fast_install], [0],
  10880. [Whether or not to optimize for fast installation])dnl
  10881. ])# _LT_ENABLE_FAST_INSTALL
  10882. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  10883. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  10884. # Old names:
  10885. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  10886. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  10887. AC_DIAGNOSE([obsolete],
  10888. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  10889. the 'fast-install' option into LT_INIT's first parameter.])
  10890. ])
  10891. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  10892. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  10893. AC_DIAGNOSE([obsolete],
  10894. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  10895. the 'disable-fast-install' option into LT_INIT's first parameter.])
  10896. ])
  10897. dnl aclocal-1.4 backwards compatibility:
  10898. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  10899. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  10900. # _LT_WITH_AIX_SONAME([DEFAULT])
  10901. # ----------------------------------
  10902. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  10903. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  10904. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  10905. m4_define([_LT_WITH_AIX_SONAME],
  10906. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  10907. shared_archive_member_spec=
  10908. case $host,$enable_shared in
  10909. power*-*-aix[[5-9]]*,yes)
  10910. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  10911. AC_ARG_WITH([aix-soname],
  10912. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  10913. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  10914. [case $withval in
  10915. aix|svr4|both)
  10916. ;;
  10917. *)
  10918. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  10919. ;;
  10920. esac
  10921. lt_cv_with_aix_soname=$with_aix_soname],
  10922. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  10923. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  10924. with_aix_soname=$lt_cv_with_aix_soname])
  10925. AC_MSG_RESULT([$with_aix_soname])
  10926. if test aix != "$with_aix_soname"; then
  10927. # For the AIX way of multilib, we name the shared archive member
  10928. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  10929. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  10930. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  10931. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  10932. if test 64 = "${OBJECT_MODE-32}"; then
  10933. shared_archive_member_spec=shr_64
  10934. else
  10935. shared_archive_member_spec=shr
  10936. fi
  10937. fi
  10938. ;;
  10939. *)
  10940. with_aix_soname=aix
  10941. ;;
  10942. esac
  10943. _LT_DECL([], [shared_archive_member_spec], [0],
  10944. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  10945. ])# _LT_WITH_AIX_SONAME
  10946. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  10947. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  10948. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  10949. # _LT_WITH_PIC([MODE])
  10950. # --------------------
  10951. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  10952. # LT_INIT options.
  10953. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  10954. m4_define([_LT_WITH_PIC],
  10955. [AC_ARG_WITH([pic],
  10956. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  10957. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  10958. [lt_p=${PACKAGE-default}
  10959. case $withval in
  10960. yes|no) pic_mode=$withval ;;
  10961. *)
  10962. pic_mode=default
  10963. # Look at the argument we got. We use all the common list separators.
  10964. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  10965. for lt_pkg in $withval; do
  10966. IFS=$lt_save_ifs
  10967. if test "X$lt_pkg" = "X$lt_p"; then
  10968. pic_mode=yes
  10969. fi
  10970. done
  10971. IFS=$lt_save_ifs
  10972. ;;
  10973. esac],
  10974. [pic_mode=m4_default([$1], [default])])
  10975. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  10976. ])# _LT_WITH_PIC
  10977. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  10978. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  10979. # Old name:
  10980. AU_DEFUN([AC_LIBTOOL_PICMODE],
  10981. [_LT_SET_OPTION([LT_INIT], [pic-only])
  10982. AC_DIAGNOSE([obsolete],
  10983. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  10984. put the 'pic-only' option into LT_INIT's first parameter.])
  10985. ])
  10986. dnl aclocal-1.4 backwards compatibility:
  10987. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  10988. ## ----------------- ##
  10989. ## LTDL_INIT Options ##
  10990. ## ----------------- ##
  10991. m4_define([_LTDL_MODE], [])
  10992. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  10993. [m4_define([_LTDL_MODE], [nonrecursive])])
  10994. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  10995. [m4_define([_LTDL_MODE], [recursive])])
  10996. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  10997. [m4_define([_LTDL_MODE], [subproject])])
  10998. m4_define([_LTDL_TYPE], [])
  10999. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  11000. [m4_define([_LTDL_TYPE], [installable])])
  11001. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  11002. [m4_define([_LTDL_TYPE], [convenience])])
  11003. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  11004. #
  11005. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
  11006. # Foundation, Inc.
  11007. # Written by Gary V. Vaughan, 2004
  11008. #
  11009. # This file is free software; the Free Software Foundation gives
  11010. # unlimited permission to copy and/or distribute it, with or without
  11011. # modifications, as long as this notice is preserved.
  11012. # serial 6 ltsugar.m4
  11013. # This is to help aclocal find these macros, as it can't see m4_define.
  11014. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  11015. # lt_join(SEP, ARG1, [ARG2...])
  11016. # -----------------------------
  11017. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  11018. # associated separator.
  11019. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  11020. # versions in m4sugar had bugs.
  11021. m4_define([lt_join],
  11022. [m4_if([$#], [1], [],
  11023. [$#], [2], [[$2]],
  11024. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  11025. m4_define([_lt_join],
  11026. [m4_if([$#$2], [2], [],
  11027. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  11028. # lt_car(LIST)
  11029. # lt_cdr(LIST)
  11030. # ------------
  11031. # Manipulate m4 lists.
  11032. # These macros are necessary as long as will still need to support
  11033. # Autoconf-2.59, which quotes differently.
  11034. m4_define([lt_car], [[$1]])
  11035. m4_define([lt_cdr],
  11036. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  11037. [$#], 1, [],
  11038. [m4_dquote(m4_shift($@))])])
  11039. m4_define([lt_unquote], $1)
  11040. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  11041. # ------------------------------------------
  11042. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  11043. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  11044. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  11045. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  11046. # than defined and empty).
  11047. #
  11048. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  11049. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  11050. m4_define([lt_append],
  11051. [m4_define([$1],
  11052. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  11053. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  11054. # ----------------------------------------------------------
  11055. # Produce a SEP delimited list of all paired combinations of elements of
  11056. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  11057. # has the form PREFIXmINFIXSUFFIXn.
  11058. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  11059. m4_define([lt_combine],
  11060. [m4_if(m4_eval([$# > 3]), [1],
  11061. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  11062. [[m4_foreach([_Lt_prefix], [$2],
  11063. [m4_foreach([_Lt_suffix],
  11064. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  11065. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  11066. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  11067. # -----------------------------------------------------------------------
  11068. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  11069. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  11070. m4_define([lt_if_append_uniq],
  11071. [m4_ifdef([$1],
  11072. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  11073. [lt_append([$1], [$2], [$3])$4],
  11074. [$5])],
  11075. [lt_append([$1], [$2], [$3])$4])])
  11076. # lt_dict_add(DICT, KEY, VALUE)
  11077. # -----------------------------
  11078. m4_define([lt_dict_add],
  11079. [m4_define([$1($2)], [$3])])
  11080. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  11081. # --------------------------------------------
  11082. m4_define([lt_dict_add_subkey],
  11083. [m4_define([$1($2:$3)], [$4])])
  11084. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  11085. # ----------------------------------
  11086. m4_define([lt_dict_fetch],
  11087. [m4_ifval([$3],
  11088. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  11089. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  11090. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  11091. # -----------------------------------------------------------------
  11092. m4_define([lt_if_dict_fetch],
  11093. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  11094. [$5],
  11095. [$6])])
  11096. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  11097. # --------------------------------------------------------------
  11098. m4_define([lt_dict_filter],
  11099. [m4_if([$5], [], [],
  11100. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  11101. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  11102. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  11103. ])
  11104. # ltversion.m4 -- version numbers -*- Autoconf -*-
  11105. #
  11106. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
  11107. # Written by Scott James Remnant, 2004
  11108. #
  11109. # This file is free software; the Free Software Foundation gives
  11110. # unlimited permission to copy and/or distribute it, with or without
  11111. # modifications, as long as this notice is preserved.
  11112. # @configure_input@
  11113. # serial 4179 ltversion.m4
  11114. # This file is part of GNU Libtool
  11115. m4_define([LT_PACKAGE_VERSION], [2.4.6])
  11116. m4_define([LT_PACKAGE_REVISION], [2.4.6])
  11117. AC_DEFUN([LTVERSION_VERSION],
  11118. [macro_version='2.4.6'
  11119. macro_revision='2.4.6'
  11120. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  11121. _LT_DECL(, macro_revision, 0)
  11122. ])
  11123. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  11124. #
  11125. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
  11126. # Foundation, Inc.
  11127. # Written by Scott James Remnant, 2004.
  11128. #
  11129. # This file is free software; the Free Software Foundation gives
  11130. # unlimited permission to copy and/or distribute it, with or without
  11131. # modifications, as long as this notice is preserved.
  11132. # serial 5 lt~obsolete.m4
  11133. # These exist entirely to fool aclocal when bootstrapping libtool.
  11134. #
  11135. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  11136. # which have later been changed to m4_define as they aren't part of the
  11137. # exported API, or moved to Autoconf or Automake where they belong.
  11138. #
  11139. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  11140. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  11141. # using a macro with the same name in our local m4/libtool.m4 it'll
  11142. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  11143. # and doesn't know about Autoconf macros at all.)
  11144. #
  11145. # So we provide this file, which has a silly filename so it's always
  11146. # included after everything else. This provides aclocal with the
  11147. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  11148. # because those macros already exist, or will be overwritten later.
  11149. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  11150. #
  11151. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  11152. # Yes, that means every name once taken will need to remain here until
  11153. # we give up compatibility with versions before 1.7, at which point
  11154. # we need to keep only those names which we still refer to.
  11155. # This is to help aclocal find these macros, as it can't see m4_define.
  11156. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  11157. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  11158. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  11159. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  11160. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  11161. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  11162. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  11163. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  11164. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  11165. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  11166. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  11167. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  11168. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  11169. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  11170. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  11171. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  11172. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  11173. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  11174. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  11175. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  11176. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  11177. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  11178. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  11179. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  11180. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  11181. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  11182. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  11183. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  11184. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  11185. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  11186. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  11187. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  11188. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  11189. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  11190. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  11191. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  11192. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  11193. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  11194. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  11195. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  11196. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  11197. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  11198. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  11199. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  11200. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  11201. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  11202. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  11203. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  11204. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  11205. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  11206. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  11207. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  11208. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  11209. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  11210. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  11211. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  11212. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  11213. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  11214. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  11215. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  11216. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  11217. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])