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.

7420 lines
262 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005 Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  12. # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
  13. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  14. # -----------------------------------------------------------
  15. # If this macro is not defined by Autoconf, define it here.
  16. m4_ifdef([AC_PROVIDE_IFELSE],
  17. [],
  18. [m4_define([AC_PROVIDE_IFELSE],
  19. [m4_ifdef([AC_PROVIDE_$1],
  20. [$2], [$3])])])
  21. # AC_PROG_LIBTOOL
  22. # ---------------
  23. AC_DEFUN([AC_PROG_LIBTOOL],
  24. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  25. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  26. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  27. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  28. [AC_LIBTOOL_CXX],
  29. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  30. ])])
  31. dnl And a similar setup for Fortran 77 support
  32. AC_PROVIDE_IFELSE([AC_PROG_F77],
  33. [AC_LIBTOOL_F77],
  34. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  35. ])])
  36. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  37. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  38. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  39. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  40. [AC_LIBTOOL_GCJ],
  41. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  42. [AC_LIBTOOL_GCJ],
  43. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  44. [AC_LIBTOOL_GCJ],
  45. [ifdef([AC_PROG_GCJ],
  46. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  47. ifdef([A][M_PROG_GCJ],
  48. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  49. ifdef([LT_AC_PROG_GCJ],
  50. [define([LT_AC_PROG_GCJ],
  51. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  52. ])])# AC_PROG_LIBTOOL
  53. # _AC_PROG_LIBTOOL
  54. # ----------------
  55. AC_DEFUN([_AC_PROG_LIBTOOL],
  56. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  57. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  58. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  59. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  60. # This can be used to rebuild libtool when needed
  61. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  62. # Always use our own libtool.
  63. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  64. AC_SUBST(LIBTOOL)dnl
  65. # Prevent multiple expansion
  66. define([AC_PROG_LIBTOOL], [])
  67. ])# _AC_PROG_LIBTOOL
  68. # AC_LIBTOOL_SETUP
  69. # ----------------
  70. AC_DEFUN([AC_LIBTOOL_SETUP],
  71. [AC_PREREQ(2.50)dnl
  72. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  73. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  74. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  75. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  76. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  77. AC_REQUIRE([AC_PROG_CC])dnl
  78. AC_REQUIRE([AC_PROG_LD])dnl
  79. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  80. AC_REQUIRE([AC_PROG_NM])dnl
  81. AC_REQUIRE([AC_PROG_LN_S])dnl
  82. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  83. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  84. AC_REQUIRE([AC_OBJEXT])dnl
  85. AC_REQUIRE([AC_EXEEXT])dnl
  86. dnl
  87. AC_LIBTOOL_SYS_MAX_CMD_LEN
  88. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  89. AC_LIBTOOL_OBJDIR
  90. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  91. _LT_AC_PROG_ECHO_BACKSLASH
  92. case $host_os in
  93. aix3*)
  94. # AIX sometimes has problems with the GCC collect2 program. For some
  95. # reason, if we set the COLLECT_NAMES environment variable, the problems
  96. # vanish in a puff of smoke.
  97. if test "X${COLLECT_NAMES+set}" != Xset; then
  98. COLLECT_NAMES=
  99. export COLLECT_NAMES
  100. fi
  101. ;;
  102. esac
  103. # Sed substitution that helps us do robust quoting. It backslashifies
  104. # metacharacters that are still active within double-quoted strings.
  105. Xsed='sed -e 1s/^X//'
  106. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  107. # Same as above, but do not quote variable references.
  108. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  109. # Sed substitution to delay expansion of an escaped shell variable in a
  110. # double_quote_subst'ed string.
  111. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  112. # Sed substitution to avoid accidental globbing in evaled expressions
  113. no_glob_subst='s/\*/\\\*/g'
  114. # Constants:
  115. rm="rm -f"
  116. # Global variables:
  117. default_ofile=libtool
  118. can_build_shared=yes
  119. # All known linkers require a `.a' archive for static linking (except MSVC,
  120. # which needs '.lib').
  121. libext=a
  122. ltmain="$ac_aux_dir/ltmain.sh"
  123. ofile="$default_ofile"
  124. with_gnu_ld="$lt_cv_prog_gnu_ld"
  125. AC_CHECK_TOOL(AR, ar, false)
  126. AC_CHECK_TOOL(RANLIB, ranlib, :)
  127. AC_CHECK_TOOL(STRIP, strip, :)
  128. old_CC="$CC"
  129. old_CFLAGS="$CFLAGS"
  130. # Set sane defaults for various variables
  131. test -z "$AR" && AR=ar
  132. test -z "$AR_FLAGS" && AR_FLAGS=cru
  133. test -z "$AS" && AS=as
  134. test -z "$CC" && CC=cc
  135. test -z "$LTCC" && LTCC=$CC
  136. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  137. test -z "$DLLTOOL" && DLLTOOL=dlltool
  138. test -z "$LD" && LD=ld
  139. test -z "$LN_S" && LN_S="ln -s"
  140. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  141. test -z "$NM" && NM=nm
  142. test -z "$SED" && SED=sed
  143. test -z "$OBJDUMP" && OBJDUMP=objdump
  144. test -z "$RANLIB" && RANLIB=:
  145. test -z "$STRIP" && STRIP=:
  146. test -z "$ac_objext" && ac_objext=o
  147. # Determine commands to create old-style static archives.
  148. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  149. old_postinstall_cmds='chmod 644 $oldlib'
  150. old_postuninstall_cmds=
  151. if test -n "$RANLIB"; then
  152. case $host_os in
  153. openbsd*)
  154. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  155. ;;
  156. *)
  157. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  158. ;;
  159. esac
  160. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  161. fi
  162. _LT_CC_BASENAME([$compiler])
  163. # Only perform the check for file, if the check method requires it
  164. case $deplibs_check_method in
  165. file_magic*)
  166. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  167. AC_PATH_MAGIC
  168. fi
  169. ;;
  170. esac
  171. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  172. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  173. enable_win32_dll=yes, enable_win32_dll=no)
  174. AC_ARG_ENABLE([libtool-lock],
  175. [AC_HELP_STRING([--disable-libtool-lock],
  176. [avoid locking (might break parallel builds)])])
  177. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  178. AC_ARG_WITH([pic],
  179. [AC_HELP_STRING([--with-pic],
  180. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  181. [pic_mode="$withval"],
  182. [pic_mode=default])
  183. test -z "$pic_mode" && pic_mode=default
  184. # Use C for the default configuration in the libtool script
  185. tagname=
  186. AC_LIBTOOL_LANG_C_CONFIG
  187. _LT_AC_TAGCONFIG
  188. ])# AC_LIBTOOL_SETUP
  189. # _LT_AC_SYS_COMPILER
  190. # -------------------
  191. AC_DEFUN([_LT_AC_SYS_COMPILER],
  192. [AC_REQUIRE([AC_PROG_CC])dnl
  193. # If no C compiler was specified, use CC.
  194. LTCC=${LTCC-"$CC"}
  195. # If no C compiler flags were specified, use CFLAGS.
  196. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  197. # Allow CC to be a program name with arguments.
  198. compiler=$CC
  199. ])# _LT_AC_SYS_COMPILER
  200. # _LT_CC_BASENAME(CC)
  201. # -------------------
  202. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  203. AC_DEFUN([_LT_CC_BASENAME],
  204. [for cc_temp in $1""; do
  205. case $cc_temp in
  206. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  207. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  208. \-*) ;;
  209. *) break;;
  210. esac
  211. done
  212. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  213. ])
  214. # _LT_COMPILER_BOILERPLATE
  215. # ------------------------
  216. # Check for compiler boilerplate output or warnings with
  217. # the simple compiler test code.
  218. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  219. [ac_outfile=conftest.$ac_objext
  220. printf "$lt_simple_compile_test_code" >conftest.$ac_ext
  221. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  222. _lt_compiler_boilerplate=`cat conftest.err`
  223. $rm conftest*
  224. ])# _LT_COMPILER_BOILERPLATE
  225. # _LT_LINKER_BOILERPLATE
  226. # ----------------------
  227. # Check for linker boilerplate output or warnings with
  228. # the simple link test code.
  229. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  230. [ac_outfile=conftest.$ac_objext
  231. printf "$lt_simple_link_test_code" >conftest.$ac_ext
  232. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  233. _lt_linker_boilerplate=`cat conftest.err`
  234. $rm conftest*
  235. ])# _LT_LINKER_BOILERPLATE
  236. # _LT_AC_SYS_LIBPATH_AIX
  237. # ----------------------
  238. # Links a minimal program and checks the executable
  239. # for the system default hardcoded library path. In most cases,
  240. # this is /usr/lib:/lib, but when the MPI compilers are used
  241. # the location of the communication and MPI libs are included too.
  242. # If we don't find anything, use the default library path according
  243. # to the aix ld manual.
  244. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  245. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  246. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  247. }'`
  248. # Check for a 64-bit object if we didn't find anything.
  249. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  250. }'`; fi],[])
  251. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  252. ])# _LT_AC_SYS_LIBPATH_AIX
  253. # _LT_AC_SHELL_INIT(ARG)
  254. # ----------------------
  255. AC_DEFUN([_LT_AC_SHELL_INIT],
  256. [ifdef([AC_DIVERSION_NOTICE],
  257. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  258. [AC_DIVERT_PUSH(NOTICE)])
  259. $1
  260. AC_DIVERT_POP
  261. ])# _LT_AC_SHELL_INIT
  262. # _LT_AC_PROG_ECHO_BACKSLASH
  263. # --------------------------
  264. # Add some code to the start of the generated configure script which
  265. # will find an echo command which doesn't interpret backslashes.
  266. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  267. [_LT_AC_SHELL_INIT([
  268. # Check that we are running under the correct shell.
  269. SHELL=${CONFIG_SHELL-/bin/sh}
  270. case X$ECHO in
  271. X*--fallback-echo)
  272. # Remove one level of quotation (which was required for Make).
  273. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  274. ;;
  275. esac
  276. echo=${ECHO-echo}
  277. if test "X[$]1" = X--no-reexec; then
  278. # Discard the --no-reexec flag, and continue.
  279. shift
  280. elif test "X[$]1" = X--fallback-echo; then
  281. # Avoid inline document here, it may be left over
  282. :
  283. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  284. # Yippee, $echo works!
  285. :
  286. else
  287. # Restart under the correct shell.
  288. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  289. fi
  290. if test "X[$]1" = X--fallback-echo; then
  291. # used as fallback echo
  292. shift
  293. cat <<EOF
  294. [$]*
  295. EOF
  296. exit 0
  297. fi
  298. # The HP-UX ksh and POSIX shell print the target directory to stdout
  299. # if CDPATH is set.
  300. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  301. if test -z "$ECHO"; then
  302. if test "X${echo_test_string+set}" != Xset; then
  303. # find a string as large as possible, as long as the shell can cope with it
  304. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  305. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  306. if (echo_test_string=`eval $cmd`) 2>/dev/null &&
  307. echo_test_string=`eval $cmd` &&
  308. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  309. then
  310. break
  311. fi
  312. done
  313. fi
  314. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  315. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  316. test "X$echo_testing_string" = "X$echo_test_string"; then
  317. :
  318. else
  319. # The Solaris, AIX, and Digital Unix default echo programs unquote
  320. # backslashes. This makes it impossible to quote backslashes using
  321. # echo "$something" | sed 's/\\/\\\\/g'
  322. #
  323. # So, first we look for a working echo in the user's PATH.
  324. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  325. for dir in $PATH /usr/ucb; do
  326. IFS="$lt_save_ifs"
  327. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  328. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  329. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  330. test "X$echo_testing_string" = "X$echo_test_string"; then
  331. echo="$dir/echo"
  332. break
  333. fi
  334. done
  335. IFS="$lt_save_ifs"
  336. if test "X$echo" = Xecho; then
  337. # We didn't find a better echo, so look for alternatives.
  338. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  339. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  340. test "X$echo_testing_string" = "X$echo_test_string"; then
  341. # This shell has a builtin print -r that does the trick.
  342. echo='print -r'
  343. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  344. test "X$CONFIG_SHELL" != X/bin/ksh; then
  345. # If we have ksh, try running configure again with it.
  346. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  347. export ORIGINAL_CONFIG_SHELL
  348. CONFIG_SHELL=/bin/ksh
  349. export CONFIG_SHELL
  350. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  351. else
  352. # Try using printf.
  353. echo='printf %s\n'
  354. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  355. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  356. test "X$echo_testing_string" = "X$echo_test_string"; then
  357. # Cool, printf works
  358. :
  359. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  360. test "X$echo_testing_string" = 'X\t' &&
  361. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  362. test "X$echo_testing_string" = "X$echo_test_string"; then
  363. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  364. export CONFIG_SHELL
  365. SHELL="$CONFIG_SHELL"
  366. export SHELL
  367. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  368. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  369. test "X$echo_testing_string" = 'X\t' &&
  370. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  371. test "X$echo_testing_string" = "X$echo_test_string"; then
  372. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  373. else
  374. # maybe with a smaller string...
  375. prev=:
  376. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  377. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  378. then
  379. break
  380. fi
  381. prev="$cmd"
  382. done
  383. if test "$prev" != 'sed 50q "[$]0"'; then
  384. echo_test_string=`eval $prev`
  385. export echo_test_string
  386. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  387. else
  388. # Oops. We lost completely, so just stick with echo.
  389. echo=echo
  390. fi
  391. fi
  392. fi
  393. fi
  394. fi
  395. fi
  396. # Copy echo and quote the copy suitably for passing to libtool from
  397. # the Makefile, instead of quoting the original, which is used later.
  398. ECHO=$echo
  399. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  400. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  401. fi
  402. AC_SUBST(ECHO)
  403. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  404. # _LT_AC_LOCK
  405. # -----------
  406. AC_DEFUN([_LT_AC_LOCK],
  407. [AC_ARG_ENABLE([libtool-lock],
  408. [AC_HELP_STRING([--disable-libtool-lock],
  409. [avoid locking (might break parallel builds)])])
  410. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  411. # Some flags need to be propagated to the compiler or linker for good
  412. # libtool support.
  413. case $host in
  414. ia64-*-hpux*)
  415. # Find out which ABI we are using.
  416. echo 'int i;' > conftest.$ac_ext
  417. if AC_TRY_EVAL(ac_compile); then
  418. case `/usr/bin/file conftest.$ac_objext` in
  419. *ELF-32*)
  420. HPUX_IA64_MODE="32"
  421. ;;
  422. *ELF-64*)
  423. HPUX_IA64_MODE="64"
  424. ;;
  425. esac
  426. fi
  427. rm -rf conftest*
  428. ;;
  429. *-*-irix6*)
  430. # Find out which ABI we are using.
  431. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  432. if AC_TRY_EVAL(ac_compile); then
  433. if test "$lt_cv_prog_gnu_ld" = yes; then
  434. case `/usr/bin/file conftest.$ac_objext` in
  435. *32-bit*)
  436. LD="${LD-ld} -melf32bsmip"
  437. ;;
  438. *N32*)
  439. LD="${LD-ld} -melf32bmipn32"
  440. ;;
  441. *64-bit*)
  442. LD="${LD-ld} -melf64bmip"
  443. ;;
  444. esac
  445. else
  446. case `/usr/bin/file conftest.$ac_objext` in
  447. *32-bit*)
  448. LD="${LD-ld} -32"
  449. ;;
  450. *N32*)
  451. LD="${LD-ld} -n32"
  452. ;;
  453. *64-bit*)
  454. LD="${LD-ld} -64"
  455. ;;
  456. esac
  457. fi
  458. fi
  459. rm -rf conftest*
  460. ;;
  461. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  462. # Find out which ABI we are using.
  463. echo 'int i;' > conftest.$ac_ext
  464. if AC_TRY_EVAL(ac_compile); then
  465. case `/usr/bin/file conftest.o` in
  466. *32-bit*)
  467. case $host in
  468. x86_64-*linux*)
  469. LD="${LD-ld} -m elf_i386"
  470. ;;
  471. ppc64-*linux*|powerpc64-*linux*)
  472. LD="${LD-ld} -m elf32ppclinux"
  473. ;;
  474. s390x-*linux*)
  475. LD="${LD-ld} -m elf_s390"
  476. ;;
  477. sparc64-*linux*)
  478. LD="${LD-ld} -m elf32_sparc"
  479. ;;
  480. esac
  481. ;;
  482. *64-bit*)
  483. case $host in
  484. x86_64-*linux*)
  485. LD="${LD-ld} -m elf_x86_64"
  486. ;;
  487. ppc*-*linux*|powerpc*-*linux*)
  488. LD="${LD-ld} -m elf64ppc"
  489. ;;
  490. s390*-*linux*)
  491. LD="${LD-ld} -m elf64_s390"
  492. ;;
  493. sparc*-*linux*)
  494. LD="${LD-ld} -m elf64_sparc"
  495. ;;
  496. esac
  497. ;;
  498. esac
  499. fi
  500. rm -rf conftest*
  501. ;;
  502. *-*-sco3.2v5*)
  503. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  504. SAVE_CFLAGS="$CFLAGS"
  505. CFLAGS="$CFLAGS -belf"
  506. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  507. [AC_LANG_PUSH(C)
  508. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  509. AC_LANG_POP])
  510. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  511. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  512. CFLAGS="$SAVE_CFLAGS"
  513. fi
  514. ;;
  515. sparc*-*solaris*)
  516. # Find out which ABI we are using.
  517. echo 'int i;' > conftest.$ac_ext
  518. if AC_TRY_EVAL(ac_compile); then
  519. case `/usr/bin/file conftest.o` in
  520. *64-bit*)
  521. case $lt_cv_prog_gnu_ld in
  522. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  523. *) LD="${LD-ld} -64" ;;
  524. esac
  525. ;;
  526. esac
  527. fi
  528. rm -rf conftest*
  529. ;;
  530. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  531. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  532. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  533. AC_CHECK_TOOL(AS, as, false)
  534. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  535. ;;
  536. ])
  537. esac
  538. need_locks="$enable_libtool_lock"
  539. ])# _LT_AC_LOCK
  540. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  541. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  542. # ----------------------------------------------------------------
  543. # Check whether the given compiler option works
  544. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  545. [AC_REQUIRE([LT_AC_PROG_SED])
  546. AC_CACHE_CHECK([$1], [$2],
  547. [$2=no
  548. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  549. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  550. lt_compiler_flag="$3"
  551. # Insert the option either (1) after the last *FLAGS variable, or
  552. # (2) before a word containing "conftest.", or (3) at the end.
  553. # Note that $ac_compile itself does not contain backslashes and begins
  554. # with a dollar sign (not a hyphen), so the echo should work correctly.
  555. # The option is referenced via a variable to avoid confusing sed.
  556. lt_compile=`echo "$ac_compile" | $SED \
  557. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  558. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  559. -e 's:$: $lt_compiler_flag:'`
  560. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  561. (eval "$lt_compile" 2>conftest.err)
  562. ac_status=$?
  563. cat conftest.err >&AS_MESSAGE_LOG_FD
  564. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  565. if (exit $ac_status) && test -s "$ac_outfile"; then
  566. # The compiler can only warn and ignore the option if not recognized
  567. # So say no if there are warnings other than the usual output.
  568. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  569. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  570. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  571. $2=yes
  572. fi
  573. fi
  574. $rm conftest*
  575. ])
  576. if test x"[$]$2" = xyes; then
  577. ifelse([$5], , :, [$5])
  578. else
  579. ifelse([$6], , :, [$6])
  580. fi
  581. ])# AC_LIBTOOL_COMPILER_OPTION
  582. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  583. # [ACTION-SUCCESS], [ACTION-FAILURE])
  584. # ------------------------------------------------------------
  585. # Check whether the given compiler option works
  586. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  587. [AC_CACHE_CHECK([$1], [$2],
  588. [$2=no
  589. save_LDFLAGS="$LDFLAGS"
  590. LDFLAGS="$LDFLAGS $3"
  591. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  592. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  593. # The linker can only warn and ignore the option if not recognized
  594. # So say no if there are warnings
  595. if test -s conftest.err; then
  596. # Append any errors to the config.log.
  597. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  598. $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  599. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  600. if diff conftest.exp conftest.er2 >/dev/null; then
  601. $2=yes
  602. fi
  603. else
  604. $2=yes
  605. fi
  606. fi
  607. $rm conftest*
  608. LDFLAGS="$save_LDFLAGS"
  609. ])
  610. if test x"[$]$2" = xyes; then
  611. ifelse([$4], , :, [$4])
  612. else
  613. ifelse([$5], , :, [$5])
  614. fi
  615. ])# AC_LIBTOOL_LINKER_OPTION
  616. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  617. # --------------------------
  618. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  619. [# find the maximum length of command line arguments
  620. AC_MSG_CHECKING([the maximum length of command line arguments])
  621. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  622. i=0
  623. teststring="ABCD"
  624. case $build_os in
  625. msdosdjgpp*)
  626. # On DJGPP, this test can blow up pretty badly due to problems in libc
  627. # (any single argument exceeding 2000 bytes causes a buffer overrun
  628. # during glob expansion). Even if it were fixed, the result of this
  629. # check would be larger than it should be.
  630. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  631. ;;
  632. gnu*)
  633. # Under GNU Hurd, this test is not required because there is
  634. # no limit to the length of command line arguments.
  635. # Libtool will interpret -1 as no limit whatsoever
  636. lt_cv_sys_max_cmd_len=-1;
  637. ;;
  638. cygwin* | mingw*)
  639. # On Win9x/ME, this test blows up -- it succeeds, but takes
  640. # about 5 minutes as the teststring grows exponentially.
  641. # Worse, since 9x/ME are not pre-emptively multitasking,
  642. # you end up with a "frozen" computer, even though with patience
  643. # the test eventually succeeds (with a max line length of 256k).
  644. # Instead, let's just punt: use the minimum linelength reported by
  645. # all of the supported platforms: 8192 (on NT/2K/XP).
  646. lt_cv_sys_max_cmd_len=8192;
  647. ;;
  648. amigaos*)
  649. # On AmigaOS with pdksh, this test takes hours, literally.
  650. # So we just punt and use a minimum line length of 8192.
  651. lt_cv_sys_max_cmd_len=8192;
  652. ;;
  653. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  654. # This has been around since 386BSD, at least. Likely further.
  655. if test -x /sbin/sysctl; then
  656. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  657. elif test -x /usr/sbin/sysctl; then
  658. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  659. else
  660. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  661. fi
  662. # And add a safety zone
  663. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  664. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  665. ;;
  666. interix*)
  667. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  668. lt_cv_sys_max_cmd_len=196608
  669. ;;
  670. osf*)
  671. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  672. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  673. # nice to cause kernel panics so lets avoid the loop below.
  674. # First set a reasonable default.
  675. lt_cv_sys_max_cmd_len=16384
  676. #
  677. if test -x /sbin/sysconfig; then
  678. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  679. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  680. esac
  681. fi
  682. ;;
  683. sco3.2v5*)
  684. lt_cv_sys_max_cmd_len=102400
  685. ;;
  686. sysv5* | sco5v6* | sysv4.2uw2*)
  687. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  688. if test -n "$kargmax"; then
  689. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  690. else
  691. lt_cv_sys_max_cmd_len=32768
  692. fi
  693. ;;
  694. *)
  695. # If test is not a shell built-in, we'll probably end up computing a
  696. # maximum length that is only half of the actual maximum length, but
  697. # we can't tell.
  698. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  699. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  700. = "XX$teststring") >/dev/null 2>&1 &&
  701. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  702. lt_cv_sys_max_cmd_len=$new_result &&
  703. test $i != 17 # 1/2 MB should be enough
  704. do
  705. i=`expr $i + 1`
  706. teststring=$teststring$teststring
  707. done
  708. teststring=
  709. # Add a significant safety factor because C++ compilers can tack on massive
  710. # amounts of additional arguments before passing them to the linker.
  711. # It appears as though 1/2 is a usable value.
  712. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  713. ;;
  714. esac
  715. ])
  716. if test -n $lt_cv_sys_max_cmd_len ; then
  717. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  718. else
  719. AC_MSG_RESULT(none)
  720. fi
  721. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  722. # _LT_AC_CHECK_DLFCN
  723. # ------------------
  724. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  725. [AC_CHECK_HEADERS(dlfcn.h)dnl
  726. ])# _LT_AC_CHECK_DLFCN
  727. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  728. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  729. # ---------------------------------------------------------------------
  730. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  731. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  732. if test "$cross_compiling" = yes; then :
  733. [$4]
  734. else
  735. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  736. lt_status=$lt_dlunknown
  737. cat > conftest.$ac_ext <<EOF
  738. [#line __oline__ "configure"
  739. #include "confdefs.h"
  740. #if HAVE_DLFCN_H
  741. #include <dlfcn.h>
  742. #endif
  743. #include <stdio.h>
  744. #ifdef RTLD_GLOBAL
  745. # define LT_DLGLOBAL RTLD_GLOBAL
  746. #else
  747. # ifdef DL_GLOBAL
  748. # define LT_DLGLOBAL DL_GLOBAL
  749. # else
  750. # define LT_DLGLOBAL 0
  751. # endif
  752. #endif
  753. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  754. find out it does not work in some platform. */
  755. #ifndef LT_DLLAZY_OR_NOW
  756. # ifdef RTLD_LAZY
  757. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  758. # else
  759. # ifdef DL_LAZY
  760. # define LT_DLLAZY_OR_NOW DL_LAZY
  761. # else
  762. # ifdef RTLD_NOW
  763. # define LT_DLLAZY_OR_NOW RTLD_NOW
  764. # else
  765. # ifdef DL_NOW
  766. # define LT_DLLAZY_OR_NOW DL_NOW
  767. # else
  768. # define LT_DLLAZY_OR_NOW 0
  769. # endif
  770. # endif
  771. # endif
  772. # endif
  773. #endif
  774. #ifdef __cplusplus
  775. extern "C" void exit (int);
  776. #endif
  777. void fnord() { int i=42;}
  778. int main ()
  779. {
  780. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  781. int status = $lt_dlunknown;
  782. if (self)
  783. {
  784. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  785. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  786. /* dlclose (self); */
  787. }
  788. else
  789. puts (dlerror ());
  790. exit (status);
  791. }]
  792. EOF
  793. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  794. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  795. lt_status=$?
  796. case x$lt_status in
  797. x$lt_dlno_uscore) $1 ;;
  798. x$lt_dlneed_uscore) $2 ;;
  799. x$lt_dlunknown|x*) $3 ;;
  800. esac
  801. else :
  802. # compilation failed
  803. $3
  804. fi
  805. fi
  806. rm -fr conftest*
  807. ])# _LT_AC_TRY_DLOPEN_SELF
  808. # AC_LIBTOOL_DLOPEN_SELF
  809. # ----------------------
  810. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  811. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  812. if test "x$enable_dlopen" != xyes; then
  813. enable_dlopen=unknown
  814. enable_dlopen_self=unknown
  815. enable_dlopen_self_static=unknown
  816. else
  817. lt_cv_dlopen=no
  818. lt_cv_dlopen_libs=
  819. case $host_os in
  820. beos*)
  821. lt_cv_dlopen="load_add_on"
  822. lt_cv_dlopen_libs=
  823. lt_cv_dlopen_self=yes
  824. ;;
  825. mingw* | pw32*)
  826. lt_cv_dlopen="LoadLibrary"
  827. lt_cv_dlopen_libs=
  828. ;;
  829. cygwin*)
  830. lt_cv_dlopen="dlopen"
  831. lt_cv_dlopen_libs=
  832. ;;
  833. darwin*)
  834. # if libdl is installed we need to link against it
  835. AC_CHECK_LIB([dl], [dlopen],
  836. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  837. lt_cv_dlopen="dyld"
  838. lt_cv_dlopen_libs=
  839. lt_cv_dlopen_self=yes
  840. ])
  841. ;;
  842. *)
  843. AC_CHECK_FUNC([shl_load],
  844. [lt_cv_dlopen="shl_load"],
  845. [AC_CHECK_LIB([dld], [shl_load],
  846. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  847. [AC_CHECK_FUNC([dlopen],
  848. [lt_cv_dlopen="dlopen"],
  849. [AC_CHECK_LIB([dl], [dlopen],
  850. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  851. [AC_CHECK_LIB([svld], [dlopen],
  852. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  853. [AC_CHECK_LIB([dld], [dld_link],
  854. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  855. ])
  856. ])
  857. ])
  858. ])
  859. ])
  860. ;;
  861. esac
  862. if test "x$lt_cv_dlopen" != xno; then
  863. enable_dlopen=yes
  864. else
  865. enable_dlopen=no
  866. fi
  867. case $lt_cv_dlopen in
  868. dlopen)
  869. save_CPPFLAGS="$CPPFLAGS"
  870. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  871. save_LDFLAGS="$LDFLAGS"
  872. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  873. save_LIBS="$LIBS"
  874. LIBS="$lt_cv_dlopen_libs $LIBS"
  875. AC_CACHE_CHECK([whether a program can dlopen itself],
  876. lt_cv_dlopen_self, [dnl
  877. _LT_AC_TRY_DLOPEN_SELF(
  878. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  879. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  880. ])
  881. if test "x$lt_cv_dlopen_self" = xyes; then
  882. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  883. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  884. lt_cv_dlopen_self_static, [dnl
  885. _LT_AC_TRY_DLOPEN_SELF(
  886. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  887. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  888. ])
  889. fi
  890. CPPFLAGS="$save_CPPFLAGS"
  891. LDFLAGS="$save_LDFLAGS"
  892. LIBS="$save_LIBS"
  893. ;;
  894. esac
  895. case $lt_cv_dlopen_self in
  896. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  897. *) enable_dlopen_self=unknown ;;
  898. esac
  899. case $lt_cv_dlopen_self_static in
  900. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  901. *) enable_dlopen_self_static=unknown ;;
  902. esac
  903. fi
  904. ])# AC_LIBTOOL_DLOPEN_SELF
  905. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  906. # ---------------------------------
  907. # Check to see if options -c and -o are simultaneously supported by compiler
  908. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  909. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  910. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  911. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  912. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  913. $rm -r conftest 2>/dev/null
  914. mkdir conftest
  915. cd conftest
  916. mkdir out
  917. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  918. lt_compiler_flag="-o out/conftest2.$ac_objext"
  919. # Insert the option either (1) after the last *FLAGS variable, or
  920. # (2) before a word containing "conftest.", or (3) at the end.
  921. # Note that $ac_compile itself does not contain backslashes and begins
  922. # with a dollar sign (not a hyphen), so the echo should work correctly.
  923. lt_compile=`echo "$ac_compile" | $SED \
  924. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  925. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  926. -e 's:$: $lt_compiler_flag:'`
  927. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  928. (eval "$lt_compile" 2>out/conftest.err)
  929. ac_status=$?
  930. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  931. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  932. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  933. then
  934. # The compiler can only warn and ignore the option if not recognized
  935. # So say no if there are warnings
  936. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  937. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  938. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  939. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  940. fi
  941. fi
  942. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  943. $rm conftest*
  944. # SGI C++ compiler will create directory out/ii_files/ for
  945. # template instantiation
  946. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  947. $rm out/* && rmdir out
  948. cd ..
  949. rmdir conftest
  950. $rm conftest*
  951. ])
  952. ])# AC_LIBTOOL_PROG_CC_C_O
  953. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  954. # -----------------------------------------
  955. # Check to see if we can do hard links to lock some files if needed
  956. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  957. [AC_REQUIRE([_LT_AC_LOCK])dnl
  958. hard_links="nottested"
  959. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  960. # do not overwrite the value of need_locks provided by the user
  961. AC_MSG_CHECKING([if we can lock with hard links])
  962. hard_links=yes
  963. $rm conftest*
  964. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  965. touch conftest.a
  966. ln conftest.a conftest.b 2>&5 || hard_links=no
  967. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  968. AC_MSG_RESULT([$hard_links])
  969. if test "$hard_links" = no; then
  970. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  971. need_locks=warn
  972. fi
  973. else
  974. need_locks=no
  975. fi
  976. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  977. # AC_LIBTOOL_OBJDIR
  978. # -----------------
  979. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  980. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  981. [rm -f .libs 2>/dev/null
  982. mkdir .libs 2>/dev/null
  983. if test -d .libs; then
  984. lt_cv_objdir=.libs
  985. else
  986. # MS-DOS does not allow filenames that begin with a dot.
  987. lt_cv_objdir=_libs
  988. fi
  989. rmdir .libs 2>/dev/null])
  990. objdir=$lt_cv_objdir
  991. ])# AC_LIBTOOL_OBJDIR
  992. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  993. # ----------------------------------------------
  994. # Check hardcoding attributes.
  995. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  996. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  997. _LT_AC_TAGVAR(hardcode_action, $1)=
  998. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  999. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  1000. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1001. # We can hardcode non-existant directories.
  1002. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1003. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1004. # have to relink, otherwise we might link with an installed library
  1005. # when we should be linking with a yet-to-be-installed one
  1006. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1007. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  1008. # Linking always hardcodes the temporary library directory.
  1009. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  1010. else
  1011. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1012. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  1013. fi
  1014. else
  1015. # We cannot hardcode anything, or else we can only hardcode existing
  1016. # directories.
  1017. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  1018. fi
  1019. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  1020. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  1021. # Fast installation is not supported
  1022. enable_fast_install=no
  1023. elif test "$shlibpath_overrides_runpath" = yes ||
  1024. test "$enable_shared" = no; then
  1025. # Fast installation is not necessary
  1026. enable_fast_install=needless
  1027. fi
  1028. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  1029. # AC_LIBTOOL_SYS_LIB_STRIP
  1030. # ------------------------
  1031. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1032. [striplib=
  1033. old_striplib=
  1034. AC_MSG_CHECKING([whether stripping libraries is possible])
  1035. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1036. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1037. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1038. AC_MSG_RESULT([yes])
  1039. else
  1040. # FIXME - insert some real tests, host_os isn't really good enough
  1041. case $host_os in
  1042. darwin*)
  1043. if test -n "$STRIP" ; then
  1044. striplib="$STRIP -x"
  1045. AC_MSG_RESULT([yes])
  1046. else
  1047. AC_MSG_RESULT([no])
  1048. fi
  1049. ;;
  1050. *)
  1051. AC_MSG_RESULT([no])
  1052. ;;
  1053. esac
  1054. fi
  1055. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1056. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1057. # -----------------------------
  1058. # PORTME Fill in your ld.so characteristics
  1059. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1060. [AC_MSG_CHECKING([dynamic linker characteristics])
  1061. library_names_spec=
  1062. libname_spec='lib$name'
  1063. soname_spec=
  1064. shrext_cmds=".so"
  1065. postinstall_cmds=
  1066. postuninstall_cmds=
  1067. finish_cmds=
  1068. finish_eval=
  1069. shlibpath_var=
  1070. shlibpath_overrides_runpath=unknown
  1071. version_type=none
  1072. dynamic_linker="$host_os ld.so"
  1073. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1074. if test "$GCC" = yes; then
  1075. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1076. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  1077. # if the path contains ";" then we assume it to be the separator
  1078. # otherwise default to the standard path separator (i.e. ":") - it is
  1079. # assumed that no part of a normal pathname contains ";" but that should
  1080. # okay in the real world where ";" in dirpaths is itself problematic.
  1081. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1082. else
  1083. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1084. fi
  1085. else
  1086. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1087. fi
  1088. need_lib_prefix=unknown
  1089. hardcode_into_libs=no
  1090. # when you set need_version to no, make sure it does not cause -set_version
  1091. # flags to be left without arguments
  1092. need_version=unknown
  1093. case $host_os in
  1094. aix3*)
  1095. version_type=linux
  1096. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1097. shlibpath_var=LIBPATH
  1098. # AIX 3 has no versioning support, so we append a major version to the name.
  1099. soname_spec='${libname}${release}${shared_ext}$major'
  1100. ;;
  1101. aix4* | aix5*)
  1102. version_type=linux
  1103. need_lib_prefix=no
  1104. need_version=no
  1105. hardcode_into_libs=yes
  1106. if test "$host_cpu" = ia64; then
  1107. # AIX 5 supports IA64
  1108. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1109. shlibpath_var=LD_LIBRARY_PATH
  1110. else
  1111. # With GCC up to 2.95.x, collect2 would create an import file
  1112. # for dependence libraries. The import file would start with
  1113. # the line `#! .'. This would cause the generated library to
  1114. # depend on `.', always an invalid library. This was fixed in
  1115. # development snapshots of GCC prior to 3.0.
  1116. case $host_os in
  1117. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1118. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1119. echo ' yes '
  1120. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1121. :
  1122. else
  1123. can_build_shared=no
  1124. fi
  1125. ;;
  1126. esac
  1127. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1128. # soname into executable. Probably we can add versioning support to
  1129. # collect2, so additional links can be useful in future.
  1130. if test "$aix_use_runtimelinking" = yes; then
  1131. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1132. # instead of lib<name>.a to let people know that these are not
  1133. # typical AIX shared libraries.
  1134. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1135. else
  1136. # We preserve .a as extension for shared libraries through AIX4.2
  1137. # and later when we are not doing run time linking.
  1138. library_names_spec='${libname}${release}.a $libname.a'
  1139. soname_spec='${libname}${release}${shared_ext}$major'
  1140. fi
  1141. shlibpath_var=LIBPATH
  1142. fi
  1143. ;;
  1144. amigaos*)
  1145. library_names_spec='$libname.ixlibrary $libname.a'
  1146. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1147. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
  1148. ;;
  1149. beos*)
  1150. library_names_spec='${libname}${shared_ext}'
  1151. dynamic_linker="$host_os ld.so"
  1152. shlibpath_var=LIBRARY_PATH
  1153. ;;
  1154. bsdi[[45]]*)
  1155. version_type=linux
  1156. need_version=no
  1157. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1158. soname_spec='${libname}${release}${shared_ext}$major'
  1159. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1160. shlibpath_var=LD_LIBRARY_PATH
  1161. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1162. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1163. # the default ld.so.conf also contains /usr/contrib/lib and
  1164. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1165. # libtool to hard-code these into programs
  1166. ;;
  1167. cygwin* | mingw* | pw32*)
  1168. version_type=windows
  1169. shrext_cmds=".dll"
  1170. need_version=no
  1171. need_lib_prefix=no
  1172. case $GCC,$host_os in
  1173. yes,cygwin* | yes,mingw* | yes,pw32*)
  1174. library_names_spec='$libname.dll.a'
  1175. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1176. postinstall_cmds='base_file=`basename \${file}`~
  1177. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1178. dldir=$destdir/`dirname \$dlpath`~
  1179. test -d \$dldir || mkdir -p \$dldir~
  1180. $install_prog $dir/$dlname \$dldir/$dlname~
  1181. chmod a+x \$dldir/$dlname'
  1182. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1183. dlpath=$dir/\$dldll~
  1184. $rm \$dlpath'
  1185. shlibpath_overrides_runpath=yes
  1186. case $host_os in
  1187. cygwin*)
  1188. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1189. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1190. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1191. ;;
  1192. mingw*)
  1193. # MinGW DLLs use traditional 'lib' prefix
  1194. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1195. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1196. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1197. # It is most probably a Windows format PATH printed by
  1198. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1199. # path with ; separators, and with drive letters. We can handle the
  1200. # drive letters (cygwin fileutils understands them), so leave them,
  1201. # especially as we might pass files found there to a mingw objdump,
  1202. # which wouldn't understand a cygwinified path. Ahh.
  1203. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1204. else
  1205. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1206. fi
  1207. ;;
  1208. pw32*)
  1209. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1210. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1211. ;;
  1212. esac
  1213. ;;
  1214. *)
  1215. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1216. ;;
  1217. esac
  1218. dynamic_linker='Win32 ld.exe'
  1219. # FIXME: first we should search . and the directory the executable is in
  1220. shlibpath_var=PATH
  1221. ;;
  1222. darwin* | rhapsody*)
  1223. dynamic_linker="$host_os dyld"
  1224. version_type=darwin
  1225. need_lib_prefix=no
  1226. need_version=no
  1227. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1228. soname_spec='${libname}${release}${major}$shared_ext'
  1229. shlibpath_overrides_runpath=yes
  1230. shlibpath_var=DYLD_LIBRARY_PATH
  1231. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  1232. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1233. if test "$GCC" = yes; then
  1234. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1235. else
  1236. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1237. fi
  1238. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1239. ;;
  1240. dgux*)
  1241. version_type=linux
  1242. need_lib_prefix=no
  1243. need_version=no
  1244. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1245. soname_spec='${libname}${release}${shared_ext}$major'
  1246. shlibpath_var=LD_LIBRARY_PATH
  1247. ;;
  1248. freebsd1*)
  1249. dynamic_linker=no
  1250. ;;
  1251. freebsd* | dragonfly*)
  1252. # DragonFly does not have aout. When/if they implement a new
  1253. # versioning mechanism, adjust this.
  1254. if test -x /usr/bin/objformat; then
  1255. objformat=`/usr/bin/objformat`
  1256. else
  1257. case $host_os in
  1258. freebsd[[123]]*) objformat=aout ;;
  1259. *) objformat=elf ;;
  1260. esac
  1261. fi
  1262. version_type=freebsd-$objformat
  1263. case $version_type in
  1264. freebsd-elf*)
  1265. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1266. need_version=no
  1267. need_lib_prefix=no
  1268. ;;
  1269. freebsd-*)
  1270. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1271. need_version=yes
  1272. ;;
  1273. esac
  1274. shlibpath_var=LD_LIBRARY_PATH
  1275. case $host_os in
  1276. freebsd2*)
  1277. shlibpath_overrides_runpath=yes
  1278. ;;
  1279. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1280. shlibpath_overrides_runpath=yes
  1281. hardcode_into_libs=yes
  1282. ;;
  1283. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  1284. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  1285. shlibpath_overrides_runpath=no
  1286. hardcode_into_libs=yes
  1287. ;;
  1288. freebsd*) # from 4.6 on
  1289. shlibpath_overrides_runpath=yes
  1290. hardcode_into_libs=yes
  1291. ;;
  1292. esac
  1293. ;;
  1294. gnu*)
  1295. version_type=linux
  1296. need_lib_prefix=no
  1297. need_version=no
  1298. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1299. soname_spec='${libname}${release}${shared_ext}$major'
  1300. shlibpath_var=LD_LIBRARY_PATH
  1301. hardcode_into_libs=yes
  1302. ;;
  1303. hpux9* | hpux10* | hpux11*)
  1304. # Give a soname corresponding to the major version so that dld.sl refuses to
  1305. # link against other versions.
  1306. version_type=sunos
  1307. need_lib_prefix=no
  1308. need_version=no
  1309. case $host_cpu in
  1310. ia64*)
  1311. shrext_cmds='.so'
  1312. hardcode_into_libs=yes
  1313. dynamic_linker="$host_os dld.so"
  1314. shlibpath_var=LD_LIBRARY_PATH
  1315. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1316. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1317. soname_spec='${libname}${release}${shared_ext}$major'
  1318. if test "X$HPUX_IA64_MODE" = X32; then
  1319. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1320. else
  1321. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1322. fi
  1323. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1324. ;;
  1325. hppa*64*)
  1326. shrext_cmds='.sl'
  1327. hardcode_into_libs=yes
  1328. dynamic_linker="$host_os dld.sl"
  1329. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1330. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1331. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1332. soname_spec='${libname}${release}${shared_ext}$major'
  1333. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1334. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1335. ;;
  1336. *)
  1337. shrext_cmds='.sl'
  1338. dynamic_linker="$host_os dld.sl"
  1339. shlibpath_var=SHLIB_PATH
  1340. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1341. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1342. soname_spec='${libname}${release}${shared_ext}$major'
  1343. ;;
  1344. esac
  1345. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1346. postinstall_cmds='chmod 555 $lib'
  1347. ;;
  1348. interix3*)
  1349. version_type=linux
  1350. need_lib_prefix=no
  1351. need_version=no
  1352. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1353. soname_spec='${libname}${release}${shared_ext}$major'
  1354. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  1355. shlibpath_var=LD_LIBRARY_PATH
  1356. shlibpath_overrides_runpath=no
  1357. hardcode_into_libs=yes
  1358. ;;
  1359. irix5* | irix6* | nonstopux*)
  1360. case $host_os in
  1361. nonstopux*) version_type=nonstopux ;;
  1362. *)
  1363. if test "$lt_cv_prog_gnu_ld" = yes; then
  1364. version_type=linux
  1365. else
  1366. version_type=irix
  1367. fi ;;
  1368. esac
  1369. need_lib_prefix=no
  1370. need_version=no
  1371. soname_spec='${libname}${release}${shared_ext}$major'
  1372. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1373. case $host_os in
  1374. irix5* | nonstopux*)
  1375. libsuff= shlibsuff=
  1376. ;;
  1377. *)
  1378. case $LD in # libtool.m4 will add one of these switches to LD
  1379. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1380. libsuff= shlibsuff= libmagic=32-bit;;
  1381. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1382. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1383. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1384. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1385. *) libsuff= shlibsuff= libmagic=never-match;;
  1386. esac
  1387. ;;
  1388. esac
  1389. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1390. shlibpath_overrides_runpath=no
  1391. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1392. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1393. hardcode_into_libs=yes
  1394. ;;
  1395. # No shared lib support for Linux oldld, aout, or coff.
  1396. linux*oldld* | linux*aout* | linux*coff*)
  1397. dynamic_linker=no
  1398. ;;
  1399. # This must be Linux ELF.
  1400. linux* | k*bsd*-gnu)
  1401. version_type=linux
  1402. need_lib_prefix=no
  1403. need_version=no
  1404. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1405. soname_spec='${libname}${release}${shared_ext}$major'
  1406. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1407. shlibpath_var=LD_LIBRARY_PATH
  1408. shlibpath_overrides_runpath=no
  1409. # This implies no fast_install, which is unacceptable.
  1410. # Some rework will be needed to allow for fast_install
  1411. # before this can be enabled.
  1412. hardcode_into_libs=yes
  1413. # Append ld.so.conf contents to the search path
  1414. if test -f /etc/ld.so.conf; then
  1415. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  1416. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1417. fi
  1418. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1419. # powerpc, because MkLinux only supported shared libraries with the
  1420. # GNU dynamic linker. Since this was broken with cross compilers,
  1421. # most powerpc-linux boxes support dynamic linking these days and
  1422. # people can always --disable-shared, the test was removed, and we
  1423. # assume the GNU/Linux dynamic linker is in use.
  1424. dynamic_linker='GNU/Linux ld.so'
  1425. ;;
  1426. netbsdelf*-gnu)
  1427. version_type=linux
  1428. need_lib_prefix=no
  1429. need_version=no
  1430. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1431. soname_spec='${libname}${release}${shared_ext}$major'
  1432. shlibpath_var=LD_LIBRARY_PATH
  1433. shlibpath_overrides_runpath=no
  1434. hardcode_into_libs=yes
  1435. dynamic_linker='NetBSD ld.elf_so'
  1436. ;;
  1437. netbsd*)
  1438. version_type=sunos
  1439. need_lib_prefix=no
  1440. need_version=no
  1441. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1442. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1443. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1444. dynamic_linker='NetBSD (a.out) ld.so'
  1445. else
  1446. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1447. soname_spec='${libname}${release}${shared_ext}$major'
  1448. dynamic_linker='NetBSD ld.elf_so'
  1449. fi
  1450. shlibpath_var=LD_LIBRARY_PATH
  1451. shlibpath_overrides_runpath=yes
  1452. hardcode_into_libs=yes
  1453. ;;
  1454. newsos6)
  1455. version_type=linux
  1456. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1457. shlibpath_var=LD_LIBRARY_PATH
  1458. shlibpath_overrides_runpath=yes
  1459. ;;
  1460. nto-qnx*)
  1461. version_type=linux
  1462. need_lib_prefix=no
  1463. need_version=no
  1464. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1465. soname_spec='${libname}${release}${shared_ext}$major'
  1466. shlibpath_var=LD_LIBRARY_PATH
  1467. shlibpath_overrides_runpath=yes
  1468. ;;
  1469. openbsd*)
  1470. version_type=sunos
  1471. sys_lib_dlsearch_path_spec="/usr/lib"
  1472. need_lib_prefix=no
  1473. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  1474. case $host_os in
  1475. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  1476. *) need_version=no ;;
  1477. esac
  1478. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1479. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1480. shlibpath_var=LD_LIBRARY_PATH
  1481. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1482. case $host_os in
  1483. openbsd2.[[89]] | openbsd2.[[89]].*)
  1484. shlibpath_overrides_runpath=no
  1485. ;;
  1486. *)
  1487. shlibpath_overrides_runpath=yes
  1488. ;;
  1489. esac
  1490. else
  1491. shlibpath_overrides_runpath=yes
  1492. fi
  1493. ;;
  1494. os2*)
  1495. libname_spec='$name'
  1496. shrext_cmds=".dll"
  1497. need_lib_prefix=no
  1498. library_names_spec='$libname${shared_ext} $libname.a'
  1499. dynamic_linker='OS/2 ld.exe'
  1500. shlibpath_var=LIBPATH
  1501. ;;
  1502. osf3* | osf4* | osf5*)
  1503. version_type=osf
  1504. need_lib_prefix=no
  1505. need_version=no
  1506. soname_spec='${libname}${release}${shared_ext}$major'
  1507. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1508. shlibpath_var=LD_LIBRARY_PATH
  1509. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1510. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1511. ;;
  1512. solaris*)
  1513. version_type=linux
  1514. need_lib_prefix=no
  1515. need_version=no
  1516. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1517. soname_spec='${libname}${release}${shared_ext}$major'
  1518. shlibpath_var=LD_LIBRARY_PATH
  1519. shlibpath_overrides_runpath=yes
  1520. hardcode_into_libs=yes
  1521. # ldd complains unless libraries are executable
  1522. postinstall_cmds='chmod +x $lib'
  1523. ;;
  1524. sunos4*)
  1525. version_type=sunos
  1526. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1527. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1528. shlibpath_var=LD_LIBRARY_PATH
  1529. shlibpath_overrides_runpath=yes
  1530. if test "$with_gnu_ld" = yes; then
  1531. need_lib_prefix=no
  1532. fi
  1533. need_version=yes
  1534. ;;
  1535. sysv4 | sysv4.3*)
  1536. version_type=linux
  1537. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1538. soname_spec='${libname}${release}${shared_ext}$major'
  1539. shlibpath_var=LD_LIBRARY_PATH
  1540. case $host_vendor in
  1541. sni)
  1542. shlibpath_overrides_runpath=no
  1543. need_lib_prefix=no
  1544. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1545. runpath_var=LD_RUN_PATH
  1546. ;;
  1547. siemens)
  1548. need_lib_prefix=no
  1549. ;;
  1550. motorola)
  1551. need_lib_prefix=no
  1552. need_version=no
  1553. shlibpath_overrides_runpath=no
  1554. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1555. ;;
  1556. esac
  1557. ;;
  1558. sysv4*MP*)
  1559. if test -d /usr/nec ;then
  1560. version_type=linux
  1561. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1562. soname_spec='$libname${shared_ext}.$major'
  1563. shlibpath_var=LD_LIBRARY_PATH
  1564. fi
  1565. ;;
  1566. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  1567. version_type=freebsd-elf
  1568. need_lib_prefix=no
  1569. need_version=no
  1570. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1571. soname_spec='${libname}${release}${shared_ext}$major'
  1572. shlibpath_var=LD_LIBRARY_PATH
  1573. hardcode_into_libs=yes
  1574. if test "$with_gnu_ld" = yes; then
  1575. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  1576. shlibpath_overrides_runpath=no
  1577. else
  1578. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  1579. shlibpath_overrides_runpath=yes
  1580. case $host_os in
  1581. sco3.2v5*)
  1582. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  1583. ;;
  1584. esac
  1585. fi
  1586. sys_lib_dlsearch_path_spec='/usr/lib'
  1587. ;;
  1588. uts4*)
  1589. version_type=linux
  1590. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1591. soname_spec='${libname}${release}${shared_ext}$major'
  1592. shlibpath_var=LD_LIBRARY_PATH
  1593. ;;
  1594. *)
  1595. dynamic_linker=no
  1596. ;;
  1597. esac
  1598. AC_MSG_RESULT([$dynamic_linker])
  1599. test "$dynamic_linker" = no && can_build_shared=no
  1600. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  1601. if test "$GCC" = yes; then
  1602. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  1603. fi
  1604. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1605. # _LT_AC_TAGCONFIG
  1606. # ----------------
  1607. AC_DEFUN([_LT_AC_TAGCONFIG],
  1608. [AC_ARG_WITH([tags],
  1609. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1610. [include additional configurations @<:@automatic@:>@])],
  1611. [tagnames="$withval"])
  1612. if test -f "$ltmain" && test -n "$tagnames"; then
  1613. if test ! -f "${ofile}"; then
  1614. AC_MSG_WARN([output file `$ofile' does not exist])
  1615. fi
  1616. if test -z "$LTCC"; then
  1617. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1618. if test -z "$LTCC"; then
  1619. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1620. else
  1621. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1622. fi
  1623. fi
  1624. if test -z "$LTCFLAGS"; then
  1625. eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
  1626. fi
  1627. # Extract list of available tagged configurations in $ofile.
  1628. # Note that this assumes the entire list is on one line.
  1629. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1630. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1631. for tagname in $tagnames; do
  1632. IFS="$lt_save_ifs"
  1633. # Check whether tagname contains only valid characters
  1634. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1635. "") ;;
  1636. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1637. ;;
  1638. esac
  1639. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1640. then
  1641. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1642. fi
  1643. # Update the list of available tags.
  1644. if test -n "$tagname"; then
  1645. echo appending configuration tag \"$tagname\" to $ofile
  1646. case $tagname in
  1647. CXX)
  1648. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  1649. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  1650. (test "X$CXX" != "Xg++"))) ; then
  1651. AC_LIBTOOL_LANG_CXX_CONFIG
  1652. else
  1653. tagname=""
  1654. fi
  1655. ;;
  1656. F77)
  1657. if test -n "$F77" && test "X$F77" != "Xno"; then
  1658. AC_LIBTOOL_LANG_F77_CONFIG
  1659. else
  1660. tagname=""
  1661. fi
  1662. ;;
  1663. GCJ)
  1664. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1665. AC_LIBTOOL_LANG_GCJ_CONFIG
  1666. else
  1667. tagname=""
  1668. fi
  1669. ;;
  1670. RC)
  1671. AC_LIBTOOL_LANG_RC_CONFIG
  1672. ;;
  1673. *)
  1674. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1675. ;;
  1676. esac
  1677. # Append the new tag name to the list of available tags.
  1678. if test -n "$tagname" ; then
  1679. available_tags="$available_tags $tagname"
  1680. fi
  1681. fi
  1682. done
  1683. IFS="$lt_save_ifs"
  1684. # Now substitute the updated list of available tags.
  1685. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1686. mv "${ofile}T" "$ofile"
  1687. chmod +x "$ofile"
  1688. else
  1689. rm -f "${ofile}T"
  1690. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1691. fi
  1692. fi
  1693. ])# _LT_AC_TAGCONFIG
  1694. # AC_LIBTOOL_DLOPEN
  1695. # -----------------
  1696. # enable checks for dlopen support
  1697. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1698. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1699. ])# AC_LIBTOOL_DLOPEN
  1700. # AC_LIBTOOL_WIN32_DLL
  1701. # --------------------
  1702. # declare package support for building win32 DLLs
  1703. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1704. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1705. ])# AC_LIBTOOL_WIN32_DLL
  1706. # AC_ENABLE_SHARED([DEFAULT])
  1707. # ---------------------------
  1708. # implement the --enable-shared flag
  1709. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1710. AC_DEFUN([AC_ENABLE_SHARED],
  1711. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1712. AC_ARG_ENABLE([shared],
  1713. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1714. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1715. [p=${PACKAGE-default}
  1716. case $enableval in
  1717. yes) enable_shared=yes ;;
  1718. no) enable_shared=no ;;
  1719. *)
  1720. enable_shared=no
  1721. # Look at the argument we got. We use all the common list separators.
  1722. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1723. for pkg in $enableval; do
  1724. IFS="$lt_save_ifs"
  1725. if test "X$pkg" = "X$p"; then
  1726. enable_shared=yes
  1727. fi
  1728. done
  1729. IFS="$lt_save_ifs"
  1730. ;;
  1731. esac],
  1732. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1733. ])# AC_ENABLE_SHARED
  1734. # AC_DISABLE_SHARED
  1735. # -----------------
  1736. # set the default shared flag to --disable-shared
  1737. AC_DEFUN([AC_DISABLE_SHARED],
  1738. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1739. AC_ENABLE_SHARED(no)
  1740. ])# AC_DISABLE_SHARED
  1741. # AC_ENABLE_STATIC([DEFAULT])
  1742. # ---------------------------
  1743. # implement the --enable-static flag
  1744. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1745. AC_DEFUN([AC_ENABLE_STATIC],
  1746. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1747. AC_ARG_ENABLE([static],
  1748. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1749. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1750. [p=${PACKAGE-default}
  1751. case $enableval in
  1752. yes) enable_static=yes ;;
  1753. no) enable_static=no ;;
  1754. *)
  1755. enable_static=no
  1756. # Look at the argument we got. We use all the common list separators.
  1757. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1758. for pkg in $enableval; do
  1759. IFS="$lt_save_ifs"
  1760. if test "X$pkg" = "X$p"; then
  1761. enable_static=yes
  1762. fi
  1763. done
  1764. IFS="$lt_save_ifs"
  1765. ;;
  1766. esac],
  1767. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1768. ])# AC_ENABLE_STATIC
  1769. # AC_DISABLE_STATIC
  1770. # -----------------
  1771. # set the default static flag to --disable-static
  1772. AC_DEFUN([AC_DISABLE_STATIC],
  1773. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1774. AC_ENABLE_STATIC(no)
  1775. ])# AC_DISABLE_STATIC
  1776. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1777. # ---------------------------------
  1778. # implement the --enable-fast-install flag
  1779. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1780. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1781. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1782. AC_ARG_ENABLE([fast-install],
  1783. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1784. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1785. [p=${PACKAGE-default}
  1786. case $enableval in
  1787. yes) enable_fast_install=yes ;;
  1788. no) enable_fast_install=no ;;
  1789. *)
  1790. enable_fast_install=no
  1791. # Look at the argument we got. We use all the common list separators.
  1792. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1793. for pkg in $enableval; do
  1794. IFS="$lt_save_ifs"
  1795. if test "X$pkg" = "X$p"; then
  1796. enable_fast_install=yes
  1797. fi
  1798. done
  1799. IFS="$lt_save_ifs"
  1800. ;;
  1801. esac],
  1802. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1803. ])# AC_ENABLE_FAST_INSTALL
  1804. # AC_DISABLE_FAST_INSTALL
  1805. # -----------------------
  1806. # set the default to --disable-fast-install
  1807. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1808. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1809. AC_ENABLE_FAST_INSTALL(no)
  1810. ])# AC_DISABLE_FAST_INSTALL
  1811. # AC_LIBTOOL_PICMODE([MODE])
  1812. # --------------------------
  1813. # implement the --with-pic flag
  1814. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1815. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1816. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1817. pic_mode=ifelse($#,1,$1,default)
  1818. ])# AC_LIBTOOL_PICMODE
  1819. # AC_PROG_EGREP
  1820. # -------------
  1821. # This is predefined starting with Autoconf 2.54, so this conditional
  1822. # definition can be removed once we require Autoconf 2.54 or later.
  1823. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1824. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1825. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1826. then ac_cv_prog_egrep='grep -E'
  1827. else ac_cv_prog_egrep='egrep'
  1828. fi])
  1829. EGREP=$ac_cv_prog_egrep
  1830. AC_SUBST([EGREP])
  1831. ])])
  1832. # AC_PATH_TOOL_PREFIX
  1833. # -------------------
  1834. # find a file program which can recognise shared library
  1835. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1836. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1837. AC_MSG_CHECKING([for $1])
  1838. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1839. [case $MAGIC_CMD in
  1840. [[\\/*] | ?:[\\/]*])
  1841. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1842. ;;
  1843. *)
  1844. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1845. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1846. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1847. dnl POSIX.2 word splitting is done only on the output of word expansions,
  1848. dnl not every word. This closes a longstanding sh security hole.
  1849. ac_dummy="ifelse([$2], , $PATH, [$2])"
  1850. for ac_dir in $ac_dummy; do
  1851. IFS="$lt_save_ifs"
  1852. test -z "$ac_dir" && ac_dir=.
  1853. if test -f $ac_dir/$1; then
  1854. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1855. if test -n "$file_magic_test_file"; then
  1856. case $deplibs_check_method in
  1857. "file_magic "*)
  1858. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  1859. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1860. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1861. $EGREP "$file_magic_regex" > /dev/null; then
  1862. :
  1863. else
  1864. cat <<EOF 1>&2
  1865. *** Warning: the command libtool uses to detect shared libraries,
  1866. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1867. *** The result is that libtool may fail to recognize shared libraries
  1868. *** as such. This will affect the creation of libtool libraries that
  1869. *** depend on shared libraries, but programs linked with such libtool
  1870. *** libraries will work regardless of this problem. Nevertheless, you
  1871. *** may want to report the problem to your system manager and/or to
  1872. *** bug-libtool@gnu.org
  1873. EOF
  1874. fi ;;
  1875. esac
  1876. fi
  1877. break
  1878. fi
  1879. done
  1880. IFS="$lt_save_ifs"
  1881. MAGIC_CMD="$lt_save_MAGIC_CMD"
  1882. ;;
  1883. esac])
  1884. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1885. if test -n "$MAGIC_CMD"; then
  1886. AC_MSG_RESULT($MAGIC_CMD)
  1887. else
  1888. AC_MSG_RESULT(no)
  1889. fi
  1890. ])# AC_PATH_TOOL_PREFIX
  1891. # AC_PATH_MAGIC
  1892. # -------------
  1893. # find a file program which can recognise a shared library
  1894. AC_DEFUN([AC_PATH_MAGIC],
  1895. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  1896. if test -z "$lt_cv_path_MAGIC_CMD"; then
  1897. if test -n "$ac_tool_prefix"; then
  1898. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  1899. else
  1900. MAGIC_CMD=:
  1901. fi
  1902. fi
  1903. ])# AC_PATH_MAGIC
  1904. # AC_PROG_LD
  1905. # ----------
  1906. # find the pathname to the GNU or non-GNU linker
  1907. AC_DEFUN([AC_PROG_LD],
  1908. [AC_ARG_WITH([gnu-ld],
  1909. [AC_HELP_STRING([--with-gnu-ld],
  1910. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  1911. [test "$withval" = no || with_gnu_ld=yes],
  1912. [with_gnu_ld=no])
  1913. AC_REQUIRE([LT_AC_PROG_SED])dnl
  1914. AC_REQUIRE([AC_PROG_CC])dnl
  1915. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1916. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1917. ac_prog=ld
  1918. if test "$GCC" = yes; then
  1919. # Check if gcc -print-prog-name=ld gives a path.
  1920. AC_MSG_CHECKING([for ld used by $CC])
  1921. case $host in
  1922. *-*-mingw*)
  1923. # gcc leaves a trailing carriage return which upsets mingw
  1924. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  1925. *)
  1926. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  1927. esac
  1928. case $ac_prog in
  1929. # Accept absolute paths.
  1930. [[\\/]]* | ?:[[\\/]]*)
  1931. re_direlt='/[[^/]][[^/]]*/\.\./'
  1932. # Canonicalize the pathname of ld
  1933. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  1934. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  1935. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  1936. done
  1937. test -z "$LD" && LD="$ac_prog"
  1938. ;;
  1939. "")
  1940. # If it fails, then pretend we aren't using GCC.
  1941. ac_prog=ld
  1942. ;;
  1943. *)
  1944. # If it is relative, then search for the first ld in PATH.
  1945. with_gnu_ld=unknown
  1946. ;;
  1947. esac
  1948. elif test "$with_gnu_ld" = yes; then
  1949. AC_MSG_CHECKING([for GNU ld])
  1950. else
  1951. AC_MSG_CHECKING([for non-GNU ld])
  1952. fi
  1953. AC_CACHE_VAL(lt_cv_path_LD,
  1954. [if test -z "$LD"; then
  1955. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1956. for ac_dir in $PATH; do
  1957. IFS="$lt_save_ifs"
  1958. test -z "$ac_dir" && ac_dir=.
  1959. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  1960. lt_cv_path_LD="$ac_dir/$ac_prog"
  1961. # Check to see if the program is GNU ld. I'd rather use --version,
  1962. # but apparently some variants of GNU ld only accept -v.
  1963. # Break only if it was the GNU/non-GNU ld that we prefer.
  1964. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  1965. *GNU* | *'with BFD'*)
  1966. test "$with_gnu_ld" != no && break
  1967. ;;
  1968. *)
  1969. test "$with_gnu_ld" != yes && break
  1970. ;;
  1971. esac
  1972. fi
  1973. done
  1974. IFS="$lt_save_ifs"
  1975. else
  1976. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  1977. fi])
  1978. LD="$lt_cv_path_LD"
  1979. if test -n "$LD"; then
  1980. AC_MSG_RESULT($LD)
  1981. else
  1982. AC_MSG_RESULT(no)
  1983. fi
  1984. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  1985. AC_PROG_LD_GNU
  1986. ])# AC_PROG_LD
  1987. # AC_PROG_LD_GNU
  1988. # --------------
  1989. AC_DEFUN([AC_PROG_LD_GNU],
  1990. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1991. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  1992. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  1993. case `$LD -v 2>&1 </dev/null` in
  1994. *GNU* | *'with BFD'*)
  1995. lt_cv_prog_gnu_ld=yes
  1996. ;;
  1997. *)
  1998. lt_cv_prog_gnu_ld=no
  1999. ;;
  2000. esac])
  2001. with_gnu_ld=$lt_cv_prog_gnu_ld
  2002. ])# AC_PROG_LD_GNU
  2003. # AC_PROG_LD_RELOAD_FLAG
  2004. # ----------------------
  2005. # find reload flag for linker
  2006. # -- PORTME Some linkers may need a different reload flag.
  2007. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  2008. [AC_CACHE_CHECK([for $LD option to reload object files],
  2009. lt_cv_ld_reload_flag,
  2010. [lt_cv_ld_reload_flag='-r'])
  2011. reload_flag=$lt_cv_ld_reload_flag
  2012. case $reload_flag in
  2013. "" | " "*) ;;
  2014. *) reload_flag=" $reload_flag" ;;
  2015. esac
  2016. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2017. case $host_os in
  2018. darwin*)
  2019. if test "$GCC" = yes; then
  2020. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2021. else
  2022. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2023. fi
  2024. ;;
  2025. esac
  2026. ])# AC_PROG_LD_RELOAD_FLAG
  2027. # AC_DEPLIBS_CHECK_METHOD
  2028. # -----------------------
  2029. # how to check for library dependencies
  2030. # -- PORTME fill in with the dynamic library characteristics
  2031. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  2032. [AC_CACHE_CHECK([how to recognise dependent libraries],
  2033. lt_cv_deplibs_check_method,
  2034. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2035. lt_cv_file_magic_test_file=
  2036. lt_cv_deplibs_check_method='unknown'
  2037. # Need to set the preceding variable on all platforms that support
  2038. # interlibrary dependencies.
  2039. # 'none' -- dependencies not supported.
  2040. # `unknown' -- same as none, but documents that we really don't know.
  2041. # 'pass_all' -- all dependencies passed with no checks.
  2042. # 'test_compile' -- check by making test program.
  2043. # 'file_magic [[regex]]' -- check by looking for files in library path
  2044. # which responds to the $file_magic_cmd with a given extended regex.
  2045. # If you have `file' or equivalent on your system and you're not sure
  2046. # whether `pass_all' will *always* work, you probably want this one.
  2047. case $host_os in
  2048. aix4* | aix5*)
  2049. lt_cv_deplibs_check_method=pass_all
  2050. ;;
  2051. beos*)
  2052. lt_cv_deplibs_check_method=pass_all
  2053. ;;
  2054. bsdi[[45]]*)
  2055. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2056. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2057. lt_cv_file_magic_test_file=/shlib/libc.so
  2058. ;;
  2059. cygwin*)
  2060. # func_win32_libid is a shell function defined in ltmain.sh
  2061. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2062. lt_cv_file_magic_cmd='func_win32_libid'
  2063. ;;
  2064. mingw* | pw32*)
  2065. # Base MSYS/MinGW do not provide the 'file' command needed by
  2066. # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  2067. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2068. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2069. ;;
  2070. darwin* | rhapsody*)
  2071. lt_cv_deplibs_check_method=pass_all
  2072. ;;
  2073. freebsd* | dragonfly*)
  2074. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2075. case $host_cpu in
  2076. i*86 )
  2077. # Not sure whether the presence of OpenBSD here was a mistake.
  2078. # Let's accept both of them until this is cleared up.
  2079. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2080. lt_cv_file_magic_cmd=/usr/bin/file
  2081. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2082. ;;
  2083. esac
  2084. else
  2085. lt_cv_deplibs_check_method=pass_all
  2086. fi
  2087. ;;
  2088. gnu*)
  2089. lt_cv_deplibs_check_method=pass_all
  2090. ;;
  2091. hpux10.20* | hpux11*)
  2092. lt_cv_file_magic_cmd=/usr/bin/file
  2093. case $host_cpu in
  2094. ia64*)
  2095. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2096. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2097. ;;
  2098. hppa*64*)
  2099. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  2100. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2101. ;;
  2102. *)
  2103. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2104. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2105. ;;
  2106. esac
  2107. ;;
  2108. interix3*)
  2109. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2110. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2111. ;;
  2112. irix5* | irix6* | nonstopux*)
  2113. case $LD in
  2114. *-32|*"-32 ") libmagic=32-bit;;
  2115. *-n32|*"-n32 ") libmagic=N32;;
  2116. *-64|*"-64 ") libmagic=64-bit;;
  2117. *) libmagic=never-match;;
  2118. esac
  2119. lt_cv_deplibs_check_method=pass_all
  2120. ;;
  2121. # This must be Linux ELF.
  2122. linux* | k*bsd*-gnu)
  2123. lt_cv_deplibs_check_method=pass_all
  2124. ;;
  2125. netbsd* | netbsdelf*-gnu)
  2126. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2127. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2128. else
  2129. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2130. fi
  2131. ;;
  2132. newos6*)
  2133. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2134. lt_cv_file_magic_cmd=/usr/bin/file
  2135. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2136. ;;
  2137. nto-qnx*)
  2138. lt_cv_deplibs_check_method=unknown
  2139. ;;
  2140. openbsd*)
  2141. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2142. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2143. else
  2144. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2145. fi
  2146. ;;
  2147. osf3* | osf4* | osf5*)
  2148. lt_cv_deplibs_check_method=pass_all
  2149. ;;
  2150. solaris*)
  2151. lt_cv_deplibs_check_method=pass_all
  2152. ;;
  2153. sysv4 | sysv4.3*)
  2154. case $host_vendor in
  2155. motorola)
  2156. 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]]'
  2157. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2158. ;;
  2159. ncr)
  2160. lt_cv_deplibs_check_method=pass_all
  2161. ;;
  2162. sequent)
  2163. lt_cv_file_magic_cmd='/bin/file'
  2164. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2165. ;;
  2166. sni)
  2167. lt_cv_file_magic_cmd='/bin/file'
  2168. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2169. lt_cv_file_magic_test_file=/lib/libc.so
  2170. ;;
  2171. siemens)
  2172. lt_cv_deplibs_check_method=pass_all
  2173. ;;
  2174. pc)
  2175. lt_cv_deplibs_check_method=pass_all
  2176. ;;
  2177. esac
  2178. ;;
  2179. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2180. lt_cv_deplibs_check_method=pass_all
  2181. ;;
  2182. esac
  2183. ])
  2184. file_magic_cmd=$lt_cv_file_magic_cmd
  2185. deplibs_check_method=$lt_cv_deplibs_check_method
  2186. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2187. ])# AC_DEPLIBS_CHECK_METHOD
  2188. # AC_PROG_NM
  2189. # ----------
  2190. # find the pathname to a BSD-compatible name lister
  2191. AC_DEFUN([AC_PROG_NM],
  2192. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2193. [if test -n "$NM"; then
  2194. # Let the user override the test.
  2195. lt_cv_path_NM="$NM"
  2196. else
  2197. lt_nm_to_check="${ac_tool_prefix}nm"
  2198. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  2199. lt_nm_to_check="$lt_nm_to_check nm"
  2200. fi
  2201. for lt_tmp_nm in $lt_nm_to_check; do
  2202. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2203. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  2204. IFS="$lt_save_ifs"
  2205. test -z "$ac_dir" && ac_dir=.
  2206. tmp_nm="$ac_dir/$lt_tmp_nm"
  2207. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2208. # Check to see if the nm accepts a BSD-compat flag.
  2209. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2210. # nm: unknown option "B" ignored
  2211. # Tru64's nm complains that /dev/null is an invalid object file
  2212. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2213. */dev/null* | *'Invalid file or object type'*)
  2214. lt_cv_path_NM="$tmp_nm -B"
  2215. break
  2216. ;;
  2217. *)
  2218. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2219. */dev/null*)
  2220. lt_cv_path_NM="$tmp_nm -p"
  2221. break
  2222. ;;
  2223. *)
  2224. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2225. continue # so that we can try to find one that supports BSD flags
  2226. ;;
  2227. esac
  2228. ;;
  2229. esac
  2230. fi
  2231. done
  2232. IFS="$lt_save_ifs"
  2233. done
  2234. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2235. fi])
  2236. NM="$lt_cv_path_NM"
  2237. ])# AC_PROG_NM
  2238. # AC_CHECK_LIBM
  2239. # -------------
  2240. # check for math library
  2241. AC_DEFUN([AC_CHECK_LIBM],
  2242. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2243. LIBM=
  2244. case $host in
  2245. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2246. # These system don't have libm, or don't need it
  2247. ;;
  2248. *-ncr-sysv4.3*)
  2249. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2250. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2251. ;;
  2252. *)
  2253. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2254. ;;
  2255. esac
  2256. ])# AC_CHECK_LIBM
  2257. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2258. # -----------------------------------
  2259. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2260. # LTDLINCL to the include flags for the libltdl header and adds
  2261. # --enable-ltdl-convenience to the configure arguments. Note that
  2262. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  2263. # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
  2264. # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
  2265. # (note the single quotes!). If your package is not flat and you're not
  2266. # using automake, define top_builddir and top_srcdir appropriately in
  2267. # the Makefiles.
  2268. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2269. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2270. case $enable_ltdl_convenience in
  2271. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2272. "") enable_ltdl_convenience=yes
  2273. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2274. esac
  2275. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2276. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2277. # For backwards non-gettext consistent compatibility...
  2278. INCLTDL="$LTDLINCL"
  2279. ])# AC_LIBLTDL_CONVENIENCE
  2280. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2281. # -----------------------------------
  2282. # sets LIBLTDL to the link flags for the libltdl installable library and
  2283. # LTDLINCL to the include flags for the libltdl header and adds
  2284. # --enable-ltdl-install to the configure arguments. Note that
  2285. # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
  2286. # and an installed libltdl is not found, it is assumed to be `libltdl'.
  2287. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
  2288. # '${top_srcdir}/' (note the single quotes!). If your package is not
  2289. # flat and you're not using automake, define top_builddir and top_srcdir
  2290. # appropriately in the Makefiles.
  2291. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2292. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2293. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2294. AC_CHECK_LIB(ltdl, lt_dlinit,
  2295. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2296. [if test x"$enable_ltdl_install" = xno; then
  2297. AC_MSG_WARN([libltdl not installed, but installation disabled])
  2298. else
  2299. enable_ltdl_install=yes
  2300. fi
  2301. ])
  2302. if test x"$enable_ltdl_install" = x"yes"; then
  2303. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2304. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2305. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2306. else
  2307. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2308. LIBLTDL="-lltdl"
  2309. LTDLINCL=
  2310. fi
  2311. # For backwards non-gettext consistent compatibility...
  2312. INCLTDL="$LTDLINCL"
  2313. ])# AC_LIBLTDL_INSTALLABLE
  2314. # AC_LIBTOOL_CXX
  2315. # --------------
  2316. # enable support for C++ libraries
  2317. AC_DEFUN([AC_LIBTOOL_CXX],
  2318. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2319. ])# AC_LIBTOOL_CXX
  2320. # _LT_AC_LANG_CXX
  2321. # ---------------
  2322. AC_DEFUN([_LT_AC_LANG_CXX],
  2323. [AC_REQUIRE([AC_PROG_CXX])
  2324. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2325. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2326. ])# _LT_AC_LANG_CXX
  2327. # _LT_AC_PROG_CXXCPP
  2328. # ------------------
  2329. AC_DEFUN([_LT_AC_PROG_CXXCPP],
  2330. [
  2331. AC_REQUIRE([AC_PROG_CXX])
  2332. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  2333. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  2334. (test "X$CXX" != "Xg++"))) ; then
  2335. AC_PROG_CXXCPP
  2336. fi
  2337. ])# _LT_AC_PROG_CXXCPP
  2338. # AC_LIBTOOL_F77
  2339. # --------------
  2340. # enable support for Fortran 77 libraries
  2341. AC_DEFUN([AC_LIBTOOL_F77],
  2342. [AC_REQUIRE([_LT_AC_LANG_F77])
  2343. ])# AC_LIBTOOL_F77
  2344. # _LT_AC_LANG_F77
  2345. # ---------------
  2346. AC_DEFUN([_LT_AC_LANG_F77],
  2347. [AC_REQUIRE([AC_PROG_F77])
  2348. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  2349. ])# _LT_AC_LANG_F77
  2350. # AC_LIBTOOL_GCJ
  2351. # --------------
  2352. # enable support for GCJ libraries
  2353. AC_DEFUN([AC_LIBTOOL_GCJ],
  2354. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  2355. ])# AC_LIBTOOL_GCJ
  2356. # _LT_AC_LANG_GCJ
  2357. # ---------------
  2358. AC_DEFUN([_LT_AC_LANG_GCJ],
  2359. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  2360. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  2361. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  2362. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  2363. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2364. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2365. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2366. ])# _LT_AC_LANG_GCJ
  2367. # AC_LIBTOOL_RC
  2368. # -------------
  2369. # enable support for Windows resource files
  2370. AC_DEFUN([AC_LIBTOOL_RC],
  2371. [AC_REQUIRE([LT_AC_PROG_RC])
  2372. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2373. ])# AC_LIBTOOL_RC
  2374. # AC_LIBTOOL_LANG_C_CONFIG
  2375. # ------------------------
  2376. # Ensure that the configuration vars for the C compiler are
  2377. # suitably defined. Those variables are subsequently used by
  2378. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2379. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  2380. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  2381. [lt_save_CC="$CC"
  2382. AC_LANG_PUSH(C)
  2383. # Source file extension for C test sources.
  2384. ac_ext=c
  2385. # Object file extension for compiled C test sources.
  2386. objext=o
  2387. _LT_AC_TAGVAR(objext, $1)=$objext
  2388. # Code to be used in simple compile tests
  2389. lt_simple_compile_test_code="int some_variable = 0;\n"
  2390. # Code to be used in simple link tests
  2391. lt_simple_link_test_code='int main(){return(0);}\n'
  2392. _LT_AC_SYS_COMPILER
  2393. # save warnings/boilerplate of simple test code
  2394. _LT_COMPILER_BOILERPLATE
  2395. _LT_LINKER_BOILERPLATE
  2396. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2397. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2398. AC_LIBTOOL_PROG_CC_C_O($1)
  2399. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2400. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2401. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2402. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2403. AC_LIBTOOL_SYS_LIB_STRIP
  2404. AC_LIBTOOL_DLOPEN_SELF
  2405. # Report which library types will actually be built
  2406. AC_MSG_CHECKING([if libtool supports shared libraries])
  2407. AC_MSG_RESULT([$can_build_shared])
  2408. AC_MSG_CHECKING([whether to build shared libraries])
  2409. test "$can_build_shared" = "no" && enable_shared=no
  2410. # On AIX, shared libraries and static libraries use the same namespace, and
  2411. # are all built from PIC.
  2412. case $host_os in
  2413. aix3*)
  2414. test "$enable_shared" = yes && enable_static=no
  2415. if test -n "$RANLIB"; then
  2416. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2417. postinstall_cmds='$RANLIB $lib'
  2418. fi
  2419. ;;
  2420. aix4* | aix5*)
  2421. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2422. test "$enable_shared" = yes && enable_static=no
  2423. fi
  2424. ;;
  2425. esac
  2426. AC_MSG_RESULT([$enable_shared])
  2427. AC_MSG_CHECKING([whether to build static libraries])
  2428. # Make sure either enable_shared or enable_static is yes.
  2429. test "$enable_shared" = yes || enable_static=yes
  2430. AC_MSG_RESULT([$enable_static])
  2431. AC_LIBTOOL_CONFIG($1)
  2432. AC_LANG_POP
  2433. CC="$lt_save_CC"
  2434. ])# AC_LIBTOOL_LANG_C_CONFIG
  2435. # AC_LIBTOOL_LANG_CXX_CONFIG
  2436. # --------------------------
  2437. # Ensure that the configuration vars for the C compiler are
  2438. # suitably defined. Those variables are subsequently used by
  2439. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2440. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2441. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2442. [AC_LANG_PUSH(C++)
  2443. AC_REQUIRE([AC_PROG_CXX])
  2444. AC_REQUIRE([_LT_AC_PROG_CXXCPP])
  2445. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2446. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2447. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2448. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2449. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2450. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2451. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2452. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2453. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2454. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2455. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2456. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2457. _LT_AC_TAGVAR(module_cmds, $1)=
  2458. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2459. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2460. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2461. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2462. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2463. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  2464. # Dependencies to place before and after the object being linked:
  2465. _LT_AC_TAGVAR(predep_objects, $1)=
  2466. _LT_AC_TAGVAR(postdep_objects, $1)=
  2467. _LT_AC_TAGVAR(predeps, $1)=
  2468. _LT_AC_TAGVAR(postdeps, $1)=
  2469. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2470. # Source file extension for C++ test sources.
  2471. ac_ext=cpp
  2472. # Object file extension for compiled C++ test sources.
  2473. objext=o
  2474. _LT_AC_TAGVAR(objext, $1)=$objext
  2475. # Code to be used in simple compile tests
  2476. lt_simple_compile_test_code="int some_variable = 0;\n"
  2477. # Code to be used in simple link tests
  2478. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
  2479. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2480. _LT_AC_SYS_COMPILER
  2481. # save warnings/boilerplate of simple test code
  2482. _LT_COMPILER_BOILERPLATE
  2483. _LT_LINKER_BOILERPLATE
  2484. # Allow CC to be a program name with arguments.
  2485. lt_save_CC=$CC
  2486. lt_save_LD=$LD
  2487. lt_save_GCC=$GCC
  2488. GCC=$GXX
  2489. lt_save_with_gnu_ld=$with_gnu_ld
  2490. lt_save_path_LD=$lt_cv_path_LD
  2491. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2492. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2493. else
  2494. $as_unset lt_cv_prog_gnu_ld
  2495. fi
  2496. if test -n "${lt_cv_path_LDCXX+set}"; then
  2497. lt_cv_path_LD=$lt_cv_path_LDCXX
  2498. else
  2499. $as_unset lt_cv_path_LD
  2500. fi
  2501. test -z "${LDCXX+set}" || LD=$LDCXX
  2502. CC=${CXX-"c++"}
  2503. compiler=$CC
  2504. _LT_AC_TAGVAR(compiler, $1)=$CC
  2505. _LT_CC_BASENAME([$compiler])
  2506. # We don't want -fno-exception wen compiling C++ code, so set the
  2507. # no_builtin_flag separately
  2508. if test "$GXX" = yes; then
  2509. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2510. else
  2511. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2512. fi
  2513. if test "$GXX" = yes; then
  2514. # Set up default GNU C++ configuration
  2515. AC_PROG_LD
  2516. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  2517. # archiving commands below assume that GNU ld is being used.
  2518. if test "$with_gnu_ld" = yes; then
  2519. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2520. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2521. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2522. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2523. # If archive_cmds runs LD, not CC, wlarc should be empty
  2524. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  2525. # investigate it a little bit more. (MM)
  2526. wlarc='${wl}'
  2527. # ancient GNU ld didn't support --whole-archive et. al.
  2528. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  2529. grep 'no-whole-archive' > /dev/null; then
  2530. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2531. else
  2532. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2533. fi
  2534. else
  2535. with_gnu_ld=no
  2536. wlarc=
  2537. # A generic and very simple default shared library creation
  2538. # command for GNU C++ for the case where it uses the native
  2539. # linker, instead of GNU ld. If possible, this setting should
  2540. # overridden to take advantage of the native linker features on
  2541. # the platform it is being used on.
  2542. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2543. fi
  2544. # Commands to make compiler produce verbose output that lists
  2545. # what "hidden" libraries, object files and flags are used when
  2546. # linking a shared library.
  2547. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2548. else
  2549. GXX=no
  2550. with_gnu_ld=no
  2551. wlarc=
  2552. fi
  2553. # PORTME: fill in a description of your system's C++ link characteristics
  2554. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  2555. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2556. case $host_os in
  2557. aix3*)
  2558. # FIXME: insert proper C++ library support
  2559. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2560. ;;
  2561. aix4* | aix5*)
  2562. if test "$host_cpu" = ia64; then
  2563. # On IA64, the linker does run time linking by default, so we don't
  2564. # have to do anything special.
  2565. aix_use_runtimelinking=no
  2566. exp_sym_flag='-Bexport'
  2567. no_entry_flag=""
  2568. else
  2569. aix_use_runtimelinking=no
  2570. # Test if we are trying to use run time linking or normal
  2571. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2572. # need to do runtime linking.
  2573. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  2574. for ld_flag in $LDFLAGS; do
  2575. case $ld_flag in
  2576. *-brtl*)
  2577. aix_use_runtimelinking=yes
  2578. break
  2579. ;;
  2580. esac
  2581. done
  2582. ;;
  2583. esac
  2584. exp_sym_flag='-bexport'
  2585. no_entry_flag='-bnoentry'
  2586. fi
  2587. # When large executables or shared objects are built, AIX ld can
  2588. # have problems creating the table of contents. If linking a library
  2589. # or program results in "error TOC overflow" add -mminimal-toc to
  2590. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2591. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2592. _LT_AC_TAGVAR(archive_cmds, $1)=''
  2593. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2594. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2595. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2596. if test "$GXX" = yes; then
  2597. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2598. # We only want to do this on AIX 4.2 and lower, the check
  2599. # below for broken collect2 doesn't work under 4.3+
  2600. collect2name=`${CC} -print-prog-name=collect2`
  2601. if test -f "$collect2name" && \
  2602. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2603. then
  2604. # We have reworked collect2
  2605. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2606. else
  2607. # We have old collect2
  2608. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2609. # It fails to find uninstalled libraries when the uninstalled
  2610. # path is not listed in the libpath. Setting hardcode_minus_L
  2611. # to unsupported forces relinking
  2612. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2613. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2614. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2615. fi
  2616. ;;
  2617. esac
  2618. shared_flag='-shared'
  2619. if test "$aix_use_runtimelinking" = yes; then
  2620. shared_flag="$shared_flag "'${wl}-G'
  2621. fi
  2622. else
  2623. # not using gcc
  2624. if test "$host_cpu" = ia64; then
  2625. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2626. # chokes on -Wl,-G. The following line is correct:
  2627. shared_flag='-G'
  2628. else
  2629. if test "$aix_use_runtimelinking" = yes; then
  2630. shared_flag='${wl}-G'
  2631. else
  2632. shared_flag='${wl}-bM:SRE'
  2633. fi
  2634. fi
  2635. fi
  2636. # It seems that -bexpall does not export symbols beginning with
  2637. # underscore (_), so it is better to generate a list of symbols to export.
  2638. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2639. if test "$aix_use_runtimelinking" = yes; then
  2640. # Warning - without using the other runtime loading flags (-brtl),
  2641. # -berok will link without error, but may produce a broken library.
  2642. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2643. # Determine the default libpath from the value encoded in an empty executable.
  2644. _LT_AC_SYS_LIBPATH_AIX
  2645. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2646. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2647. else
  2648. if test "$host_cpu" = ia64; then
  2649. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2650. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2651. _LT_AC_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"
  2652. else
  2653. # Determine the default libpath from the value encoded in an empty executable.
  2654. _LT_AC_SYS_LIBPATH_AIX
  2655. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2656. # Warning - without using the other run time loading flags,
  2657. # -berok will link without error, but may produce a broken library.
  2658. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2659. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2660. # Exported symbols can be pulled into shared objects from archives
  2661. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  2662. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2663. # This is similar to how AIX traditionally builds its shared libraries.
  2664. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2665. fi
  2666. fi
  2667. ;;
  2668. beos*)
  2669. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  2670. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2671. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  2672. # support --undefined. This deserves some investigation. FIXME
  2673. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2674. else
  2675. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2676. fi
  2677. ;;
  2678. chorus*)
  2679. case $cc_basename in
  2680. *)
  2681. # FIXME: insert proper C++ library support
  2682. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2683. ;;
  2684. esac
  2685. ;;
  2686. cygwin* | mingw* | pw32*)
  2687. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  2688. # as there is no search path for DLLs.
  2689. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2690. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2691. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2692. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2693. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2694. _LT_AC_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'
  2695. # If the export-symbols file already is a .def file (1st line
  2696. # is EXPORTS), use it as is; otherwise, prepend...
  2697. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2698. cp $export_symbols $output_objdir/$soname.def;
  2699. else
  2700. echo EXPORTS > $output_objdir/$soname.def;
  2701. cat $export_symbols >> $output_objdir/$soname.def;
  2702. fi~
  2703. $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'
  2704. else
  2705. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2706. fi
  2707. ;;
  2708. darwin* | rhapsody*)
  2709. case $host_os in
  2710. rhapsody* | darwin1.[[012]])
  2711. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  2712. ;;
  2713. *) # Darwin 1.3 on
  2714. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2715. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2716. else
  2717. case ${MACOSX_DEPLOYMENT_TARGET} in
  2718. 10.[[012]])
  2719. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  2720. ;;
  2721. 10.*)
  2722. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  2723. ;;
  2724. esac
  2725. fi
  2726. ;;
  2727. esac
  2728. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2729. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2730. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2731. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2732. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  2733. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2734. if test "$GXX" = yes ; then
  2735. lt_int_apple_cc_single_mod=no
  2736. output_verbose_link_cmd='echo'
  2737. if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
  2738. lt_int_apple_cc_single_mod=yes
  2739. fi
  2740. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2741. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2742. else
  2743. _LT_AC_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'
  2744. fi
  2745. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2746. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  2747. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2748. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2749. else
  2750. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2751. fi
  2752. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2753. else
  2754. case $cc_basename in
  2755. xlc*)
  2756. output_verbose_link_cmd='echo'
  2757. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  2758. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2759. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  2760. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2761. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2762. ;;
  2763. *)
  2764. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2765. ;;
  2766. esac
  2767. fi
  2768. ;;
  2769. dgux*)
  2770. case $cc_basename in
  2771. ec++*)
  2772. # FIXME: insert proper C++ library support
  2773. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2774. ;;
  2775. ghcx*)
  2776. # Green Hills C++ Compiler
  2777. # FIXME: insert proper C++ library support
  2778. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2779. ;;
  2780. *)
  2781. # FIXME: insert proper C++ library support
  2782. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2783. ;;
  2784. esac
  2785. ;;
  2786. freebsd[[12]]*)
  2787. # C++ shared libraries reported to be fairly broken before switch to ELF
  2788. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2789. ;;
  2790. freebsd-elf*)
  2791. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2792. ;;
  2793. freebsd* | dragonfly*)
  2794. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2795. # conventions
  2796. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2797. ;;
  2798. gnu*)
  2799. ;;
  2800. hpux9*)
  2801. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2802. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2803. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2804. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2805. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2806. # but as the default
  2807. # location of the library.
  2808. case $cc_basename in
  2809. CC*)
  2810. # FIXME: insert proper C++ library support
  2811. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2812. ;;
  2813. aCC*)
  2814. _LT_AC_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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2815. # Commands to make compiler produce verbose output that lists
  2816. # what "hidden" libraries, object files and flags are used when
  2817. # linking a shared library.
  2818. #
  2819. # There doesn't appear to be a way to prevent this compiler from
  2820. # explicitly linking system object files so we need to strip them
  2821. # from the output so that they don't get included in the library
  2822. # dependencies.
  2823. 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; echo $list'
  2824. ;;
  2825. *)
  2826. if test "$GXX" = yes; then
  2827. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2828. else
  2829. # FIXME: insert proper C++ library support
  2830. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2831. fi
  2832. ;;
  2833. esac
  2834. ;;
  2835. hpux10*|hpux11*)
  2836. if test $with_gnu_ld = no; then
  2837. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2838. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2839. case $host_cpu in
  2840. hppa*64*|ia64*)
  2841. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2842. ;;
  2843. *)
  2844. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2845. ;;
  2846. esac
  2847. fi
  2848. case $host_cpu in
  2849. hppa*64*|ia64*)
  2850. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2851. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2852. ;;
  2853. *)
  2854. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2855. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2856. # but as the default
  2857. # location of the library.
  2858. ;;
  2859. esac
  2860. case $cc_basename in
  2861. CC*)
  2862. # FIXME: insert proper C++ library support
  2863. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2864. ;;
  2865. aCC*)
  2866. case $host_cpu in
  2867. hppa*64*)
  2868. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2869. ;;
  2870. ia64*)
  2871. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2872. ;;
  2873. *)
  2874. _LT_AC_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'
  2875. ;;
  2876. esac
  2877. # Commands to make compiler produce verbose output that lists
  2878. # what "hidden" libraries, object files and flags are used when
  2879. # linking a shared library.
  2880. #
  2881. # There doesn't appear to be a way to prevent this compiler from
  2882. # explicitly linking system object files so we need to strip them
  2883. # from the output so that they don't get included in the library
  2884. # dependencies.
  2885. 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; echo $list'
  2886. ;;
  2887. *)
  2888. if test "$GXX" = yes; then
  2889. if test $with_gnu_ld = no; then
  2890. case $host_cpu in
  2891. hppa*64*)
  2892. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2893. ;;
  2894. ia64*)
  2895. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2896. ;;
  2897. *)
  2898. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2899. ;;
  2900. esac
  2901. fi
  2902. else
  2903. # FIXME: insert proper C++ library support
  2904. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2905. fi
  2906. ;;
  2907. esac
  2908. ;;
  2909. interix3*)
  2910. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2911. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2912. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2913. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2914. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  2915. # Instead, shared libraries are loaded at an image base (0x10000000 by
  2916. # default) and relocated if they conflict, which is a slow very memory
  2917. # consuming and fragmenting process. To avoid this, we pick a random,
  2918. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  2919. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  2920. _LT_AC_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'
  2921. _LT_AC_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'
  2922. ;;
  2923. irix5* | irix6*)
  2924. case $cc_basename in
  2925. CC*)
  2926. # SGI C++
  2927. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  2928. # Archives containing C++ object files must be created using
  2929. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  2930. # necessary to make sure instantiated templates are included
  2931. # in the archive.
  2932. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  2933. ;;
  2934. *)
  2935. if test "$GXX" = yes; then
  2936. if test "$with_gnu_ld" = no; then
  2937. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2938. else
  2939. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  2940. fi
  2941. fi
  2942. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2943. ;;
  2944. esac
  2945. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2946. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2947. ;;
  2948. linux* | k*bsd*-gnu)
  2949. case $cc_basename in
  2950. KCC*)
  2951. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2952. # KCC will only create a shared library if the output file
  2953. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2954. # to its proper name (with version) after linking.
  2955. _LT_AC_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'
  2956. _LT_AC_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'
  2957. # Commands to make compiler produce verbose output that lists
  2958. # what "hidden" libraries, object files and flags are used when
  2959. # linking a shared library.
  2960. #
  2961. # There doesn't appear to be a way to prevent this compiler from
  2962. # explicitly linking system object files so we need to strip them
  2963. # from the output so that they don't get included in the library
  2964. # dependencies.
  2965. 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; echo $list'
  2966. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  2967. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2968. # Archives containing C++ object files must be created using
  2969. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  2970. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  2971. ;;
  2972. icpc*)
  2973. # Intel C++
  2974. with_gnu_ld=yes
  2975. # version 8.0 and above of icpc choke on multiply defined symbols
  2976. # if we add $predep_objects and $postdep_objects, however 7.1 and
  2977. # earlier do not add the objects themselves.
  2978. case `$CC -V 2>&1` in
  2979. *"Version 7."*)
  2980. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2981. _LT_AC_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'
  2982. ;;
  2983. *) # Version 8.0 or newer
  2984. tmp_idyn=
  2985. case $host_cpu in
  2986. ia64*) tmp_idyn=' -i_dynamic';;
  2987. esac
  2988. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2989. _LT_AC_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'
  2990. ;;
  2991. esac
  2992. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2993. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2994. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2995. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  2996. ;;
  2997. pgCC*)
  2998. # Portland Group C++ compiler
  2999. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  3000. _LT_AC_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'
  3001. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  3002. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3003. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  3004. ;;
  3005. cxx*)
  3006. # Compaq C++
  3007. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3008. _LT_AC_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'
  3009. runpath_var=LD_RUN_PATH
  3010. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3011. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3012. # Commands to make compiler produce verbose output that lists
  3013. # what "hidden" libraries, object files and flags are used when
  3014. # linking a shared library.
  3015. #
  3016. # There doesn't appear to be a way to prevent this compiler from
  3017. # explicitly linking system object files so we need to strip them
  3018. # from the output so that they don't get included in the library
  3019. # dependencies.
  3020. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
  3021. ;;
  3022. esac
  3023. ;;
  3024. lynxos*)
  3025. # FIXME: insert proper C++ library support
  3026. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3027. ;;
  3028. m88k*)
  3029. # FIXME: insert proper C++ library support
  3030. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3031. ;;
  3032. mvs*)
  3033. case $cc_basename in
  3034. cxx*)
  3035. # FIXME: insert proper C++ library support
  3036. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3037. ;;
  3038. *)
  3039. # FIXME: insert proper C++ library support
  3040. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3041. ;;
  3042. esac
  3043. ;;
  3044. netbsd* | netbsdelf*-gnu)
  3045. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  3046. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  3047. wlarc=
  3048. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3049. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3050. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3051. fi
  3052. # Workaround some broken pre-1.5 toolchains
  3053. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  3054. ;;
  3055. openbsd2*)
  3056. # C++ shared libraries are fairly broken
  3057. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3058. ;;
  3059. openbsd*)
  3060. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3061. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3062. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  3063. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3064. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3065. _LT_AC_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'
  3066. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3067. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  3068. fi
  3069. output_verbose_link_cmd='echo'
  3070. ;;
  3071. osf3*)
  3072. case $cc_basename in
  3073. KCC*)
  3074. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3075. # KCC will only create a shared library if the output file
  3076. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3077. # to its proper name (with version) after linking.
  3078. _LT_AC_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'
  3079. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3080. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3081. # Archives containing C++ object files must be created using
  3082. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3083. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3084. ;;
  3085. RCC*)
  3086. # Rational C++ 2.4.1
  3087. # FIXME: insert proper C++ library support
  3088. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3089. ;;
  3090. cxx*)
  3091. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3092. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3093. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3094. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3095. # Commands to make compiler produce verbose output that lists
  3096. # what "hidden" libraries, object files and flags are used when
  3097. # linking a shared library.
  3098. #
  3099. # There doesn't appear to be a way to prevent this compiler from
  3100. # explicitly linking system object files so we need to strip them
  3101. # from the output so that they don't get included in the library
  3102. # dependencies.
  3103. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3104. ;;
  3105. *)
  3106. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3107. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3108. _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3109. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3110. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3111. # Commands to make compiler produce verbose output that lists
  3112. # what "hidden" libraries, object files and flags are used when
  3113. # linking a shared library.
  3114. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3115. else
  3116. # FIXME: insert proper C++ library support
  3117. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3118. fi
  3119. ;;
  3120. esac
  3121. ;;
  3122. osf4* | osf5*)
  3123. case $cc_basename in
  3124. KCC*)
  3125. # Kuck and Associates, Inc. (KAI) C++ Compiler
  3126. # KCC will only create a shared library if the output file
  3127. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3128. # to its proper name (with version) after linking.
  3129. _LT_AC_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'
  3130. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3131. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3132. # Archives containing C++ object files must be created using
  3133. # the KAI C++ compiler.
  3134. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3135. ;;
  3136. RCC*)
  3137. # Rational C++ 2.4.1
  3138. # FIXME: insert proper C++ library support
  3139. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3140. ;;
  3141. cxx*)
  3142. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3143. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  3144. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3145. echo "-hidden">> $lib.exp~
  3146. $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~
  3147. $rm $lib.exp'
  3148. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3149. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3150. # Commands to make compiler produce verbose output that lists
  3151. # what "hidden" libraries, object files and flags are used when
  3152. # linking a shared library.
  3153. #
  3154. # There doesn't appear to be a way to prevent this compiler from
  3155. # explicitly linking system object files so we need to strip them
  3156. # from the output so that they don't get included in the library
  3157. # dependencies.
  3158. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
  3159. ;;
  3160. *)
  3161. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3162. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3163. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  3164. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3165. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3166. # Commands to make compiler produce verbose output that lists
  3167. # what "hidden" libraries, object files and flags are used when
  3168. # linking a shared library.
  3169. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3170. else
  3171. # FIXME: insert proper C++ library support
  3172. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3173. fi
  3174. ;;
  3175. esac
  3176. ;;
  3177. psos*)
  3178. # FIXME: insert proper C++ library support
  3179. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3180. ;;
  3181. sunos4*)
  3182. case $cc_basename in
  3183. CC*)
  3184. # Sun C++ 4.x
  3185. # FIXME: insert proper C++ library support
  3186. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3187. ;;
  3188. lcc*)
  3189. # Lucid
  3190. # FIXME: insert proper C++ library support
  3191. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3192. ;;
  3193. *)
  3194. # FIXME: insert proper C++ library support
  3195. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3196. ;;
  3197. esac
  3198. ;;
  3199. solaris*)
  3200. case $cc_basename in
  3201. CC*)
  3202. # Sun C++ 4.2, 5.x and Centerline C++
  3203. _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
  3204. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3205. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3206. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3207. $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'
  3208. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3209. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3210. case $host_os in
  3211. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  3212. *)
  3213. # The C++ compiler is used as linker so we must use $wl
  3214. # flag to pass the commands to the underlying system
  3215. # linker. We must also pass each convience library through
  3216. # to the system linker between allextract/defaultextract.
  3217. # The C++ compiler will combine linker options so we
  3218. # cannot just pass the convience library names through
  3219. # without $wl.
  3220. # Supported since Solaris 2.6 (maybe 2.5.1?)
  3221. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
  3222. ;;
  3223. esac
  3224. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3225. output_verbose_link_cmd='echo'
  3226. # Archives containing C++ object files must be created using
  3227. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3228. # necessary to make sure instantiated templates are included
  3229. # in the archive.
  3230. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3231. ;;
  3232. gcx*)
  3233. # Green Hills C++ Compiler
  3234. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3235. # The C++ compiler must be used to create the archive.
  3236. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3237. ;;
  3238. *)
  3239. # GNU C++ compiler with Solaris linker
  3240. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3241. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3242. if $CC --version | grep -v '^2\.7' > /dev/null; then
  3243. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3244. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3245. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3246. # Commands to make compiler produce verbose output that lists
  3247. # what "hidden" libraries, object files and flags are used when
  3248. # linking a shared library.
  3249. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3250. else
  3251. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  3252. # platform.
  3253. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3254. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3255. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3256. # Commands to make compiler produce verbose output that lists
  3257. # what "hidden" libraries, object files and flags are used when
  3258. # linking a shared library.
  3259. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3260. fi
  3261. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3262. fi
  3263. ;;
  3264. esac
  3265. ;;
  3266. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  3267. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  3268. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3269. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3270. runpath_var='LD_RUN_PATH'
  3271. case $cc_basename in
  3272. CC*)
  3273. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3274. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3275. ;;
  3276. *)
  3277. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3278. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  3279. ;;
  3280. esac
  3281. ;;
  3282. sysv5* | sco3.2v5* | sco5v6*)
  3283. # Note: We can NOT use -z defs as we might desire, because we do not
  3284. # link with -lc, and that would cause any symbols used from libc to
  3285. # always be unresolved, which means just about no library would
  3286. # ever link correctly. If we're not using GNU ld we use -z text
  3287. # though, which does catch some bad symbols but isn't as heavy-handed
  3288. # as -z defs.
  3289. # For security reasons, it is highly recommended that you always
  3290. # use absolute paths for naming shared libraries, and exclude the
  3291. # DT_RUNPATH tag from executables and libraries. But doing so
  3292. # requires that you compile everything twice, which is a pain.
  3293. # So that behaviour is only enabled if SCOABSPATH is set to a
  3294. # non-empty value in the environment. Most likely only useful for
  3295. # creating official distributions of packages.
  3296. # This is a hack until libtool officially supports absolute path
  3297. # names for shared libraries.
  3298. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  3299. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  3300. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3301. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3302. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  3303. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  3304. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3305. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  3306. runpath_var='LD_RUN_PATH'
  3307. case $cc_basename in
  3308. CC*)
  3309. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3310. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3311. ;;
  3312. *)
  3313. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3314. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  3315. ;;
  3316. esac
  3317. ;;
  3318. tandem*)
  3319. case $cc_basename in
  3320. NCC*)
  3321. # NonStop-UX NCC 3.20
  3322. # FIXME: insert proper C++ library support
  3323. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3324. ;;
  3325. *)
  3326. # FIXME: insert proper C++ library support
  3327. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3328. ;;
  3329. esac
  3330. ;;
  3331. vxworks*)
  3332. # FIXME: insert proper C++ library support
  3333. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3334. ;;
  3335. *)
  3336. # FIXME: insert proper C++ library support
  3337. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3338. ;;
  3339. esac
  3340. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  3341. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3342. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  3343. _LT_AC_TAGVAR(LD, $1)="$LD"
  3344. AC_LIBTOOL_POSTDEP_PREDEP($1)
  3345. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3346. AC_LIBTOOL_PROG_CC_C_O($1)
  3347. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3348. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3349. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3350. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3351. AC_LIBTOOL_CONFIG($1)
  3352. AC_LANG_POP
  3353. CC=$lt_save_CC
  3354. LDCXX=$LD
  3355. LD=$lt_save_LD
  3356. GCC=$lt_save_GCC
  3357. with_gnu_ldcxx=$with_gnu_ld
  3358. with_gnu_ld=$lt_save_with_gnu_ld
  3359. lt_cv_path_LDCXX=$lt_cv_path_LD
  3360. lt_cv_path_LD=$lt_save_path_LD
  3361. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3362. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3363. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3364. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3365. # ------------------------------------
  3366. # Figure out "hidden" library dependencies from verbose
  3367. # compiler output when linking a shared library.
  3368. # Parse the compiler output and extract the necessary
  3369. # objects, libraries and library flags.
  3370. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  3371. dnl we can't use the lt_simple_compile_test_code here,
  3372. dnl because it contains code intended for an executable,
  3373. dnl not a library. It's possible we should let each
  3374. dnl tag define a new lt_????_link_test_code variable,
  3375. dnl but it's only used here...
  3376. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  3377. int a;
  3378. void foo (void) { a = 0; }
  3379. EOF
  3380. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  3381. class Foo
  3382. {
  3383. public:
  3384. Foo (void) { a = 0; }
  3385. private:
  3386. int a;
  3387. };
  3388. EOF
  3389. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  3390. subroutine foo
  3391. implicit none
  3392. integer*4 a
  3393. a=0
  3394. return
  3395. end
  3396. EOF
  3397. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  3398. public class foo {
  3399. private int a;
  3400. public void bar (void) {
  3401. a = 0;
  3402. }
  3403. };
  3404. EOF
  3405. ])
  3406. dnl Parse the compiler output and extract the necessary
  3407. dnl objects, libraries and library flags.
  3408. if AC_TRY_EVAL(ac_compile); then
  3409. # Parse the compiler output and extract the necessary
  3410. # objects, libraries and library flags.
  3411. # Sentinel used to keep track of whether or not we are before
  3412. # the conftest object file.
  3413. pre_test_object_deps_done=no
  3414. # The `*' in the case matches for architectures that use `case' in
  3415. # $output_verbose_cmd can trigger glob expansion during the loop
  3416. # eval without this substitution.
  3417. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  3418. for p in `eval $output_verbose_link_cmd`; do
  3419. case $p in
  3420. -L* | -R* | -l*)
  3421. # Some compilers place space between "-{L,R}" and the path.
  3422. # Remove the space.
  3423. if test $p = "-L" \
  3424. || test $p = "-R"; then
  3425. prev=$p
  3426. continue
  3427. else
  3428. prev=
  3429. fi
  3430. if test "$pre_test_object_deps_done" = no; then
  3431. case $p in
  3432. -L* | -R*)
  3433. # Internal compiler library paths should come after those
  3434. # provided the user. The postdeps already come after the
  3435. # user supplied libs so there is no need to process them.
  3436. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3437. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  3438. else
  3439. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  3440. fi
  3441. ;;
  3442. # The "-l" case would never come before the object being
  3443. # linked, so don't bother handling this case.
  3444. esac
  3445. else
  3446. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  3447. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  3448. else
  3449. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  3450. fi
  3451. fi
  3452. ;;
  3453. *.$objext)
  3454. # This assumes that the test object file only shows up
  3455. # once in the compiler output.
  3456. if test "$p" = "conftest.$objext"; then
  3457. pre_test_object_deps_done=yes
  3458. continue
  3459. fi
  3460. if test "$pre_test_object_deps_done" = no; then
  3461. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  3462. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  3463. else
  3464. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  3465. fi
  3466. else
  3467. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  3468. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  3469. else
  3470. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  3471. fi
  3472. fi
  3473. ;;
  3474. *) ;; # Ignore the rest.
  3475. esac
  3476. done
  3477. # Clean up.
  3478. rm -f a.out a.exe
  3479. else
  3480. echo "libtool.m4: error: problem compiling $1 test program"
  3481. fi
  3482. $rm -f confest.$objext
  3483. # PORTME: override above test on systems where it is broken
  3484. ifelse([$1],[CXX],
  3485. [case $host_os in
  3486. interix3*)
  3487. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  3488. # hack all around it, let's just trust "g++" to DTRT.
  3489. _LT_AC_TAGVAR(predep_objects,$1)=
  3490. _LT_AC_TAGVAR(postdep_objects,$1)=
  3491. _LT_AC_TAGVAR(postdeps,$1)=
  3492. ;;
  3493. solaris*)
  3494. case $cc_basename in
  3495. CC*)
  3496. # Adding this requires a known-good setup of shared libraries for
  3497. # Sun compiler versions before 5.6, else PIC objects from an old
  3498. # archive will be linked into the output, leading to subtle bugs.
  3499. _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
  3500. ;;
  3501. esac
  3502. ;;
  3503. esac
  3504. ])
  3505. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3506. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3507. esac
  3508. ])# AC_LIBTOOL_POSTDEP_PREDEP
  3509. # AC_LIBTOOL_LANG_F77_CONFIG
  3510. # --------------------------
  3511. # Ensure that the configuration vars for the C compiler are
  3512. # suitably defined. Those variables are subsequently used by
  3513. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3514. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3515. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3516. [AC_REQUIRE([AC_PROG_F77])
  3517. AC_LANG_PUSH(Fortran 77)
  3518. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3519. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3520. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3521. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3522. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3523. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3524. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3525. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3526. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3527. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3528. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3529. _LT_AC_TAGVAR(module_cmds, $1)=
  3530. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3531. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3532. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3533. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3534. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3535. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3536. # Source file extension for f77 test sources.
  3537. ac_ext=f
  3538. # Object file extension for compiled f77 test sources.
  3539. objext=o
  3540. _LT_AC_TAGVAR(objext, $1)=$objext
  3541. # Code to be used in simple compile tests
  3542. lt_simple_compile_test_code=" subroutine t\n return\n end\n"
  3543. # Code to be used in simple link tests
  3544. lt_simple_link_test_code=" program t\n end\n"
  3545. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3546. _LT_AC_SYS_COMPILER
  3547. # save warnings/boilerplate of simple test code
  3548. _LT_COMPILER_BOILERPLATE
  3549. _LT_LINKER_BOILERPLATE
  3550. # Allow CC to be a program name with arguments.
  3551. lt_save_CC="$CC"
  3552. CC=${F77-"f77"}
  3553. compiler=$CC
  3554. _LT_AC_TAGVAR(compiler, $1)=$CC
  3555. _LT_CC_BASENAME([$compiler])
  3556. AC_MSG_CHECKING([if libtool supports shared libraries])
  3557. AC_MSG_RESULT([$can_build_shared])
  3558. AC_MSG_CHECKING([whether to build shared libraries])
  3559. test "$can_build_shared" = "no" && enable_shared=no
  3560. # On AIX, shared libraries and static libraries use the same namespace, and
  3561. # are all built from PIC.
  3562. case $host_os in
  3563. aix3*)
  3564. test "$enable_shared" = yes && enable_static=no
  3565. if test -n "$RANLIB"; then
  3566. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3567. postinstall_cmds='$RANLIB $lib'
  3568. fi
  3569. ;;
  3570. aix4* | aix5*)
  3571. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3572. test "$enable_shared" = yes && enable_static=no
  3573. fi
  3574. ;;
  3575. esac
  3576. AC_MSG_RESULT([$enable_shared])
  3577. AC_MSG_CHECKING([whether to build static libraries])
  3578. # Make sure either enable_shared or enable_static is yes.
  3579. test "$enable_shared" = yes || enable_static=yes
  3580. AC_MSG_RESULT([$enable_static])
  3581. _LT_AC_TAGVAR(GCC, $1)="$G77"
  3582. _LT_AC_TAGVAR(LD, $1)="$LD"
  3583. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3584. AC_LIBTOOL_PROG_CC_C_O($1)
  3585. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3586. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3587. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3588. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3589. AC_LIBTOOL_CONFIG($1)
  3590. AC_LANG_POP
  3591. CC="$lt_save_CC"
  3592. ])# AC_LIBTOOL_LANG_F77_CONFIG
  3593. # AC_LIBTOOL_LANG_GCJ_CONFIG
  3594. # --------------------------
  3595. # Ensure that the configuration vars for the C compiler are
  3596. # suitably defined. Those variables are subsequently used by
  3597. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3598. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  3599. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  3600. [AC_LANG_SAVE
  3601. # Source file extension for Java test sources.
  3602. ac_ext=java
  3603. # Object file extension for compiled Java test sources.
  3604. objext=o
  3605. _LT_AC_TAGVAR(objext, $1)=$objext
  3606. # Code to be used in simple compile tests
  3607. lt_simple_compile_test_code="class foo {}\n"
  3608. # Code to be used in simple link tests
  3609. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
  3610. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3611. _LT_AC_SYS_COMPILER
  3612. # save warnings/boilerplate of simple test code
  3613. _LT_COMPILER_BOILERPLATE
  3614. _LT_LINKER_BOILERPLATE
  3615. # Allow CC to be a program name with arguments.
  3616. lt_save_CC="$CC"
  3617. CC=${GCJ-"gcj"}
  3618. compiler=$CC
  3619. _LT_AC_TAGVAR(compiler, $1)=$CC
  3620. _LT_CC_BASENAME([$compiler])
  3621. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3622. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3623. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3624. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3625. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3626. AC_LIBTOOL_PROG_CC_C_O($1)
  3627. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3628. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3629. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3630. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3631. AC_LIBTOOL_CONFIG($1)
  3632. AC_LANG_RESTORE
  3633. CC="$lt_save_CC"
  3634. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3635. # AC_LIBTOOL_LANG_RC_CONFIG
  3636. # -------------------------
  3637. # Ensure that the configuration vars for the Windows resource compiler are
  3638. # suitably defined. Those variables are subsequently used by
  3639. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3640. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3641. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3642. [AC_LANG_SAVE
  3643. # Source file extension for RC test sources.
  3644. ac_ext=rc
  3645. # Object file extension for compiled RC test sources.
  3646. objext=o
  3647. _LT_AC_TAGVAR(objext, $1)=$objext
  3648. # Code to be used in simple compile tests
  3649. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  3650. # Code to be used in simple link tests
  3651. lt_simple_link_test_code="$lt_simple_compile_test_code"
  3652. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3653. _LT_AC_SYS_COMPILER
  3654. # save warnings/boilerplate of simple test code
  3655. _LT_COMPILER_BOILERPLATE
  3656. _LT_LINKER_BOILERPLATE
  3657. # Allow CC to be a program name with arguments.
  3658. lt_save_CC="$CC"
  3659. CC=${RC-"windres"}
  3660. compiler=$CC
  3661. _LT_AC_TAGVAR(compiler, $1)=$CC
  3662. _LT_CC_BASENAME([$compiler])
  3663. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3664. AC_LIBTOOL_CONFIG($1)
  3665. AC_LANG_RESTORE
  3666. CC="$lt_save_CC"
  3667. ])# AC_LIBTOOL_LANG_RC_CONFIG
  3668. # AC_LIBTOOL_CONFIG([TAGNAME])
  3669. # ----------------------------
  3670. # If TAGNAME is not passed, then create an initial libtool script
  3671. # with a default configuration from the untagged config vars. Otherwise
  3672. # add code to config.status for appending the configuration named by
  3673. # TAGNAME from the matching tagged config vars.
  3674. AC_DEFUN([AC_LIBTOOL_CONFIG],
  3675. [# The else clause should only fire when bootstrapping the
  3676. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3677. # with your package, and you will get complaints that there are
  3678. # no rules to generate ltmain.sh.
  3679. if test -f "$ltmain"; then
  3680. # See if we are running on zsh, and set the options which allow our commands through
  3681. # without removal of \ escapes.
  3682. if test -n "${ZSH_VERSION+set}" ; then
  3683. setopt NO_GLOB_SUBST
  3684. fi
  3685. # Now quote all the things that may contain metacharacters while being
  3686. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3687. # variables and quote the copies for generation of the libtool script.
  3688. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
  3689. SED SHELL STRIP \
  3690. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3691. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3692. deplibs_check_method reload_flag reload_cmds need_locks \
  3693. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3694. lt_cv_sys_global_symbol_to_c_name_address \
  3695. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3696. old_postinstall_cmds old_postuninstall_cmds \
  3697. _LT_AC_TAGVAR(compiler, $1) \
  3698. _LT_AC_TAGVAR(CC, $1) \
  3699. _LT_AC_TAGVAR(LD, $1) \
  3700. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  3701. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  3702. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  3703. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  3704. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  3705. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  3706. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  3707. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  3708. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  3709. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  3710. _LT_AC_TAGVAR(predep_objects, $1) \
  3711. _LT_AC_TAGVAR(postdep_objects, $1) \
  3712. _LT_AC_TAGVAR(predeps, $1) \
  3713. _LT_AC_TAGVAR(postdeps, $1) \
  3714. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  3715. _LT_AC_TAGVAR(archive_cmds, $1) \
  3716. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  3717. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  3718. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  3719. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  3720. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  3721. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  3722. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  3723. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  3724. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  3725. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  3726. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  3727. _LT_AC_TAGVAR(module_cmds, $1) \
  3728. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  3729. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  3730. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  3731. _LT_AC_TAGVAR(include_expsyms, $1); do
  3732. case $var in
  3733. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  3734. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  3735. _LT_AC_TAGVAR(archive_cmds, $1) | \
  3736. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  3737. _LT_AC_TAGVAR(module_cmds, $1) | \
  3738. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  3739. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  3740. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  3741. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  3742. postinstall_cmds | postuninstall_cmds | \
  3743. old_postinstall_cmds | old_postuninstall_cmds | \
  3744. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3745. # Double-quote double-evaled strings.
  3746. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3747. ;;
  3748. *)
  3749. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3750. ;;
  3751. esac
  3752. done
  3753. case $lt_echo in
  3754. *'\[$]0 --fallback-echo"')
  3755. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  3756. ;;
  3757. esac
  3758. ifelse([$1], [],
  3759. [cfgfile="${ofile}T"
  3760. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  3761. $rm -f "$cfgfile"
  3762. AC_MSG_NOTICE([creating $ofile])],
  3763. [cfgfile="$ofile"])
  3764. cat <<__EOF__ >> "$cfgfile"
  3765. ifelse([$1], [],
  3766. [#! $SHELL
  3767. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3768. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3769. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3770. #
  3771. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  3772. # Free Software Foundation, Inc.
  3773. #
  3774. # This file is part of GNU Libtool:
  3775. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3776. #
  3777. # This program is free software; you can redistribute it and/or modify
  3778. # it under the terms of the GNU General Public License as published by
  3779. # the Free Software Foundation; either version 2 of the License, or
  3780. # (at your option) any later version.
  3781. #
  3782. # This program is distributed in the hope that it will be useful, but
  3783. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3784. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3785. # General Public License for more details.
  3786. #
  3787. # You should have received a copy of the GNU General Public License
  3788. # along with this program; if not, write to the Free Software
  3789. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  3790. #
  3791. # As a special exception to the GNU General Public License, if you
  3792. # distribute this file as part of a program that contains a
  3793. # configuration script generated by Autoconf, you may include it under
  3794. # the same distribution terms that you use for the rest of that program.
  3795. # A sed program that does not truncate output.
  3796. SED=$lt_SED
  3797. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3798. Xsed="$SED -e 1s/^X//"
  3799. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3800. # if CDPATH is set.
  3801. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3802. # The names of the tagged configurations supported by this script.
  3803. available_tags=
  3804. # ### BEGIN LIBTOOL CONFIG],
  3805. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3806. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3807. # Shell to use when invoking shell scripts.
  3808. SHELL=$lt_SHELL
  3809. # Whether or not to build shared libraries.
  3810. build_libtool_libs=$enable_shared
  3811. # Whether or not to build static libraries.
  3812. build_old_libs=$enable_static
  3813. # Whether or not to add -lc for building shared libraries.
  3814. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  3815. # Whether or not to disallow shared libs when runtime libs are static
  3816. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  3817. # Whether or not to optimize for fast installation.
  3818. fast_install=$enable_fast_install
  3819. # The host system.
  3820. host_alias=$host_alias
  3821. host=$host
  3822. host_os=$host_os
  3823. # The build system.
  3824. build_alias=$build_alias
  3825. build=$build
  3826. build_os=$build_os
  3827. # An echo program that does not interpret backslashes.
  3828. echo=$lt_echo
  3829. # The archiver.
  3830. AR=$lt_AR
  3831. AR_FLAGS=$lt_AR_FLAGS
  3832. # A C compiler.
  3833. LTCC=$lt_LTCC
  3834. # LTCC compiler flags.
  3835. LTCFLAGS=$lt_LTCFLAGS
  3836. # A language-specific compiler.
  3837. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  3838. # Is the compiler the GNU C compiler?
  3839. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  3840. # An ERE matcher.
  3841. EGREP=$lt_EGREP
  3842. # The linker used to build libraries.
  3843. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  3844. # Whether we need hard or soft links.
  3845. LN_S=$lt_LN_S
  3846. # A BSD-compatible nm program.
  3847. NM=$lt_NM
  3848. # A symbol stripping program
  3849. STRIP=$lt_STRIP
  3850. # Used to examine libraries when file_magic_cmd begins "file"
  3851. MAGIC_CMD=$MAGIC_CMD
  3852. # Used on cygwin: DLL creation program.
  3853. DLLTOOL="$DLLTOOL"
  3854. # Used on cygwin: object dumper.
  3855. OBJDUMP="$OBJDUMP"
  3856. # Used on cygwin: assembler.
  3857. AS="$AS"
  3858. # The name of the directory that contains temporary libtool files.
  3859. objdir=$objdir
  3860. # How to create reloadable object files.
  3861. reload_flag=$lt_reload_flag
  3862. reload_cmds=$lt_reload_cmds
  3863. # How to pass a linker flag through the compiler.
  3864. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  3865. # Object file suffix (normally "o").
  3866. objext="$ac_objext"
  3867. # Old archive suffix (normally "a").
  3868. libext="$libext"
  3869. # Shared library suffix (normally ".so").
  3870. shrext_cmds='$shrext_cmds'
  3871. # Executable file suffix (normally "").
  3872. exeext="$exeext"
  3873. # Additional compiler flags for building library objects.
  3874. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  3875. pic_mode=$pic_mode
  3876. # What is the maximum length of a command?
  3877. max_cmd_len=$lt_cv_sys_max_cmd_len
  3878. # Does compiler simultaneously support -c and -o options?
  3879. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  3880. # Must we lock files when doing compilation?
  3881. need_locks=$lt_need_locks
  3882. # Do we need the lib prefix for modules?
  3883. need_lib_prefix=$need_lib_prefix
  3884. # Do we need a version for libraries?
  3885. need_version=$need_version
  3886. # Whether dlopen is supported.
  3887. dlopen_support=$enable_dlopen
  3888. # Whether dlopen of programs is supported.
  3889. dlopen_self=$enable_dlopen_self
  3890. # Whether dlopen of statically linked programs is supported.
  3891. dlopen_self_static=$enable_dlopen_self_static
  3892. # Compiler flag to prevent dynamic linking.
  3893. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  3894. # Compiler flag to turn off builtin functions.
  3895. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  3896. # Compiler flag to allow reflexive dlopens.
  3897. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  3898. # Compiler flag to generate shared objects directly from archives.
  3899. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  3900. # Compiler flag to generate thread-safe objects.
  3901. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  3902. # Library versioning type.
  3903. version_type=$version_type
  3904. # Format of library name prefix.
  3905. libname_spec=$lt_libname_spec
  3906. # List of archive names. First name is the real one, the rest are links.
  3907. # The last name is the one that the linker finds with -lNAME.
  3908. library_names_spec=$lt_library_names_spec
  3909. # The coded name of the library, if different from the real name.
  3910. soname_spec=$lt_soname_spec
  3911. # Commands used to build and install an old-style archive.
  3912. RANLIB=$lt_RANLIB
  3913. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  3914. old_postinstall_cmds=$lt_old_postinstall_cmds
  3915. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  3916. # Create an old-style archive from a shared archive.
  3917. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  3918. # Create a temporary old-style archive to link instead of a shared archive.
  3919. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  3920. # Commands used to build and install a shared archive.
  3921. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  3922. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  3923. postinstall_cmds=$lt_postinstall_cmds
  3924. postuninstall_cmds=$lt_postuninstall_cmds
  3925. # Commands used to build a loadable module (assumed same as above if empty)
  3926. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  3927. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  3928. # Commands to strip libraries.
  3929. old_striplib=$lt_old_striplib
  3930. striplib=$lt_striplib
  3931. # Dependencies to place before the objects being linked to create a
  3932. # shared library.
  3933. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  3934. # Dependencies to place after the objects being linked to create a
  3935. # shared library.
  3936. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  3937. # Dependencies to place before the objects being linked to create a
  3938. # shared library.
  3939. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  3940. # Dependencies to place after the objects being linked to create a
  3941. # shared library.
  3942. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  3943. # The library search path used internally by the compiler when linking
  3944. # a shared library.
  3945. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  3946. # Method to check whether dependent libraries are shared objects.
  3947. deplibs_check_method=$lt_deplibs_check_method
  3948. # Command to use when deplibs_check_method == file_magic.
  3949. file_magic_cmd=$lt_file_magic_cmd
  3950. # Flag that allows shared libraries with undefined symbols to be built.
  3951. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  3952. # Flag that forces no undefined symbols.
  3953. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  3954. # Commands used to finish a libtool library installation in a directory.
  3955. finish_cmds=$lt_finish_cmds
  3956. # Same as above, but a single script fragment to be evaled but not shown.
  3957. finish_eval=$lt_finish_eval
  3958. # Take the output of nm and produce a listing of raw symbols and C names.
  3959. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  3960. # Transform the output of nm in a proper C declaration
  3961. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  3962. # Transform the output of nm in a C name address pair
  3963. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  3964. # This is the shared library runtime path variable.
  3965. runpath_var=$runpath_var
  3966. # This is the shared library path variable.
  3967. shlibpath_var=$shlibpath_var
  3968. # Is shlibpath searched before the hard-coded library search path?
  3969. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  3970. # How to hardcode a shared library path into an executable.
  3971. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  3972. # Whether we should hardcode library paths into libraries.
  3973. hardcode_into_libs=$hardcode_into_libs
  3974. # Flag to hardcode \$libdir into a binary during linking.
  3975. # This must work even if \$libdir does not exist.
  3976. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  3977. # If ld is used when linking, flag to hardcode \$libdir into
  3978. # a binary during linking. This must work even if \$libdir does
  3979. # not exist.
  3980. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  3981. # Whether we need a single -rpath flag with a separated argument.
  3982. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  3983. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  3984. # resulting binary.
  3985. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  3986. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  3987. # resulting binary.
  3988. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  3989. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  3990. # the resulting binary.
  3991. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  3992. # Set to yes if building a shared library automatically hardcodes DIR into the library
  3993. # and all subsequent libraries and executables linked against it.
  3994. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  3995. # Variables whose values should be saved in libtool wrapper scripts and
  3996. # restored at relink time.
  3997. variables_saved_for_relink="$variables_saved_for_relink"
  3998. # Whether libtool must link a program against all its dependency libraries.
  3999. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  4000. # Compile-time system search path for libraries
  4001. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  4002. # Run-time system search path for libraries
  4003. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  4004. # Fix the shell variable \$srcfile for the compiler.
  4005. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  4006. # Set to yes if exported symbols are required.
  4007. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  4008. # The commands to list exported symbols.
  4009. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  4010. # The commands to extract the exported symbol list from a shared archive.
  4011. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  4012. # Symbols that should not be listed in the preloaded symbols.
  4013. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  4014. # Symbols that must always be exported.
  4015. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  4016. ifelse([$1],[],
  4017. [# ### END LIBTOOL CONFIG],
  4018. [# ### END LIBTOOL TAG CONFIG: $tagname])
  4019. __EOF__
  4020. ifelse([$1],[], [
  4021. case $host_os in
  4022. aix3*)
  4023. cat <<\EOF >> "$cfgfile"
  4024. # AIX sometimes has problems with the GCC collect2 program. For some
  4025. # reason, if we set the COLLECT_NAMES environment variable, the problems
  4026. # vanish in a puff of smoke.
  4027. if test "X${COLLECT_NAMES+set}" != Xset; then
  4028. COLLECT_NAMES=
  4029. export COLLECT_NAMES
  4030. fi
  4031. EOF
  4032. ;;
  4033. esac
  4034. # We use sed instead of cat because bash on DJGPP gets confused if
  4035. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  4036. # text mode, it properly converts lines to CR/LF. This bash problem
  4037. # is reportedly fixed, but why not run on old versions too?
  4038. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  4039. mv -f "$cfgfile" "$ofile" || \
  4040. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  4041. chmod +x "$ofile"
  4042. ])
  4043. else
  4044. # If there is no Makefile yet, we rely on a make rule to execute
  4045. # `config.status --recheck' to rerun these tests and create the
  4046. # libtool script then.
  4047. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  4048. if test -f "$ltmain_in"; then
  4049. test -f Makefile && make "$ltmain"
  4050. fi
  4051. fi
  4052. ])# AC_LIBTOOL_CONFIG
  4053. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  4054. # -------------------------------------------
  4055. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  4056. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  4057. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4058. if test "$GCC" = yes; then
  4059. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  4060. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  4061. lt_cv_prog_compiler_rtti_exceptions,
  4062. [-fno-rtti -fno-exceptions], [],
  4063. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  4064. fi
  4065. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  4066. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4067. # ---------------------------------
  4068. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  4069. [AC_REQUIRE([AC_CANONICAL_HOST])
  4070. AC_REQUIRE([AC_PROG_NM])
  4071. AC_REQUIRE([AC_OBJEXT])
  4072. # Check for command to grab the raw symbol name followed by C symbol from nm.
  4073. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4074. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4075. [
  4076. # These are sane defaults that work on at least a few old systems.
  4077. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  4078. # Character class describing NM global symbol codes.
  4079. symcode='[[BCDEGRST]]'
  4080. # Regexp to match symbols that can be accessed directly from C.
  4081. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4082. # Transform an extracted symbol line into a proper C declaration
  4083. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  4084. # Transform an extracted symbol line into symbol name and symbol address
  4085. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4086. # Define system-specific variables.
  4087. case $host_os in
  4088. aix*)
  4089. symcode='[[BCDT]]'
  4090. ;;
  4091. cygwin* | mingw* | pw32*)
  4092. symcode='[[ABCDGISTW]]'
  4093. ;;
  4094. hpux*) # Its linker distinguishes data from code symbols
  4095. if test "$host_cpu" = ia64; then
  4096. symcode='[[ABCDEGRST]]'
  4097. fi
  4098. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4099. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4100. ;;
  4101. linux* | k*bsd*-gnu)
  4102. if test "$host_cpu" = ia64; then
  4103. symcode='[[ABCDGIRSTW]]'
  4104. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4105. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  4106. fi
  4107. ;;
  4108. irix* | nonstopux*)
  4109. symcode='[[BCDEGRST]]'
  4110. ;;
  4111. osf*)
  4112. symcode='[[BCDEGQRST]]'
  4113. ;;
  4114. solaris*)
  4115. symcode='[[BDRT]]'
  4116. ;;
  4117. sco3.2v5*)
  4118. symcode='[[DT]]'
  4119. ;;
  4120. sysv4.2uw2*)
  4121. symcode='[[DT]]'
  4122. ;;
  4123. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  4124. symcode='[[ABDT]]'
  4125. ;;
  4126. sysv4)
  4127. symcode='[[DFNSTU]]'
  4128. ;;
  4129. esac
  4130. # Handle CRLF in mingw tool chain
  4131. opt_cr=
  4132. case $build_os in
  4133. mingw*)
  4134. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4135. ;;
  4136. esac
  4137. # If we're using GNU nm, then use its standard symbol codes.
  4138. case `$NM -V 2>&1` in
  4139. *GNU* | *'with BFD'*)
  4140. symcode='[[ABCDGIRSTW]]' ;;
  4141. esac
  4142. # Try without a prefix undercore, then with it.
  4143. for ac_symprfx in "" "_"; do
  4144. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4145. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4146. # Write the raw and C identifiers.
  4147. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4148. # Check to see that the pipe works correctly.
  4149. pipe_works=no
  4150. rm -f conftest*
  4151. cat > conftest.$ac_ext <<EOF
  4152. #ifdef __cplusplus
  4153. extern "C" {
  4154. #endif
  4155. char nm_test_var;
  4156. void nm_test_func(){}
  4157. #ifdef __cplusplus
  4158. }
  4159. #endif
  4160. int main(){nm_test_var='a';nm_test_func();return(0);}
  4161. EOF
  4162. if AC_TRY_EVAL(ac_compile); then
  4163. # Now try to grab the symbols.
  4164. nlist=conftest.nm
  4165. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  4166. # Try sorting and uniquifying the output.
  4167. if sort "$nlist" | uniq > "$nlist"T; then
  4168. mv -f "$nlist"T "$nlist"
  4169. else
  4170. rm -f "$nlist"T
  4171. fi
  4172. # Make sure that we snagged all the symbols we need.
  4173. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  4174. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  4175. cat <<EOF > conftest.$ac_ext
  4176. #ifdef __cplusplus
  4177. extern "C" {
  4178. #endif
  4179. EOF
  4180. # Now generate the symbol file.
  4181. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  4182. cat <<EOF >> conftest.$ac_ext
  4183. #if defined (__STDC__) && __STDC__
  4184. # define lt_ptr_t void *
  4185. #else
  4186. # define lt_ptr_t char *
  4187. # define const
  4188. #endif
  4189. /* The mapping between symbol names and symbols. */
  4190. const struct {
  4191. const char *name;
  4192. lt_ptr_t address;
  4193. }
  4194. lt_preloaded_symbols[[]] =
  4195. {
  4196. EOF
  4197. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  4198. cat <<\EOF >> conftest.$ac_ext
  4199. {0, (lt_ptr_t) 0}
  4200. };
  4201. #ifdef __cplusplus
  4202. }
  4203. #endif
  4204. EOF
  4205. # Now try linking the two files.
  4206. mv conftest.$ac_objext conftstm.$ac_objext
  4207. lt_save_LIBS="$LIBS"
  4208. lt_save_CFLAGS="$CFLAGS"
  4209. LIBS="conftstm.$ac_objext"
  4210. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4211. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4212. pipe_works=yes
  4213. fi
  4214. LIBS="$lt_save_LIBS"
  4215. CFLAGS="$lt_save_CFLAGS"
  4216. else
  4217. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4218. fi
  4219. else
  4220. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4221. fi
  4222. else
  4223. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4224. fi
  4225. else
  4226. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4227. cat conftest.$ac_ext >&5
  4228. fi
  4229. rm -f conftest* conftst*
  4230. # Do not use the global_symbol_pipe unless it works.
  4231. if test "$pipe_works" = yes; then
  4232. break
  4233. else
  4234. lt_cv_sys_global_symbol_pipe=
  4235. fi
  4236. done
  4237. ])
  4238. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4239. lt_cv_sys_global_symbol_to_cdecl=
  4240. fi
  4241. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4242. AC_MSG_RESULT(failed)
  4243. else
  4244. AC_MSG_RESULT(ok)
  4245. fi
  4246. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4247. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  4248. # ---------------------------------------
  4249. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  4250. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  4251. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4252. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  4253. AC_MSG_CHECKING([for $compiler option to produce PIC])
  4254. ifelse([$1],[CXX],[
  4255. # C++ specific cases for pic, static, wl, etc.
  4256. if test "$GXX" = yes; then
  4257. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4258. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4259. case $host_os in
  4260. aix*)
  4261. # All AIX code is PIC.
  4262. if test "$host_cpu" = ia64; then
  4263. # AIX 5 now supports IA64 processor
  4264. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4265. fi
  4266. ;;
  4267. amigaos*)
  4268. # FIXME: we need at least 68020 code to build shared libraries, but
  4269. # adding the `-m68020' flag to GCC prevents building anything better,
  4270. # like `-m68040'.
  4271. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4272. ;;
  4273. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4274. # PIC is the default for these OSes.
  4275. ;;
  4276. mingw* | os2* | pw32*)
  4277. # This hack is so that the source file can tell whether it is being
  4278. # built for inclusion in a dll (and should export symbols for example).
  4279. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4280. ;;
  4281. darwin* | rhapsody*)
  4282. # PIC is the default on this platform
  4283. # Common symbols not allowed in MH_DYLIB files
  4284. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4285. ;;
  4286. *djgpp*)
  4287. # DJGPP does not support shared libraries at all
  4288. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4289. ;;
  4290. interix3*)
  4291. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4292. # Instead, we relocate shared libraries at runtime.
  4293. ;;
  4294. sysv4*MP*)
  4295. if test -d /usr/nec; then
  4296. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4297. fi
  4298. ;;
  4299. hpux*)
  4300. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4301. # not for PA HP-UX.
  4302. case $host_cpu in
  4303. hppa*64*|ia64*)
  4304. ;;
  4305. *)
  4306. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4307. ;;
  4308. esac
  4309. ;;
  4310. *)
  4311. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4312. ;;
  4313. esac
  4314. else
  4315. case $host_os in
  4316. aix4* | aix5*)
  4317. # All AIX code is PIC.
  4318. if test "$host_cpu" = ia64; then
  4319. # AIX 5 now supports IA64 processor
  4320. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4321. else
  4322. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4323. fi
  4324. ;;
  4325. chorus*)
  4326. case $cc_basename in
  4327. cxch68*)
  4328. # Green Hills C++ Compiler
  4329. # _LT_AC_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"
  4330. ;;
  4331. esac
  4332. ;;
  4333. darwin*)
  4334. # PIC is the default on this platform
  4335. # Common symbols not allowed in MH_DYLIB files
  4336. case $cc_basename in
  4337. xlc*)
  4338. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4339. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4340. ;;
  4341. esac
  4342. ;;
  4343. dgux*)
  4344. case $cc_basename in
  4345. ec++*)
  4346. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4347. ;;
  4348. ghcx*)
  4349. # Green Hills C++ Compiler
  4350. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4351. ;;
  4352. *)
  4353. ;;
  4354. esac
  4355. ;;
  4356. freebsd* | dragonfly*)
  4357. # FreeBSD uses GNU C++
  4358. ;;
  4359. hpux9* | hpux10* | hpux11*)
  4360. case $cc_basename in
  4361. CC*)
  4362. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4363. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4364. if test "$host_cpu" != ia64; then
  4365. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4366. fi
  4367. ;;
  4368. aCC*)
  4369. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4370. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4371. case $host_cpu in
  4372. hppa*64*|ia64*)
  4373. # +Z the default
  4374. ;;
  4375. *)
  4376. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4377. ;;
  4378. esac
  4379. ;;
  4380. *)
  4381. ;;
  4382. esac
  4383. ;;
  4384. interix*)
  4385. # This is c89, which is MS Visual C++ (no shared libs)
  4386. # Anyone wants to do a port?
  4387. ;;
  4388. irix5* | irix6* | nonstopux*)
  4389. case $cc_basename in
  4390. CC*)
  4391. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4392. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4393. # CC pic flag -KPIC is the default.
  4394. ;;
  4395. *)
  4396. ;;
  4397. esac
  4398. ;;
  4399. linux* | k*bsd*-gnu)
  4400. case $cc_basename in
  4401. KCC*)
  4402. # KAI C++ Compiler
  4403. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4404. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4405. ;;
  4406. icpc* | ecpc*)
  4407. # Intel C++
  4408. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4409. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4410. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4411. ;;
  4412. pgCC*)
  4413. # Portland Group C++ compiler.
  4414. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4415. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4416. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4417. ;;
  4418. cxx*)
  4419. # Compaq C++
  4420. # Make sure the PIC flag is empty. It appears that all Alpha
  4421. # Linux and Compaq Tru64 Unix objects are PIC.
  4422. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4423. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4424. ;;
  4425. *)
  4426. ;;
  4427. esac
  4428. ;;
  4429. lynxos*)
  4430. ;;
  4431. m88k*)
  4432. ;;
  4433. mvs*)
  4434. case $cc_basename in
  4435. cxx*)
  4436. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4437. ;;
  4438. *)
  4439. ;;
  4440. esac
  4441. ;;
  4442. netbsd* | netbsdelf*-gnu)
  4443. ;;
  4444. osf3* | osf4* | osf5*)
  4445. case $cc_basename in
  4446. KCC*)
  4447. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4448. ;;
  4449. RCC*)
  4450. # Rational C++ 2.4.1
  4451. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4452. ;;
  4453. cxx*)
  4454. # Digital/Compaq C++
  4455. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4456. # Make sure the PIC flag is empty. It appears that all Alpha
  4457. # Linux and Compaq Tru64 Unix objects are PIC.
  4458. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4459. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4460. ;;
  4461. *)
  4462. ;;
  4463. esac
  4464. ;;
  4465. psos*)
  4466. ;;
  4467. solaris*)
  4468. case $cc_basename in
  4469. CC*)
  4470. # Sun C++ 4.2, 5.x and Centerline C++
  4471. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4472. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4473. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4474. ;;
  4475. gcx*)
  4476. # Green Hills C++ Compiler
  4477. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4478. ;;
  4479. *)
  4480. ;;
  4481. esac
  4482. ;;
  4483. sunos4*)
  4484. case $cc_basename in
  4485. CC*)
  4486. # Sun C++ 4.x
  4487. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4488. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4489. ;;
  4490. lcc*)
  4491. # Lucid
  4492. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4493. ;;
  4494. *)
  4495. ;;
  4496. esac
  4497. ;;
  4498. tandem*)
  4499. case $cc_basename in
  4500. NCC*)
  4501. # NonStop-UX NCC 3.20
  4502. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4503. ;;
  4504. *)
  4505. ;;
  4506. esac
  4507. ;;
  4508. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4509. case $cc_basename in
  4510. CC*)
  4511. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4512. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4513. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4514. ;;
  4515. esac
  4516. ;;
  4517. vxworks*)
  4518. ;;
  4519. *)
  4520. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4521. ;;
  4522. esac
  4523. fi
  4524. ],
  4525. [
  4526. if test "$GCC" = yes; then
  4527. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4528. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4529. case $host_os in
  4530. aix*)
  4531. # All AIX code is PIC.
  4532. if test "$host_cpu" = ia64; then
  4533. # AIX 5 now supports IA64 processor
  4534. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4535. fi
  4536. ;;
  4537. amigaos*)
  4538. # FIXME: we need at least 68020 code to build shared libraries, but
  4539. # adding the `-m68020' flag to GCC prevents building anything better,
  4540. # like `-m68040'.
  4541. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4542. ;;
  4543. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4544. # PIC is the default for these OSes.
  4545. ;;
  4546. mingw* | pw32* | os2*)
  4547. # This hack is so that the source file can tell whether it is being
  4548. # built for inclusion in a dll (and should export symbols for example).
  4549. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4550. ;;
  4551. darwin* | rhapsody*)
  4552. # PIC is the default on this platform
  4553. # Common symbols not allowed in MH_DYLIB files
  4554. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4555. ;;
  4556. interix3*)
  4557. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4558. # Instead, we relocate shared libraries at runtime.
  4559. ;;
  4560. msdosdjgpp*)
  4561. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4562. # on systems that don't support them.
  4563. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4564. enable_shared=no
  4565. ;;
  4566. sysv4*MP*)
  4567. if test -d /usr/nec; then
  4568. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4569. fi
  4570. ;;
  4571. hpux*)
  4572. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4573. # not for PA HP-UX.
  4574. case $host_cpu in
  4575. hppa*64*|ia64*)
  4576. # +Z the default
  4577. ;;
  4578. *)
  4579. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4580. ;;
  4581. esac
  4582. ;;
  4583. *)
  4584. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4585. ;;
  4586. esac
  4587. else
  4588. # PORTME Check for flag to pass linker flags through the system compiler.
  4589. case $host_os in
  4590. aix*)
  4591. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4592. if test "$host_cpu" = ia64; then
  4593. # AIX 5 now supports IA64 processor
  4594. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4595. else
  4596. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4597. fi
  4598. ;;
  4599. darwin*)
  4600. # PIC is the default on this platform
  4601. # Common symbols not allowed in MH_DYLIB files
  4602. case $cc_basename in
  4603. xlc*)
  4604. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  4605. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4606. ;;
  4607. esac
  4608. ;;
  4609. mingw* | pw32* | os2*)
  4610. # This hack is so that the source file can tell whether it is being
  4611. # built for inclusion in a dll (and should export symbols for example).
  4612. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4613. ;;
  4614. hpux9* | hpux10* | hpux11*)
  4615. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4616. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4617. # not for PA HP-UX.
  4618. case $host_cpu in
  4619. hppa*64*|ia64*)
  4620. # +Z the default
  4621. ;;
  4622. *)
  4623. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4624. ;;
  4625. esac
  4626. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4627. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4628. ;;
  4629. irix5* | irix6* | nonstopux*)
  4630. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4631. # PIC (with -KPIC) is the default.
  4632. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4633. ;;
  4634. newsos6)
  4635. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4636. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4637. ;;
  4638. linux* | k*bsd*-gnu)
  4639. case $cc_basename in
  4640. icc* | ecc*)
  4641. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4642. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4643. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4644. ;;
  4645. pgcc* | pgf77* | pgf90* | pgf95*)
  4646. # Portland Group compilers (*not* the Pentium gcc compiler,
  4647. # which looks to be a dead project)
  4648. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4649. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4650. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4651. ;;
  4652. ccc*)
  4653. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4654. # All Alpha code is PIC.
  4655. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4656. ;;
  4657. esac
  4658. ;;
  4659. osf3* | osf4* | osf5*)
  4660. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4661. # All OSF/1 code is PIC.
  4662. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4663. ;;
  4664. solaris*)
  4665. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4666. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4667. case $cc_basename in
  4668. f77* | f90* | f95*)
  4669. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4670. *)
  4671. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4672. esac
  4673. ;;
  4674. sunos4*)
  4675. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4676. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4677. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4678. ;;
  4679. sysv4 | sysv4.2uw2* | sysv4.3*)
  4680. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4681. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4682. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4683. ;;
  4684. sysv4*MP*)
  4685. if test -d /usr/nec ;then
  4686. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4687. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4688. fi
  4689. ;;
  4690. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4691. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4692. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4693. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4694. ;;
  4695. unicos*)
  4696. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4697. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4698. ;;
  4699. uts4*)
  4700. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4701. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4702. ;;
  4703. *)
  4704. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4705. ;;
  4706. esac
  4707. fi
  4708. ])
  4709. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  4710. #
  4711. # Check to make sure the PIC flag actually works.
  4712. #
  4713. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4714. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  4715. _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  4716. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  4717. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4718. "" | " "*) ;;
  4719. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4720. esac],
  4721. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4722. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4723. fi
  4724. case $host_os in
  4725. # For platforms which do not support PIC, -DPIC is meaningless:
  4726. *djgpp*)
  4727. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4728. ;;
  4729. *)
  4730. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4731. ;;
  4732. esac
  4733. #
  4734. # Check to make sure the static flag actually works.
  4735. #
  4736. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
  4737. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4738. _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  4739. $lt_tmp_static_flag,
  4740. [],
  4741. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  4742. ])
  4743. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4744. # ------------------------------------
  4745. # See if the linker supports building shared libraries.
  4746. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  4747. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4748. ifelse([$1],[CXX],[
  4749. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4750. case $host_os in
  4751. aix4* | aix5*)
  4752. # If we're using GNU nm, then we don't want the "-C" option.
  4753. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4754. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4755. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4756. else
  4757. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4758. fi
  4759. ;;
  4760. pw32*)
  4761. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4762. ;;
  4763. cygwin* | mingw*)
  4764. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4765. ;;
  4766. linux* | k*bsd*-gnu)
  4767. _LT_AC_TAGVAR(link_all_deplibs, $1)=no
  4768. ;;
  4769. *)
  4770. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4771. ;;
  4772. esac
  4773. ],[
  4774. runpath_var=
  4775. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4776. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4777. _LT_AC_TAGVAR(archive_cmds, $1)=
  4778. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  4779. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  4780. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4781. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4782. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4783. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  4784. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4785. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4786. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4787. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4788. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  4789. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4790. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  4791. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  4792. _LT_AC_TAGVAR(module_cmds, $1)=
  4793. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  4794. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4795. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4796. # include_expsyms should be a list of space-separated symbols to be *always*
  4797. # included in the symbol list
  4798. _LT_AC_TAGVAR(include_expsyms, $1)=
  4799. # exclude_expsyms can be an extended regexp of symbols to exclude
  4800. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4801. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4802. # as well as any symbol that contains `d'.
  4803. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  4804. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4805. # platforms (ab)use it in PIC code, but their linkers get confused if
  4806. # the symbol is explicitly referenced. Since portable code cannot
  4807. # rely on this symbol name, it's probably fine to never include it in
  4808. # preloaded symbol tables.
  4809. extract_expsyms_cmds=
  4810. # Just being paranoid about ensuring that cc_basename is set.
  4811. _LT_CC_BASENAME([$compiler])
  4812. case $host_os in
  4813. cygwin* | mingw* | pw32*)
  4814. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4815. # When not using gcc, we currently assume that we are using
  4816. # Microsoft Visual C++.
  4817. if test "$GCC" != yes; then
  4818. with_gnu_ld=no
  4819. fi
  4820. ;;
  4821. interix*)
  4822. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4823. with_gnu_ld=yes
  4824. ;;
  4825. openbsd*)
  4826. with_gnu_ld=no
  4827. ;;
  4828. esac
  4829. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  4830. if test "$with_gnu_ld" = yes; then
  4831. # If archive_cmds runs LD, not CC, wlarc should be empty
  4832. wlarc='${wl}'
  4833. # Set some defaults for GNU ld with shared library support. These
  4834. # are reset later if shared libraries are not supported. Putting them
  4835. # here allows them to be overridden if necessary.
  4836. runpath_var=LD_RUN_PATH
  4837. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  4838. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4839. # ancient GNU ld didn't support --whole-archive et. al.
  4840. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  4841. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4842. else
  4843. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4844. fi
  4845. supports_anon_versioning=no
  4846. case `$LD -v 2>/dev/null` in
  4847. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4848. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4849. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4850. *\ 2.11.*) ;; # other 2.11 versions
  4851. *) supports_anon_versioning=yes ;;
  4852. esac
  4853. # See if GNU ld supports shared libraries.
  4854. case $host_os in
  4855. aix3* | aix4* | aix5*)
  4856. # On AIX/PPC, the GNU linker is very broken
  4857. if test "$host_cpu" != ia64; then
  4858. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4859. cat <<EOF 1>&2
  4860. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  4861. *** to be unable to reliably create shared libraries on AIX.
  4862. *** Therefore, libtool is disabling shared libraries support. If you
  4863. *** really care for shared libraries, you may want to modify your PATH
  4864. *** so that a non-GNU linker is found, and then restart.
  4865. EOF
  4866. fi
  4867. ;;
  4868. amigaos*)
  4869. _LT_AC_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)'
  4870. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4871. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4872. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  4873. # that the semantics of dynamic libraries on AmigaOS, at least up
  4874. # to version 4, is to share data among multiple programs linked
  4875. # with the same dynamic library. Since this doesn't match the
  4876. # behavior of shared libraries on other platforms, we can't use
  4877. # them.
  4878. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4879. ;;
  4880. beos*)
  4881. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4882. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4883. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4884. # support --undefined. This deserves some investigation. FIXME
  4885. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4886. else
  4887. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4888. fi
  4889. ;;
  4890. cygwin* | mingw* | pw32*)
  4891. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4892. # as there is no search path for DLLs.
  4893. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4894. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4895. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4896. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4897. _LT_AC_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'
  4898. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  4899. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4900. # If the export-symbols file already is a .def file (1st line
  4901. # is EXPORTS), use it as is; otherwise, prepend...
  4902. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4903. cp $export_symbols $output_objdir/$soname.def;
  4904. else
  4905. echo EXPORTS > $output_objdir/$soname.def;
  4906. cat $export_symbols >> $output_objdir/$soname.def;
  4907. fi~
  4908. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4909. else
  4910. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4911. fi
  4912. ;;
  4913. interix3*)
  4914. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4915. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4916. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4917. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4918. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4919. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4920. # default) and relocated if they conflict, which is a slow very memory
  4921. # consuming and fragmenting process. To avoid this, we pick a random,
  4922. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4923. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4924. _LT_AC_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'
  4925. _LT_AC_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'
  4926. ;;
  4927. linux* | k*bsd*-gnu)
  4928. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4929. tmp_addflag=
  4930. case $cc_basename,$host_cpu in
  4931. pgcc*) # Portland Group C compiler
  4932. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  4933. tmp_addflag=' $pic_flag'
  4934. ;;
  4935. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  4936. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  4937. tmp_addflag=' $pic_flag -Mnomain' ;;
  4938. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4939. tmp_addflag=' -i_dynamic' ;;
  4940. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4941. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4942. ifc* | ifort*) # Intel Fortran compiler
  4943. tmp_addflag=' -nofor_main' ;;
  4944. esac
  4945. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4946. if test $supports_anon_versioning = yes; then
  4947. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  4948. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4949. $echo "local: *; };" >> $output_objdir/$libname.ver~
  4950. $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4951. fi
  4952. _LT_AC_TAGVAR(link_all_deplibs, $1)=no
  4953. else
  4954. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4955. fi
  4956. ;;
  4957. netbsd* | netbsdelf*-gnu)
  4958. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4959. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4960. wlarc=
  4961. else
  4962. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4963. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4964. fi
  4965. ;;
  4966. solaris*)
  4967. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  4968. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4969. cat <<EOF 1>&2
  4970. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4971. *** create shared libraries on Solaris systems. Therefore, libtool
  4972. *** is disabling shared libraries support. We urge you to upgrade GNU
  4973. *** binutils to release 2.9.1 or newer. Another option is to modify
  4974. *** your PATH or compiler configuration so that the native linker is
  4975. *** used, and then restart.
  4976. EOF
  4977. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4978. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4979. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4980. else
  4981. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4982. fi
  4983. ;;
  4984. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4985. case `$LD -v 2>&1` in
  4986. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4987. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4988. cat <<_LT_EOF 1>&2
  4989. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4990. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4991. *** is disabling shared libraries support. We urge you to upgrade GNU
  4992. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4993. *** your PATH or compiler configuration so that the native linker is
  4994. *** used, and then restart.
  4995. _LT_EOF
  4996. ;;
  4997. *)
  4998. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4999. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
  5000. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
  5001. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
  5002. else
  5003. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5004. fi
  5005. ;;
  5006. esac
  5007. ;;
  5008. sunos4*)
  5009. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5010. wlarc=
  5011. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5012. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5013. ;;
  5014. *)
  5015. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5016. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5017. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5018. else
  5019. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5020. fi
  5021. ;;
  5022. esac
  5023. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  5024. runpath_var=
  5025. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5026. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  5027. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5028. fi
  5029. else
  5030. # PORTME fill in a description of your system's linker (not GNU ld)
  5031. case $host_os in
  5032. aix3*)
  5033. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5034. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5035. _LT_AC_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'
  5036. # Note: this linker hardcodes the directories in LIBPATH if there
  5037. # are no directories specified by -L.
  5038. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5039. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5040. # Neither direct hardcoding nor static linking is supported with a
  5041. # broken collect2.
  5042. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5043. fi
  5044. ;;
  5045. aix4* | aix5*)
  5046. if test "$host_cpu" = ia64; then
  5047. # On IA64, the linker does run time linking by default, so we don't
  5048. # have to do anything special.
  5049. aix_use_runtimelinking=no
  5050. exp_sym_flag='-Bexport'
  5051. no_entry_flag=""
  5052. else
  5053. # If we're using GNU nm, then we don't want the "-C" option.
  5054. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5055. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  5056. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  5057. else
  5058. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  5059. fi
  5060. aix_use_runtimelinking=no
  5061. # Test if we are trying to use run time linking or normal
  5062. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5063. # need to do runtime linking.
  5064. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  5065. for ld_flag in $LDFLAGS; do
  5066. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5067. aix_use_runtimelinking=yes
  5068. break
  5069. fi
  5070. done
  5071. ;;
  5072. esac
  5073. exp_sym_flag='-bexport'
  5074. no_entry_flag='-bnoentry'
  5075. fi
  5076. # When large executables or shared objects are built, AIX ld can
  5077. # have problems creating the table of contents. If linking a library
  5078. # or program results in "error TOC overflow" add -mminimal-toc to
  5079. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5080. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5081. _LT_AC_TAGVAR(archive_cmds, $1)=''
  5082. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5083. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5084. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5085. if test "$GCC" = yes; then
  5086. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5087. # We only want to do this on AIX 4.2 and lower, the check
  5088. # below for broken collect2 doesn't work under 4.3+
  5089. collect2name=`${CC} -print-prog-name=collect2`
  5090. if test -f "$collect2name" && \
  5091. strings "$collect2name" | grep resolve_lib_name >/dev/null
  5092. then
  5093. # We have reworked collect2
  5094. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5095. else
  5096. # We have old collect2
  5097. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5098. # It fails to find uninstalled libraries when the uninstalled
  5099. # path is not listed in the libpath. Setting hardcode_minus_L
  5100. # to unsupported forces relinking
  5101. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5102. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5103. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5104. fi
  5105. ;;
  5106. esac
  5107. shared_flag='-shared'
  5108. if test "$aix_use_runtimelinking" = yes; then
  5109. shared_flag="$shared_flag "'${wl}-G'
  5110. fi
  5111. else
  5112. # not using gcc
  5113. if test "$host_cpu" = ia64; then
  5114. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5115. # chokes on -Wl,-G. The following line is correct:
  5116. shared_flag='-G'
  5117. else
  5118. if test "$aix_use_runtimelinking" = yes; then
  5119. shared_flag='${wl}-G'
  5120. else
  5121. shared_flag='${wl}-bM:SRE'
  5122. fi
  5123. fi
  5124. fi
  5125. # It seems that -bexpall does not export symbols beginning with
  5126. # underscore (_), so it is better to generate a list of symbols to export.
  5127. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5128. if test "$aix_use_runtimelinking" = yes; then
  5129. # Warning - without using the other runtime loading flags (-brtl),
  5130. # -berok will link without error, but may produce a broken library.
  5131. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  5132. # Determine the default libpath from the value encoded in an empty executable.
  5133. _LT_AC_SYS_LIBPATH_AIX
  5134. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5135. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5136. else
  5137. if test "$host_cpu" = ia64; then
  5138. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5139. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5140. _LT_AC_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"
  5141. else
  5142. # Determine the default libpath from the value encoded in an empty executable.
  5143. _LT_AC_SYS_LIBPATH_AIX
  5144. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5145. # Warning - without using the other run time loading flags,
  5146. # -berok will link without error, but may produce a broken library.
  5147. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5148. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5149. # Exported symbols can be pulled into shared objects from archives
  5150. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5151. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5152. # This is similar to how AIX traditionally builds its shared libraries.
  5153. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5154. fi
  5155. fi
  5156. ;;
  5157. amigaos*)
  5158. _LT_AC_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)'
  5159. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5160. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5161. # see comment about different semantics on the GNU ld section
  5162. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5163. ;;
  5164. bsdi[[45]]*)
  5165. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5166. ;;
  5167. cygwin* | mingw* | pw32*)
  5168. # When not using gcc, we currently assume that we are using
  5169. # Microsoft Visual C++.
  5170. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5171. # no search path for DLLs.
  5172. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5173. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5174. # Tell ltmain to make .lib files, not .a files.
  5175. libext=lib
  5176. # Tell ltmain to make .dll files, not .so files.
  5177. shrext_cmds=".dll"
  5178. # FIXME: Setting linknames here is a bad hack.
  5179. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  5180. # The linker will automatically build a .lib file if we build a DLL.
  5181. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  5182. # FIXME: Should let the user specify the lib program.
  5183. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  5184. _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  5185. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5186. ;;
  5187. darwin* | rhapsody*)
  5188. case $host_os in
  5189. rhapsody* | darwin1.[[012]])
  5190. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  5191. ;;
  5192. *) # Darwin 1.3 on
  5193. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  5194. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5195. else
  5196. case ${MACOSX_DEPLOYMENT_TARGET} in
  5197. 10.[[012]])
  5198. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
  5199. ;;
  5200. 10.*)
  5201. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
  5202. ;;
  5203. esac
  5204. fi
  5205. ;;
  5206. esac
  5207. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5208. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5209. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  5210. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5211. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
  5212. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5213. if test "$GCC" = yes ; then
  5214. output_verbose_link_cmd='echo'
  5215. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5216. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5217. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  5218. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5219. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5220. else
  5221. case $cc_basename in
  5222. xlc*)
  5223. output_verbose_link_cmd='echo'
  5224. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  5225. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5226. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  5227. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5228. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  5229. ;;
  5230. *)
  5231. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5232. ;;
  5233. esac
  5234. fi
  5235. ;;
  5236. dgux*)
  5237. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5238. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5239. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5240. ;;
  5241. freebsd1*)
  5242. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5243. ;;
  5244. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5245. # support. Future versions do this automatically, but an explicit c++rt0.o
  5246. # does not break anything, and helps significantly (at the cost of a little
  5247. # extra space).
  5248. freebsd2.2*)
  5249. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5250. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5251. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5252. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5253. ;;
  5254. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5255. freebsd2*)
  5256. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5257. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5258. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5259. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5260. ;;
  5261. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5262. freebsd* | dragonfly*)
  5263. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5264. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5265. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5266. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5267. ;;
  5268. hpux9*)
  5269. if test "$GCC" = yes; then
  5270. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5271. else
  5272. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5273. fi
  5274. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5275. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5276. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5277. # hardcode_minus_L: Not really in the search PATH,
  5278. # but as the default location of the library.
  5279. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5280. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5281. ;;
  5282. hpux10*)
  5283. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5284. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5285. else
  5286. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5287. fi
  5288. if test "$with_gnu_ld" = no; then
  5289. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5290. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5291. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5292. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5293. # hardcode_minus_L: Not really in the search PATH,
  5294. # but as the default location of the library.
  5295. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5296. fi
  5297. ;;
  5298. hpux11*)
  5299. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5300. case $host_cpu in
  5301. hppa*64*)
  5302. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5303. ;;
  5304. ia64*)
  5305. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5306. ;;
  5307. *)
  5308. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5309. ;;
  5310. esac
  5311. else
  5312. case $host_cpu in
  5313. hppa*64*)
  5314. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5315. ;;
  5316. ia64*)
  5317. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5318. ;;
  5319. *)
  5320. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5321. ;;
  5322. esac
  5323. fi
  5324. if test "$with_gnu_ld" = no; then
  5325. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5326. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5327. case $host_cpu in
  5328. hppa*64*|ia64*)
  5329. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5330. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5331. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5332. ;;
  5333. *)
  5334. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5335. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5336. # hardcode_minus_L: Not really in the search PATH,
  5337. # but as the default location of the library.
  5338. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5339. ;;
  5340. esac
  5341. fi
  5342. ;;
  5343. irix5* | irix6* | nonstopux*)
  5344. if test "$GCC" = yes; then
  5345. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5346. else
  5347. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5348. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  5349. fi
  5350. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5351. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5352. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5353. ;;
  5354. netbsd* | netbsdelf*-gnu)
  5355. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5356. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5357. else
  5358. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5359. fi
  5360. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5361. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5362. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5363. ;;
  5364. newsos6)
  5365. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5366. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5367. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5368. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5369. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5370. ;;
  5371. openbsd*)
  5372. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5373. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5374. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5375. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5376. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5377. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5378. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5379. else
  5380. case $host_os in
  5381. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5382. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5383. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5384. ;;
  5385. *)
  5386. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5387. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5388. ;;
  5389. esac
  5390. fi
  5391. ;;
  5392. os2*)
  5393. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5394. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5395. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5396. _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  5397. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5398. ;;
  5399. osf3*)
  5400. if test "$GCC" = yes; then
  5401. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5402. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5403. else
  5404. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5405. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5406. fi
  5407. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5408. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5409. ;;
  5410. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5411. if test "$GCC" = yes; then
  5412. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5413. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5414. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5415. else
  5416. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5417. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5418. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  5419. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  5420. # Both c and cxx compiler support -rpath directly
  5421. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5422. fi
  5423. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5424. ;;
  5425. solaris*)
  5426. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5427. if test "$GCC" = yes; then
  5428. wlarc='${wl}'
  5429. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5430. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5431. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5432. else
  5433. wlarc=''
  5434. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5435. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5436. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5437. fi
  5438. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5439. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5440. case $host_os in
  5441. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5442. *)
  5443. # The compiler driver will combine linker options so we
  5444. # cannot just pass the convience library names through
  5445. # without $wl, iff we do not link with $LD.
  5446. # Luckily, gcc supports the same syntax we need for Sun Studio.
  5447. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5448. case $wlarc in
  5449. '')
  5450. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  5451. *)
  5452. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
  5453. esac ;;
  5454. esac
  5455. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5456. ;;
  5457. sunos4*)
  5458. if test "x$host_vendor" = xsequent; then
  5459. # Use $CC to link under sequent, because it throws in some extra .o
  5460. # files that make .init and .fini sections work.
  5461. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5462. else
  5463. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5464. fi
  5465. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5466. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5467. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5468. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5469. ;;
  5470. sysv4)
  5471. case $host_vendor in
  5472. sni)
  5473. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5474. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5475. ;;
  5476. siemens)
  5477. ## LD is ld it makes a PLAMLIB
  5478. ## CC just makes a GrossModule.
  5479. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5480. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5481. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5482. ;;
  5483. motorola)
  5484. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5485. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5486. ;;
  5487. esac
  5488. runpath_var='LD_RUN_PATH'
  5489. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5490. ;;
  5491. sysv4.3*)
  5492. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5493. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5494. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5495. ;;
  5496. sysv4*MP*)
  5497. if test -d /usr/nec; then
  5498. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5499. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5500. runpath_var=LD_RUN_PATH
  5501. hardcode_runpath_var=yes
  5502. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5503. fi
  5504. ;;
  5505. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
  5506. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5507. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5508. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5509. runpath_var='LD_RUN_PATH'
  5510. if test "$GCC" = yes; then
  5511. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5512. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5513. else
  5514. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5515. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5516. fi
  5517. ;;
  5518. sysv5* | sco3.2v5* | sco5v6*)
  5519. # Note: We can NOT use -z defs as we might desire, because we do not
  5520. # link with -lc, and that would cause any symbols used from libc to
  5521. # always be unresolved, which means just about no library would
  5522. # ever link correctly. If we're not using GNU ld we use -z text
  5523. # though, which does catch some bad symbols but isn't as heavy-handed
  5524. # as -z defs.
  5525. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5526. _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5527. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5528. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5529. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  5530. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5531. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5532. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5533. runpath_var='LD_RUN_PATH'
  5534. if test "$GCC" = yes; then
  5535. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5536. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5537. else
  5538. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5539. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5540. fi
  5541. ;;
  5542. uts4*)
  5543. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5544. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5545. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5546. ;;
  5547. *)
  5548. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5549. ;;
  5550. esac
  5551. fi
  5552. ])
  5553. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5554. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5555. #
  5556. # Do we need to explicitly link libc?
  5557. #
  5558. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5559. x|xyes)
  5560. # Assume -lc should be added
  5561. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5562. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5563. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  5564. *'~'*)
  5565. # FIXME: we may have to deal with multi-command sequences.
  5566. ;;
  5567. '$CC '*)
  5568. # Test whether the compiler implicitly links with -lc since on some
  5569. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5570. # to ld, don't add -lc before -lgcc.
  5571. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5572. $rm conftest*
  5573. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5574. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5575. soname=conftest
  5576. lib=conftest
  5577. libobjs=conftest.$ac_objext
  5578. deplibs=
  5579. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  5580. pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  5581. compiler_flags=-v
  5582. linker_flags=-v
  5583. verstring=
  5584. output_objdir=.
  5585. libname=conftest
  5586. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5587. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5588. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  5589. then
  5590. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5591. else
  5592. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5593. fi
  5594. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5595. else
  5596. cat conftest.err 1>&5
  5597. fi
  5598. $rm conftest*
  5599. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  5600. ;;
  5601. esac
  5602. fi
  5603. ;;
  5604. esac
  5605. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  5606. # _LT_AC_FILE_LTDLL_C
  5607. # -------------------
  5608. # Be careful that the start marker always follows a newline.
  5609. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  5610. # /* ltdll.c starts here */
  5611. # #define WIN32_LEAN_AND_MEAN
  5612. # #include <windows.h>
  5613. # #undef WIN32_LEAN_AND_MEAN
  5614. # #include <stdio.h>
  5615. #
  5616. # #ifndef __CYGWIN__
  5617. # # ifdef __CYGWIN32__
  5618. # # define __CYGWIN__ __CYGWIN32__
  5619. # # endif
  5620. # #endif
  5621. #
  5622. # #ifdef __cplusplus
  5623. # extern "C" {
  5624. # #endif
  5625. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5626. # #ifdef __cplusplus
  5627. # }
  5628. # #endif
  5629. #
  5630. # #ifdef __CYGWIN__
  5631. # #include <cygwin/cygwin_dll.h>
  5632. # DECLARE_CYGWIN_DLL( DllMain );
  5633. # #endif
  5634. # HINSTANCE __hDllInstance_base;
  5635. #
  5636. # BOOL APIENTRY
  5637. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  5638. # {
  5639. # __hDllInstance_base = hInst;
  5640. # return TRUE;
  5641. # }
  5642. # /* ltdll.c ends here */
  5643. ])# _LT_AC_FILE_LTDLL_C
  5644. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  5645. # ---------------------------------
  5646. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  5647. # old names
  5648. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  5649. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  5650. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  5651. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  5652. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  5653. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  5654. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  5655. # This is just to silence aclocal about the macro not being used
  5656. ifelse([AC_DISABLE_FAST_INSTALL])
  5657. AC_DEFUN([LT_AC_PROG_GCJ],
  5658. [AC_CHECK_TOOL(GCJ, gcj, no)
  5659. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  5660. AC_SUBST(GCJFLAGS)
  5661. ])
  5662. AC_DEFUN([LT_AC_PROG_RC],
  5663. [AC_CHECK_TOOL(RC, windres, no)
  5664. ])
  5665. # NOTE: This macro has been submitted for inclusion into #
  5666. # GNU Autoconf as AC_PROG_SED. When it is available in #
  5667. # a released version of Autoconf we should remove this #
  5668. # macro and use it instead. #
  5669. # LT_AC_PROG_SED
  5670. # --------------
  5671. # Check for a fully-functional sed program, that truncates
  5672. # as few characters as possible. Prefer GNU sed if found.
  5673. AC_DEFUN([LT_AC_PROG_SED],
  5674. [AC_MSG_CHECKING([for a sed that does not truncate output])
  5675. AC_CACHE_VAL(lt_cv_path_SED,
  5676. [# Loop through the user's path and test for sed and gsed.
  5677. # Then use that list of sed's as ones to test for truncation.
  5678. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5679. for as_dir in $PATH
  5680. do
  5681. IFS=$as_save_IFS
  5682. test -z "$as_dir" && as_dir=.
  5683. for lt_ac_prog in sed gsed; do
  5684. for ac_exec_ext in '' $ac_executable_extensions; do
  5685. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  5686. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  5687. fi
  5688. done
  5689. done
  5690. done
  5691. lt_ac_max=0
  5692. lt_ac_count=0
  5693. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5694. # along with /bin/sed that truncates output.
  5695. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5696. test ! -f $lt_ac_sed && continue
  5697. cat /dev/null > conftest.in
  5698. lt_ac_count=0
  5699. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5700. # Check for GNU sed and select it if it is found.
  5701. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5702. lt_cv_path_SED=$lt_ac_sed
  5703. break
  5704. fi
  5705. while true; do
  5706. cat conftest.in conftest.in >conftest.tmp
  5707. mv conftest.tmp conftest.in
  5708. cp conftest.in conftest.nl
  5709. echo >>conftest.nl
  5710. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  5711. cmp -s conftest.out conftest.nl || break
  5712. # 10000 chars as input seems more than enough
  5713. test $lt_ac_count -gt 10 && break
  5714. lt_ac_count=`expr $lt_ac_count + 1`
  5715. if test $lt_ac_count -gt $lt_ac_max; then
  5716. lt_ac_max=$lt_ac_count
  5717. lt_cv_path_SED=$lt_ac_sed
  5718. fi
  5719. done
  5720. done
  5721. ])
  5722. SED=$lt_cv_path_SED
  5723. AC_MSG_RESULT([$SED])
  5724. ])
  5725. # Configure paths for LIBXML2
  5726. # Mike Hommey 2004-06-19
  5727. # use CPPFLAGS instead of CFLAGS
  5728. # Toshio Kuratomi 2001-04-21
  5729. # Adapted from:
  5730. # Configure paths for GLIB
  5731. # Owen Taylor 97-11-3
  5732. dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  5733. dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
  5734. dnl
  5735. AC_DEFUN([AM_PATH_XML2],[
  5736. AC_ARG_WITH(xml-prefix,
  5737. [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
  5738. xml_config_prefix="$withval", xml_config_prefix="")
  5739. AC_ARG_WITH(xml-exec-prefix,
  5740. [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
  5741. xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
  5742. AC_ARG_ENABLE(xmltest,
  5743. [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
  5744. enable_xmltest=yes)
  5745. if test x$xml_config_exec_prefix != x ; then
  5746. xml_config_args="$xml_config_args"
  5747. if test x${XML2_CONFIG+set} != xset ; then
  5748. XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
  5749. fi
  5750. fi
  5751. if test x$xml_config_prefix != x ; then
  5752. xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
  5753. if test x${XML2_CONFIG+set} != xset ; then
  5754. XML2_CONFIG=$xml_config_prefix/bin/xml2-config
  5755. fi
  5756. fi
  5757. AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
  5758. min_xml_version=ifelse([$1], ,2.0.0,[$1])
  5759. AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
  5760. no_xml=""
  5761. if test "$XML2_CONFIG" = "no" ; then
  5762. no_xml=yes
  5763. else
  5764. XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
  5765. XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
  5766. xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
  5767. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  5768. xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
  5769. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  5770. xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
  5771. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  5772. if test "x$enable_xmltest" = "xyes" ; then
  5773. ac_save_CPPFLAGS="$CPPFLAGS"
  5774. ac_save_LIBS="$LIBS"
  5775. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  5776. LIBS="$XML_LIBS $LIBS"
  5777. dnl
  5778. dnl Now check if the installed libxml is sufficiently new.
  5779. dnl (Also sanity checks the results of xml2-config to some extent)
  5780. dnl
  5781. rm -f conf.xmltest
  5782. AC_TRY_RUN([
  5783. #include <stdlib.h>
  5784. #include <stdio.h>
  5785. #include <string.h>
  5786. #include <libxml/xmlversion.h>
  5787. int
  5788. main()
  5789. {
  5790. int xml_major_version, xml_minor_version, xml_micro_version;
  5791. int major, minor, micro;
  5792. char *tmp_version;
  5793. system("touch conf.xmltest");
  5794. /* Capture xml2-config output via autoconf/configure variables */
  5795. /* HP/UX 9 (%@#!) writes to sscanf strings */
  5796. tmp_version = (char *)strdup("$min_xml_version");
  5797. if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  5798. printf("%s, bad version string from xml2-config\n", "$min_xml_version");
  5799. exit(1);
  5800. }
  5801. free(tmp_version);
  5802. /* Capture the version information from the header files */
  5803. tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
  5804. if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
  5805. printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
  5806. exit(1);
  5807. }
  5808. free(tmp_version);
  5809. /* Compare xml2-config output to the libxml headers */
  5810. if ((xml_major_version != $xml_config_major_version) ||
  5811. (xml_minor_version != $xml_config_minor_version) ||
  5812. (xml_micro_version != $xml_config_micro_version))
  5813. {
  5814. printf("*** libxml header files (version %d.%d.%d) do not match\n",
  5815. xml_major_version, xml_minor_version, xml_micro_version);
  5816. printf("*** xml2-config (version %d.%d.%d)\n",
  5817. $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
  5818. return 1;
  5819. }
  5820. /* Compare the headers to the library to make sure we match */
  5821. /* Less than ideal -- doesn't provide us with return value feedback,
  5822. * only exits if there's a serious mismatch between header and library.
  5823. */
  5824. LIBXML_TEST_VERSION;
  5825. /* Test that the library is greater than our minimum version */
  5826. if ((xml_major_version > major) ||
  5827. ((xml_major_version == major) && (xml_minor_version > minor)) ||
  5828. ((xml_major_version == major) && (xml_minor_version == minor) &&
  5829. (xml_micro_version >= micro)))
  5830. {
  5831. return 0;
  5832. }
  5833. else
  5834. {
  5835. printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
  5836. xml_major_version, xml_minor_version, xml_micro_version);
  5837. printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
  5838. major, minor, micro);
  5839. printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
  5840. printf("***\n");
  5841. printf("*** If you have already installed a sufficiently new version, this error\n");
  5842. printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
  5843. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  5844. printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
  5845. printf("*** correct copy of xml2-config. (In this case, you will have to\n");
  5846. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  5847. printf("*** so that the correct libraries are found at run-time))\n");
  5848. }
  5849. return 1;
  5850. }
  5851. ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  5852. CPPFLAGS="$ac_save_CPPFLAGS"
  5853. LIBS="$ac_save_LIBS"
  5854. fi
  5855. fi
  5856. if test "x$no_xml" = x ; then
  5857. AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
  5858. ifelse([$2], , :, [$2])
  5859. else
  5860. AC_MSG_RESULT(no)
  5861. if test "$XML2_CONFIG" = "no" ; then
  5862. echo "*** The xml2-config script installed by LIBXML could not be found"
  5863. echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
  5864. echo "*** your path, or set the XML2_CONFIG environment variable to the"
  5865. echo "*** full path to xml2-config."
  5866. else
  5867. if test -f conf.xmltest ; then
  5868. :
  5869. else
  5870. echo "*** Could not run libxml test program, checking why..."
  5871. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  5872. LIBS="$LIBS $XML_LIBS"
  5873. AC_TRY_LINK([
  5874. #include <libxml/xmlversion.h>
  5875. #include <stdio.h>
  5876. ], [ LIBXML_TEST_VERSION; return 0;],
  5877. [ echo "*** The test program compiled, but did not run. This usually means"
  5878. echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
  5879. echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
  5880. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  5881. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  5882. echo "*** is required on your system"
  5883. echo "***"
  5884. echo "*** If you have an old version installed, it is best to remove it, although"
  5885. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  5886. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  5887. echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
  5888. echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
  5889. echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
  5890. CPPFLAGS="$ac_save_CPPFLAGS"
  5891. LIBS="$ac_save_LIBS"
  5892. fi
  5893. fi
  5894. XML_CPPFLAGS=""
  5895. XML_LIBS=""
  5896. ifelse([$3], , :, [$3])
  5897. fi
  5898. AC_SUBST(XML_CPPFLAGS)
  5899. AC_SUBST(XML_LIBS)
  5900. rm -f conf.xmltest
  5901. ])
  5902. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  5903. #
  5904. # This file is free software; the Free Software Foundation
  5905. # gives unlimited permission to copy and/or distribute it,
  5906. # with or without modifications, as long as this notice is preserved.
  5907. # AM_AUTOMAKE_VERSION(VERSION)
  5908. # ----------------------------
  5909. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  5910. # generated from the m4 files accompanying Automake X.Y.
  5911. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
  5912. # AM_SET_CURRENT_AUTOMAKE_VERSION
  5913. # -------------------------------
  5914. # Call AM_AUTOMAKE_VERSION so it can be traced.
  5915. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  5916. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  5917. [AM_AUTOMAKE_VERSION([1.9.6])])
  5918. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  5919. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  5920. #
  5921. # This file is free software; the Free Software Foundation
  5922. # gives unlimited permission to copy and/or distribute it,
  5923. # with or without modifications, as long as this notice is preserved.
  5924. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  5925. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  5926. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  5927. #
  5928. # Of course, Automake must honor this variable whenever it calls a
  5929. # tool from the auxiliary directory. The problem is that $srcdir (and
  5930. # therefore $ac_aux_dir as well) can be either absolute or relative,
  5931. # depending on how configure is run. This is pretty annoying, since
  5932. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  5933. # source directory, any form will work fine, but in subdirectories a
  5934. # relative path needs to be adjusted first.
  5935. #
  5936. # $ac_aux_dir/missing
  5937. # fails when called from a subdirectory if $ac_aux_dir is relative
  5938. # $top_srcdir/$ac_aux_dir/missing
  5939. # fails if $ac_aux_dir is absolute,
  5940. # fails when called from a subdirectory in a VPATH build with
  5941. # a relative $ac_aux_dir
  5942. #
  5943. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  5944. # are both prefixed by $srcdir. In an in-source build this is usually
  5945. # harmless because $srcdir is `.', but things will broke when you
  5946. # start a VPATH build or use an absolute $srcdir.
  5947. #
  5948. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  5949. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  5950. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  5951. # and then we would define $MISSING as
  5952. # MISSING="\${SHELL} $am_aux_dir/missing"
  5953. # This will work as long as MISSING is not called from configure, because
  5954. # unfortunately $(top_srcdir) has no meaning in configure.
  5955. # However there are other variables, like CC, which are often used in
  5956. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  5957. #
  5958. # Another solution, used here, is to always expand $ac_aux_dir to an
  5959. # absolute PATH. The drawback is that using absolute paths prevent a
  5960. # configured tree to be moved without reconfiguration.
  5961. AC_DEFUN([AM_AUX_DIR_EXPAND],
  5962. [dnl Rely on autoconf to set up CDPATH properly.
  5963. AC_PREREQ([2.50])dnl
  5964. # expand $ac_aux_dir to an absolute path
  5965. am_aux_dir=`cd $ac_aux_dir && pwd`
  5966. ])
  5967. # AM_CONDITIONAL -*- Autoconf -*-
  5968. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
  5969. # Free Software Foundation, Inc.
  5970. #
  5971. # This file is free software; the Free Software Foundation
  5972. # gives unlimited permission to copy and/or distribute it,
  5973. # with or without modifications, as long as this notice is preserved.
  5974. # serial 7
  5975. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  5976. # -------------------------------------
  5977. # Define a conditional.
  5978. AC_DEFUN([AM_CONDITIONAL],
  5979. [AC_PREREQ(2.52)dnl
  5980. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  5981. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  5982. AC_SUBST([$1_TRUE])
  5983. AC_SUBST([$1_FALSE])
  5984. if $2; then
  5985. $1_TRUE=
  5986. $1_FALSE='#'
  5987. else
  5988. $1_TRUE='#'
  5989. $1_FALSE=
  5990. fi
  5991. AC_CONFIG_COMMANDS_PRE(
  5992. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  5993. AC_MSG_ERROR([[conditional "$1" was never defined.
  5994. Usually this means the macro was only invoked conditionally.]])
  5995. fi])])
  5996. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  5997. # Free Software Foundation, Inc.
  5998. #
  5999. # This file is free software; the Free Software Foundation
  6000. # gives unlimited permission to copy and/or distribute it,
  6001. # with or without modifications, as long as this notice is preserved.
  6002. # serial 8
  6003. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  6004. # written in clear, in which case automake, when reading aclocal.m4,
  6005. # will think it sees a *use*, and therefore will trigger all it's
  6006. # C support machinery. Also note that it means that autoscan, seeing
  6007. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  6008. # _AM_DEPENDENCIES(NAME)
  6009. # ----------------------
  6010. # See how the compiler implements dependency checking.
  6011. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  6012. # We try a few techniques and use that to set a single cache variable.
  6013. #
  6014. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  6015. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  6016. # dependency, and given that the user is not expected to run this macro,
  6017. # just rely on AC_PROG_CC.
  6018. AC_DEFUN([_AM_DEPENDENCIES],
  6019. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  6020. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  6021. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  6022. AC_REQUIRE([AM_DEP_TRACK])dnl
  6023. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  6024. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  6025. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  6026. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  6027. [depcc="$$1" am_compiler_list=])
  6028. AC_CACHE_CHECK([dependency style of $depcc],
  6029. [am_cv_$1_dependencies_compiler_type],
  6030. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  6031. # We make a subdir and do the tests there. Otherwise we can end up
  6032. # making bogus files that we don't know about and never remove. For
  6033. # instance it was reported that on HP-UX the gcc test will end up
  6034. # making a dummy file named `D' -- because `-MD' means `put the output
  6035. # in D'.
  6036. mkdir conftest.dir
  6037. # Copy depcomp to subdir because otherwise we won't find it if we're
  6038. # using a relative directory.
  6039. cp "$am_depcomp" conftest.dir
  6040. cd conftest.dir
  6041. # We will build objects and dependencies in a subdirectory because
  6042. # it helps to detect inapplicable dependency modes. For instance
  6043. # both Tru64's cc and ICC support -MD to output dependencies as a
  6044. # side effect of compilation, but ICC will put the dependencies in
  6045. # the current directory while Tru64 will put them in the object
  6046. # directory.
  6047. mkdir sub
  6048. am_cv_$1_dependencies_compiler_type=none
  6049. if test "$am_compiler_list" = ""; then
  6050. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  6051. fi
  6052. for depmode in $am_compiler_list; do
  6053. # Setup a source with many dependencies, because some compilers
  6054. # like to wrap large dependency lists on column 80 (with \), and
  6055. # we should not choose a depcomp mode which is confused by this.
  6056. #
  6057. # We need to recreate these files for each test, as the compiler may
  6058. # overwrite some of them when testing with obscure command lines.
  6059. # This happens at least with the AIX C compiler.
  6060. : > sub/conftest.c
  6061. for i in 1 2 3 4 5 6; do
  6062. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  6063. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  6064. # Solaris 8's {/usr,}/bin/sh.
  6065. touch sub/conftst$i.h
  6066. done
  6067. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  6068. case $depmode in
  6069. nosideeffect)
  6070. # after this tag, mechanisms are not by side-effect, so they'll
  6071. # only be used when explicitly requested
  6072. if test "x$enable_dependency_tracking" = xyes; then
  6073. continue
  6074. else
  6075. break
  6076. fi
  6077. ;;
  6078. none) break ;;
  6079. esac
  6080. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  6081. # mode. It turns out that the SunPro C++ compiler does not properly
  6082. # handle `-M -o', and we need to detect this.
  6083. if depmode=$depmode \
  6084. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  6085. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  6086. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  6087. >/dev/null 2>conftest.err &&
  6088. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  6089. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  6090. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  6091. # icc doesn't choke on unknown options, it will just issue warnings
  6092. # or remarks (even with -Werror). So we grep stderr for any message
  6093. # that says an option was ignored or not supported.
  6094. # When given -MP, icc 7.0 and 7.1 complain thusly:
  6095. # icc: Command line warning: ignoring option '-M'; no argument required
  6096. # The diagnosis changed in icc 8.0:
  6097. # icc: Command line remark: option '-MP' not supported
  6098. if (grep 'ignoring option' conftest.err ||
  6099. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  6100. am_cv_$1_dependencies_compiler_type=$depmode
  6101. break
  6102. fi
  6103. fi
  6104. done
  6105. cd ..
  6106. rm -rf conftest.dir
  6107. else
  6108. am_cv_$1_dependencies_compiler_type=none
  6109. fi
  6110. ])
  6111. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  6112. AM_CONDITIONAL([am__fastdep$1], [
  6113. test "x$enable_dependency_tracking" != xno \
  6114. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  6115. ])
  6116. # AM_SET_DEPDIR
  6117. # -------------
  6118. # Choose a directory name for dependency files.
  6119. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  6120. AC_DEFUN([AM_SET_DEPDIR],
  6121. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  6122. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  6123. ])
  6124. # AM_DEP_TRACK
  6125. # ------------
  6126. AC_DEFUN([AM_DEP_TRACK],
  6127. [AC_ARG_ENABLE(dependency-tracking,
  6128. [ --disable-dependency-tracking speeds up one-time build
  6129. --enable-dependency-tracking do not reject slow dependency extractors])
  6130. if test "x$enable_dependency_tracking" != xno; then
  6131. am_depcomp="$ac_aux_dir/depcomp"
  6132. AMDEPBACKSLASH='\'
  6133. fi
  6134. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  6135. AC_SUBST([AMDEPBACKSLASH])
  6136. ])
  6137. # Generate code to set up dependency tracking. -*- Autoconf -*-
  6138. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  6139. # Free Software Foundation, Inc.
  6140. #
  6141. # This file is free software; the Free Software Foundation
  6142. # gives unlimited permission to copy and/or distribute it,
  6143. # with or without modifications, as long as this notice is preserved.
  6144. #serial 3
  6145. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  6146. # ------------------------------
  6147. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  6148. [for mf in $CONFIG_FILES; do
  6149. # Strip MF so we end up with the name of the file.
  6150. mf=`echo "$mf" | sed -e 's/:.*$//'`
  6151. # Check whether this is an Automake generated Makefile or not.
  6152. # We used to match only the files named `Makefile.in', but
  6153. # some people rename them; so instead we look at the file content.
  6154. # Grep'ing the first line is not enough: some people post-process
  6155. # each Makefile.in and add a new line on top of each file to say so.
  6156. # So let's grep whole file.
  6157. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  6158. dirpart=`AS_DIRNAME("$mf")`
  6159. else
  6160. continue
  6161. fi
  6162. # Extract the definition of DEPDIR, am__include, and am__quote
  6163. # from the Makefile without running `make'.
  6164. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  6165. test -z "$DEPDIR" && continue
  6166. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  6167. test -z "am__include" && continue
  6168. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  6169. # When using ansi2knr, U may be empty or an underscore; expand it
  6170. U=`sed -n 's/^U = //p' < "$mf"`
  6171. # Find all dependency output files, they are included files with
  6172. # $(DEPDIR) in their names. We invoke sed twice because it is the
  6173. # simplest approach to changing $(DEPDIR) to its actual value in the
  6174. # expansion.
  6175. for file in `sed -n "
  6176. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  6177. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  6178. # Make sure the directory exists.
  6179. test -f "$dirpart/$file" && continue
  6180. fdir=`AS_DIRNAME(["$file"])`
  6181. AS_MKDIR_P([$dirpart/$fdir])
  6182. # echo "creating $dirpart/$file"
  6183. echo '# dummy' > "$dirpart/$file"
  6184. done
  6185. done
  6186. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  6187. # AM_OUTPUT_DEPENDENCY_COMMANDS
  6188. # -----------------------------
  6189. # This macro should only be invoked once -- use via AC_REQUIRE.
  6190. #
  6191. # This code is only required when automatic dependency tracking
  6192. # is enabled. FIXME. This creates each `.P' file that we will
  6193. # need in order to bootstrap the dependency handling code.
  6194. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  6195. [AC_CONFIG_COMMANDS([depfiles],
  6196. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  6197. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  6198. ])
  6199. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  6200. # Free Software Foundation, Inc.
  6201. #
  6202. # This file is free software; the Free Software Foundation
  6203. # gives unlimited permission to copy and/or distribute it,
  6204. # with or without modifications, as long as this notice is preserved.
  6205. # serial 8
  6206. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  6207. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  6208. # Do all the work for Automake. -*- Autoconf -*-
  6209. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  6210. # Free Software Foundation, Inc.
  6211. #
  6212. # This file is free software; the Free Software Foundation
  6213. # gives unlimited permission to copy and/or distribute it,
  6214. # with or without modifications, as long as this notice is preserved.
  6215. # serial 12
  6216. # This macro actually does too much. Some checks are only needed if
  6217. # your package does certain things. But this isn't really a big deal.
  6218. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  6219. # AM_INIT_AUTOMAKE([OPTIONS])
  6220. # -----------------------------------------------
  6221. # The call with PACKAGE and VERSION arguments is the old style
  6222. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  6223. # and VERSION should now be passed to AC_INIT and removed from
  6224. # the call to AM_INIT_AUTOMAKE.
  6225. # We support both call styles for the transition. After
  6226. # the next Automake release, Autoconf can make the AC_INIT
  6227. # arguments mandatory, and then we can depend on a new Autoconf
  6228. # release and drop the old call support.
  6229. AC_DEFUN([AM_INIT_AUTOMAKE],
  6230. [AC_PREREQ([2.58])dnl
  6231. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  6232. dnl the ones we care about.
  6233. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  6234. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  6235. AC_REQUIRE([AC_PROG_INSTALL])dnl
  6236. # test to see if srcdir already configured
  6237. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  6238. test -f $srcdir/config.status; then
  6239. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  6240. fi
  6241. # test whether we have cygpath
  6242. if test -z "$CYGPATH_W"; then
  6243. if (cygpath --version) >/dev/null 2>/dev/null; then
  6244. CYGPATH_W='cygpath -w'
  6245. else
  6246. CYGPATH_W=echo
  6247. fi
  6248. fi
  6249. AC_SUBST([CYGPATH_W])
  6250. # Define the identity of the package.
  6251. dnl Distinguish between old-style and new-style calls.
  6252. m4_ifval([$2],
  6253. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  6254. AC_SUBST([PACKAGE], [$1])dnl
  6255. AC_SUBST([VERSION], [$2])],
  6256. [_AM_SET_OPTIONS([$1])dnl
  6257. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  6258. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  6259. _AM_IF_OPTION([no-define],,
  6260. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  6261. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  6262. # Some tools Automake needs.
  6263. AC_REQUIRE([AM_SANITY_CHECK])dnl
  6264. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  6265. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  6266. AM_MISSING_PROG(AUTOCONF, autoconf)
  6267. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  6268. AM_MISSING_PROG(AUTOHEADER, autoheader)
  6269. AM_MISSING_PROG(MAKEINFO, makeinfo)
  6270. AM_PROG_INSTALL_SH
  6271. AM_PROG_INSTALL_STRIP
  6272. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  6273. # We need awk for the "check" target. The system "awk" is bad on
  6274. # some platforms.
  6275. AC_REQUIRE([AC_PROG_AWK])dnl
  6276. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  6277. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  6278. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  6279. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  6280. [_AM_PROG_TAR([v7])])])
  6281. _AM_IF_OPTION([no-dependencies],,
  6282. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  6283. [_AM_DEPENDENCIES(CC)],
  6284. [define([AC_PROG_CC],
  6285. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  6286. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  6287. [_AM_DEPENDENCIES(CXX)],
  6288. [define([AC_PROG_CXX],
  6289. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  6290. ])
  6291. ])
  6292. # When config.status generates a header, we must update the stamp-h file.
  6293. # This file resides in the same directory as the config header
  6294. # that is generated. The stamp files are numbered to have different names.
  6295. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  6296. # loop where config.status creates the headers, so we can generate
  6297. # our stamp files there.
  6298. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  6299. [# Compute $1's index in $config_headers.
  6300. _am_stamp_count=1
  6301. for _am_header in $config_headers :; do
  6302. case $_am_header in
  6303. $1 | $1:* )
  6304. break ;;
  6305. * )
  6306. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  6307. esac
  6308. done
  6309. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  6310. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6311. #
  6312. # This file is free software; the Free Software Foundation
  6313. # gives unlimited permission to copy and/or distribute it,
  6314. # with or without modifications, as long as this notice is preserved.
  6315. # AM_PROG_INSTALL_SH
  6316. # ------------------
  6317. # Define $install_sh.
  6318. AC_DEFUN([AM_PROG_INSTALL_SH],
  6319. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6320. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  6321. AC_SUBST(install_sh)])
  6322. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  6323. #
  6324. # This file is free software; the Free Software Foundation
  6325. # gives unlimited permission to copy and/or distribute it,
  6326. # with or without modifications, as long as this notice is preserved.
  6327. # serial 2
  6328. # Check whether the underlying file-system supports filenames
  6329. # with a leading dot. For instance MS-DOS doesn't.
  6330. AC_DEFUN([AM_SET_LEADING_DOT],
  6331. [rm -rf .tst 2>/dev/null
  6332. mkdir .tst 2>/dev/null
  6333. if test -d .tst; then
  6334. am__leading_dot=.
  6335. else
  6336. am__leading_dot=_
  6337. fi
  6338. rmdir .tst 2>/dev/null
  6339. AC_SUBST([am__leading_dot])])
  6340. # Check to see how 'make' treats includes. -*- Autoconf -*-
  6341. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  6342. #
  6343. # This file is free software; the Free Software Foundation
  6344. # gives unlimited permission to copy and/or distribute it,
  6345. # with or without modifications, as long as this notice is preserved.
  6346. # serial 3
  6347. # AM_MAKE_INCLUDE()
  6348. # -----------------
  6349. # Check to see how make treats includes.
  6350. AC_DEFUN([AM_MAKE_INCLUDE],
  6351. [am_make=${MAKE-make}
  6352. cat > confinc << 'END'
  6353. am__doit:
  6354. @echo done
  6355. .PHONY: am__doit
  6356. END
  6357. # If we don't find an include directive, just comment out the code.
  6358. AC_MSG_CHECKING([for style of include used by $am_make])
  6359. am__include="#"
  6360. am__quote=
  6361. _am_result=none
  6362. # First try GNU make style include.
  6363. echo "include confinc" > confmf
  6364. # We grep out `Entering directory' and `Leaving directory'
  6365. # messages which can occur if `w' ends up in MAKEFLAGS.
  6366. # In particular we don't look at `^make:' because GNU make might
  6367. # be invoked under some other name (usually "gmake"), in which
  6368. # case it prints its new name instead of `make'.
  6369. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  6370. am__include=include
  6371. am__quote=
  6372. _am_result=GNU
  6373. fi
  6374. # Now try BSD make style include.
  6375. if test "$am__include" = "#"; then
  6376. echo '.include "confinc"' > confmf
  6377. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  6378. am__include=.include
  6379. am__quote="\""
  6380. _am_result=BSD
  6381. fi
  6382. fi
  6383. AC_SUBST([am__include])
  6384. AC_SUBST([am__quote])
  6385. AC_MSG_RESULT([$_am_result])
  6386. rm -f confinc confmf
  6387. ])
  6388. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  6389. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  6390. # Free Software Foundation, Inc.
  6391. #
  6392. # This file is free software; the Free Software Foundation
  6393. # gives unlimited permission to copy and/or distribute it,
  6394. # with or without modifications, as long as this notice is preserved.
  6395. # serial 4
  6396. # AM_MISSING_PROG(NAME, PROGRAM)
  6397. # ------------------------------
  6398. AC_DEFUN([AM_MISSING_PROG],
  6399. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  6400. $1=${$1-"${am_missing_run}$2"}
  6401. AC_SUBST($1)])
  6402. # AM_MISSING_HAS_RUN
  6403. # ------------------
  6404. # Define MISSING if not defined so far and test if it supports --run.
  6405. # If it does, set am_missing_run to use it, otherwise, to nothing.
  6406. AC_DEFUN([AM_MISSING_HAS_RUN],
  6407. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  6408. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  6409. # Use eval to expand $SHELL
  6410. if eval "$MISSING --run true"; then
  6411. am_missing_run="$MISSING --run "
  6412. else
  6413. am_missing_run=
  6414. AC_MSG_WARN([`missing' script is too old or missing])
  6415. fi
  6416. ])
  6417. # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  6418. #
  6419. # This file is free software; the Free Software Foundation
  6420. # gives unlimited permission to copy and/or distribute it,
  6421. # with or without modifications, as long as this notice is preserved.
  6422. # AM_PROG_MKDIR_P
  6423. # ---------------
  6424. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  6425. #
  6426. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  6427. # created by `make install' are always world readable, even if the
  6428. # installer happens to have an overly restrictive umask (e.g. 077).
  6429. # This was a mistake. There are at least two reasons why we must not
  6430. # use `-m 0755':
  6431. # - it causes special bits like SGID to be ignored,
  6432. # - it may be too restrictive (some setups expect 775 directories).
  6433. #
  6434. # Do not use -m 0755 and let people choose whatever they expect by
  6435. # setting umask.
  6436. #
  6437. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  6438. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  6439. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  6440. # concurrently, both version can detect that a/ is missing, but only
  6441. # one can create it and the other will error out. Consequently we
  6442. # restrict ourselves to GNU make (using the --version option ensures
  6443. # this.)
  6444. AC_DEFUN([AM_PROG_MKDIR_P],
  6445. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  6446. # We used to keeping the `.' as first argument, in order to
  6447. # allow $(mkdir_p) to be used without argument. As in
  6448. # $(mkdir_p) $(somedir)
  6449. # where $(somedir) is conditionally defined. However this is wrong
  6450. # for two reasons:
  6451. # 1. if the package is installed by a user who cannot write `.'
  6452. # make install will fail,
  6453. # 2. the above comment should most certainly read
  6454. # $(mkdir_p) $(DESTDIR)$(somedir)
  6455. # so it does not work when $(somedir) is undefined and
  6456. # $(DESTDIR) is not.
  6457. # To support the latter case, we have to write
  6458. # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  6459. # so the `.' trick is pointless.
  6460. mkdir_p='mkdir -p --'
  6461. else
  6462. # On NextStep and OpenStep, the `mkdir' command does not
  6463. # recognize any option. It will interpret all options as
  6464. # directories to create, and then abort because `.' already
  6465. # exists.
  6466. for d in ./-p ./--version;
  6467. do
  6468. test -d $d && rmdir $d
  6469. done
  6470. # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  6471. if test -f "$ac_aux_dir/mkinstalldirs"; then
  6472. mkdir_p='$(mkinstalldirs)'
  6473. else
  6474. mkdir_p='$(install_sh) -d'
  6475. fi
  6476. fi
  6477. AC_SUBST([mkdir_p])])
  6478. # Helper functions for option handling. -*- Autoconf -*-
  6479. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  6480. #
  6481. # This file is free software; the Free Software Foundation
  6482. # gives unlimited permission to copy and/or distribute it,
  6483. # with or without modifications, as long as this notice is preserved.
  6484. # serial 3
  6485. # _AM_MANGLE_OPTION(NAME)
  6486. # -----------------------
  6487. AC_DEFUN([_AM_MANGLE_OPTION],
  6488. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  6489. # _AM_SET_OPTION(NAME)
  6490. # ------------------------------
  6491. # Set option NAME. Presently that only means defining a flag for this option.
  6492. AC_DEFUN([_AM_SET_OPTION],
  6493. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  6494. # _AM_SET_OPTIONS(OPTIONS)
  6495. # ----------------------------------
  6496. # OPTIONS is a space-separated list of Automake options.
  6497. AC_DEFUN([_AM_SET_OPTIONS],
  6498. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  6499. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  6500. # -------------------------------------------
  6501. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  6502. AC_DEFUN([_AM_IF_OPTION],
  6503. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  6504. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  6505. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  6506. # Free Software Foundation, Inc.
  6507. #
  6508. # This file is free software; the Free Software Foundation
  6509. # gives unlimited permission to copy and/or distribute it,
  6510. # with or without modifications, as long as this notice is preserved.
  6511. # serial 4
  6512. # AM_SANITY_CHECK
  6513. # ---------------
  6514. AC_DEFUN([AM_SANITY_CHECK],
  6515. [AC_MSG_CHECKING([whether build environment is sane])
  6516. # Just in case
  6517. sleep 1
  6518. echo timestamp > conftest.file
  6519. # Do `set' in a subshell so we don't clobber the current shell's
  6520. # arguments. Must try -L first in case configure is actually a
  6521. # symlink; some systems play weird games with the mod time of symlinks
  6522. # (eg FreeBSD returns the mod time of the symlink's containing
  6523. # directory).
  6524. if (
  6525. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  6526. if test "$[*]" = "X"; then
  6527. # -L didn't work.
  6528. set X `ls -t $srcdir/configure conftest.file`
  6529. fi
  6530. rm -f conftest.file
  6531. if test "$[*]" != "X $srcdir/configure conftest.file" \
  6532. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  6533. # If neither matched, then we have a broken ls. This can happen
  6534. # if, for instance, CONFIG_SHELL is bash and it inherits a
  6535. # broken ls alias from the environment. This has actually
  6536. # happened. Such a system could not be considered "sane".
  6537. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  6538. alias in your environment])
  6539. fi
  6540. test "$[2]" = conftest.file
  6541. )
  6542. then
  6543. # Ok.
  6544. :
  6545. else
  6546. AC_MSG_ERROR([newly created file is older than distributed files!
  6547. Check your system clock])
  6548. fi
  6549. AC_MSG_RESULT(yes)])
  6550. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  6551. #
  6552. # This file is free software; the Free Software Foundation
  6553. # gives unlimited permission to copy and/or distribute it,
  6554. # with or without modifications, as long as this notice is preserved.
  6555. # AM_PROG_INSTALL_STRIP
  6556. # ---------------------
  6557. # One issue with vendor `install' (even GNU) is that you can't
  6558. # specify the program used to strip binaries. This is especially
  6559. # annoying in cross-compiling environments, where the build's strip
  6560. # is unlikely to handle the host's binaries.
  6561. # Fortunately install-sh will honor a STRIPPROG variable, so we
  6562. # always use install-sh in `make install-strip', and initialize
  6563. # STRIPPROG with the value of the STRIP variable (set by the user).
  6564. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  6565. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  6566. # Installed binaries are usually stripped using `strip' when the user
  6567. # run `make install-strip'. However `strip' might not be the right
  6568. # tool to use in cross-compilation environments, therefore Automake
  6569. # will honor the `STRIP' environment variable to overrule this program.
  6570. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  6571. if test "$cross_compiling" != no; then
  6572. AC_CHECK_TOOL([STRIP], [strip], :)
  6573. fi
  6574. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  6575. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  6576. # Check how to create a tarball. -*- Autoconf -*-
  6577. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  6578. #
  6579. # This file is free software; the Free Software Foundation
  6580. # gives unlimited permission to copy and/or distribute it,
  6581. # with or without modifications, as long as this notice is preserved.
  6582. # serial 2
  6583. # _AM_PROG_TAR(FORMAT)
  6584. # --------------------
  6585. # Check how to create a tarball in format FORMAT.
  6586. # FORMAT should be one of `v7', `ustar', or `pax'.
  6587. #
  6588. # Substitute a variable $(am__tar) that is a command
  6589. # writing to stdout a FORMAT-tarball containing the directory
  6590. # $tardir.
  6591. # tardir=directory && $(am__tar) > result.tar
  6592. #
  6593. # Substitute a variable $(am__untar) that extract such
  6594. # a tarball read from stdin.
  6595. # $(am__untar) < result.tar
  6596. AC_DEFUN([_AM_PROG_TAR],
  6597. [# Always define AMTAR for backward compatibility.
  6598. AM_MISSING_PROG([AMTAR], [tar])
  6599. m4_if([$1], [v7],
  6600. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  6601. [m4_case([$1], [ustar],, [pax],,
  6602. [m4_fatal([Unknown tar format])])
  6603. AC_MSG_CHECKING([how to create a $1 tar archive])
  6604. # Loop over all known methods to create a tar archive until one works.
  6605. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  6606. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  6607. # Do not fold the above two line into one, because Tru64 sh and
  6608. # Solaris sh will not grok spaces in the rhs of `-'.
  6609. for _am_tool in $_am_tools
  6610. do
  6611. case $_am_tool in
  6612. gnutar)
  6613. for _am_tar in tar gnutar gtar;
  6614. do
  6615. AM_RUN_LOG([$_am_tar --version]) && break
  6616. done
  6617. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  6618. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  6619. am__untar="$_am_tar -xf -"
  6620. ;;
  6621. plaintar)
  6622. # Must skip GNU tar: if it does not support --format= it doesn't create
  6623. # ustar tarball either.
  6624. (tar --version) >/dev/null 2>&1 && continue
  6625. am__tar='tar chf - "$$tardir"'
  6626. am__tar_='tar chf - "$tardir"'
  6627. am__untar='tar xf -'
  6628. ;;
  6629. pax)
  6630. am__tar='pax -L -x $1 -w "$$tardir"'
  6631. am__tar_='pax -L -x $1 -w "$tardir"'
  6632. am__untar='pax -r'
  6633. ;;
  6634. cpio)
  6635. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  6636. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  6637. am__untar='cpio -i -H $1 -d'
  6638. ;;
  6639. none)
  6640. am__tar=false
  6641. am__tar_=false
  6642. am__untar=false
  6643. ;;
  6644. esac
  6645. # If the value was cached, stop now. We just wanted to have am__tar
  6646. # and am__untar set.
  6647. test -n "${am_cv_prog_tar_$1}" && break
  6648. # tar/untar a dummy directory, and stop if the command works
  6649. rm -rf conftest.dir
  6650. mkdir conftest.dir
  6651. echo GrepMe > conftest.dir/file
  6652. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  6653. rm -rf conftest.dir
  6654. if test -s conftest.tar; then
  6655. AM_RUN_LOG([$am__untar <conftest.tar])
  6656. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  6657. fi
  6658. done
  6659. rm -rf conftest.dir
  6660. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  6661. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  6662. AC_SUBST([am__tar])
  6663. AC_SUBST([am__untar])
  6664. ]) # _AM_PROG_TAR